hermes-agent/web/src/pages
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
..
AnalyticsPage.tsx refactor(web): dashboard typography & contrast pass 2026-05-22 19:50:32 -07:00
ChatPage.tsx fix(dashboard-auth): ChatPage cleanup closes WS via wsRef.current 2026-05-27 02:12:27 -07:00
ConfigPage.tsx refactor(web): dashboard typography & contrast pass 2026-05-22 19:50:32 -07:00
CronPage.tsx refactor(web): dashboard typography & contrast pass 2026-05-22 19:50:32 -07:00
DocsPage.tsx fix(web): force light color-scheme on docs iframe 2026-05-07 04:55:47 -07:00
EnvPage.tsx refactor(web): dashboard typography & contrast pass 2026-05-22 19:50:32 -07:00
LogsPage.tsx refactor(web): dashboard typography & contrast pass 2026-05-22 19:50:32 -07:00
ModelsPage.tsx refactor(web): dashboard typography & contrast pass 2026-05-22 19:50:32 -07:00
PluginsPage.tsx refactor(web): dashboard typography & contrast pass 2026-05-22 19:50:32 -07:00
ProfilesPage.tsx refactor(web): dashboard typography & contrast pass 2026-05-22 19:50:32 -07:00
SessionsPage.tsx refactor(web): dashboard typography & contrast pass 2026-05-22 19:50:32 -07:00
SkillsPage.tsx refactor(web): dashboard typography & contrast pass 2026-05-22 19:50:32 -07:00