dograh/ui
Aymenbenpakiss 37c4bda0c7
fix(ui): release microphone stream on call teardown so a second test call works (#446)
* fix(ui): release microphone stream on call teardown

The browser "Call Voice Agent" test call worked only once per page load.
A second attempt failed (mic stuck / "Could not acquire media") until the
user reloaded the page or cleared site data and re-granted mic permission.

Root cause: the MediaStream from getUserMedia() was added to the peer
connection but never retained or explicitly stopped on teardown. On hangup
only sender.track.stop() (via pc.getSenders()) ran; browsers can keep the
microphone device held through the original MediaStream reference, so the
next getUserMedia() is blocked.

Fix: keep the stream in localStreamRef and stop all of its tracks in
cleanupConnection() (the shared teardown path) and in the unmount cleanup,
so the device is fully released between calls.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(ui): harden microphone release in webrtc hook and embed widget

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: AYMENPAKISS2 <tech.nomatrade@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Abhishek Kumar <abhishek@a6k.me>
2026-06-18 12:47:14 +05:30
..
public fix(ui): release microphone stream on call teardown so a second test call works (#446) 2026-06-18 12:47:14 +05:30
scripts feat: refactor node spec and add mcp tools (#244) 2026-04-21 07:56:16 +05:30
src fix(ui): release microphone stream on call teardown so a second test call works (#446) 2026-06-18 12:47:14 +05:30
.dockerignore Initial Commit 🚀 🚀 2025-09-09 14:37:32 +05:30
.env.example feat: UI refresh and user onboarding (#430) 2026-06-17 19:49:33 +05:30
.gitignore Initial Commit 🚀 🚀 2025-09-09 14:37:32 +05:30
.pre-commit-config.yaml Initial Commit 🚀 🚀 2025-09-09 14:37:32 +05:30
AGENTS.md fix: support object and array parameters in custom HTTP tools (#373) 2026-06-02 11:35:38 +05:30
CLAUDE.md Chore/add setup and contributing docs (#90) 2025-12-27 09:25:20 +05:30
components.json Initial Commit 🚀 🚀 2025-09-09 14:37:32 +05:30
Dockerfile fix: speed up multi arch build (#372) 2026-05-28 13:43:33 +05:30
eslint.config.mjs feat: agent versioning and model configurations override (#227) 2026-04-08 19:20:31 +05:30
next.config.ts fix: use runtime BACKEND_URL for proxying (#411) 2026-06-03 18:47:04 +05:30
openapi-ts.config.ts feat: agent versioning and model configurations override (#227) 2026-04-08 19:20:31 +05:30
package-lock.json feat: UI refresh and user onboarding (#430) 2026-06-17 19:49:33 +05:30
package.json Merge branch 'main' of https://github.com/dograh-hq/dograh 2026-06-17 19:53:31 +05:30
postcss.config.mjs Initial Commit 🚀 🚀 2025-09-09 14:37:32 +05:30
README.md Initial Commit 🚀 🚀 2025-09-09 14:37:32 +05:30
sentry.edge.config.ts chore: fix ui and add "Get Help" button (#27) 2025-10-07 17:40:01 +05:30
sentry.server.config.ts chore: fix ui and add "Get Help" button (#27) 2025-10-07 17:40:01 +05:30
tsconfig.json Initial Commit 🚀 🚀 2025-09-09 14:37:32 +05:30

This is a Next.js project bootstrapped with create-next-app.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Login Flow

  1. The redirection happens server side using ui/src/stack.tsx after the user has logged in.

Sentry and PostHog

  1. Initialized in ui/src/instrumentation-client.ts