hermes-agent/web/src
Ben af3d4a687f fix(dashboard-auth): ChatPage cleanup closes WS via wsRef.current
Phase 5.3 (1c99c2f5e) wrapped the WS construction in an IIFE so the
gated-mode ticket fetch could resolve asynchronously, but the effect's
top-level cleanup still referenced the IIFE-scoped `const ws`. TypeScript
catches it at build time:

  src/pages/ChatPage.tsx:654:7 - error TS2304: Cannot find name 'ws'.

LSP-cache-lag drowned the diagnostic under the JSX-types-missing noise
locally, so the bug shipped uncaught. Switch to `wsRef.current?.close()`
which:

  - resolves to the same WebSocket the IIFE assigned (line 562:
    `wsRef.current = ws`)
  - is null-safe when unmount races the ticket fetch (the IIFE early-
    returns on `unmounting` so wsRef.current is never set)

The ChatSidebar.tsx + gatewayClient.ts cleanup paths were already using
this pattern correctly (`ws?.close()` / `ws` was hoisted), so this fix
is ChatPage-only.
2026-05-27 02:12:27 -07:00
..
components feat(dashboard-auth): Phase 7 — SPA AuthWidget + /api/status auth fields 2026-05-27 02:12:27 -07:00
contexts feat(web): mobile dashboard UX polish (#28127) 2026-05-18 15:20:31 -04:00
hooks feat(web): mobile dashboard UX polish (#28127) 2026-05-18 15:20:31 -04:00
i18n refactor(web): dashboard typography & contrast pass 2026-05-22 19:50:32 -07:00
lib feat(dashboard-auth): Phase 7 — SPA AuthWidget + /api/status auth fields 2026-05-27 02:12:27 -07:00
pages fix(dashboard-auth): ChatPage cleanup closes WS via wsRef.current 2026-05-27 02:12:27 -07:00
plugins refactor(web): dashboard typography & contrast pass 2026-05-22 19:50:32 -07:00
themes feat(web): mobile dashboard UX polish (#28127) 2026-05-18 15:20:31 -04:00
App.tsx feat(dashboard-auth): Phase 7 — SPA AuthWidget + /api/status auth fields 2026-05-27 02:12:27 -07:00
index.css refactor(web): dashboard typography & contrast pass 2026-05-22 19:50:32 -07:00
main.tsx fix(dashboard): remove country flags from language picker (#29997) 2026-05-21 13:10:52 -07:00