dograh/ui
yogi6969 ae2023e315
fix(ui): proxy WebSocket signaling upgrade so local web calls work (#425) (#454)
* fix(ui): proxy WebSocket signaling upgrade so local web calls work (#425)

1.34.0 replaced the next.config `/api/* -> BACKEND_URL` rewrite with the
Route Handler `api/v1/[...path]/route.ts`. Route Handlers proxy HTTP fine
(so `/api/v1/*` still 200s) but cannot upgrade WebSocket connections. The
removed *rewrite* used to carry the upgrade, so without it the signaling
socket (`/api/v1/ws/signaling/...`) has no proxy path and every local web
call dies before WebRTC negotiation — the symptom reported in #425. nginx
would proxy the upgrade but only runs in the `remote` compose profile, so
local OSS deployments have nothing to carry it.

Re-add a `beforeFiles` rewrite scoped to `/api/v1/ws/:path*` so the upgrade
is proxied to the backend *before* the `[...path]` Route Handler can swallow
it. HTTP `/api/v1/*` is untouched and still flows through the Route Handler
(auth/cookie handling intact).

Verified on a 1.34.0-derived source build: signaling WS now reports
`[accepted]` / `connection open` server-side and `WebSocket connected` +
`ICE connection state: connected` client-side; WebRTC negotiates end-to-end.

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

* fix(ui): use direct localhost WebSocket signaling

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Abhishek Kumar <abhishek@a6k.me>
2026-06-19 17:20:07 +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): proxy WebSocket signaling upgrade so local web calls work (#425) (#454) 2026-06-19 17:20:07 +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 feat: enable stack auth config from backend 2026-06-18 14:17:28 +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 chore(main): release dograh 1.36.0 (#437) 2026-06-18 18:57:21 +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