hermes-agent/web/src/lib
izumi0uu cab8673ea6 fix(dashboard): reload loopback tabs after stale session-token closes
Loopback dashboard tabs now share one one-shot stale-token recovery path across REST 401s, the PTY socket, the structured event socket, and the shared JSON-RPC gateway wrapper. The shared client exposes only an optional close-event interception hook; the dashboard remains responsible for deciding that loopback 4401 means reload.

Constraint: Current main delegates the web gateway to apps/shared JsonRpcGatewayClient, and #54022 review requires a shared-client-compatible close-code hook plus direct ChatSidebar event-socket coverage.
Rejected: Restore the dashboard's old direct WebSocket implementation | stale against the shared JSON-RPC client and would duplicate transport behavior.
Confidence: high
Scope-risk: moderate
Directive: Keep stale-token policy dashboard-specific; the shared JSON-RPC client should expose close events without learning dashboard auth semantics.
Tested: npm --workspace web test (21 files, 106 tests); focused stale-token tests (5 files, 14 tests); npm --workspace web run typecheck; npm --workspace @hermes/shared run lint; npm --workspace @hermes/shared run typecheck; focused web eslint; git diff --check.
Not-tested: Manual browser smoke test across a real dashboard restart.
2026-08-04 15:26:37 +05:30
..
api.test.ts fix(dashboard): reload loopback tabs after stale session-token closes 2026-08-04 15:26:37 +05:30
api.ts fix(dashboard): reload loopback tabs after stale session-token closes 2026-08-04 15:26:37 +05:30
chat-activation.test.ts fix(dashboard): only open the chat PTY once the chat tab is active (#59551) 2026-07-18 00:50:13 -04:00
chat-activation.ts fix(dashboard): only open the chat PTY once the chat tab is active (#59551) 2026-07-18 00:50:13 -04:00
chat-sidebar-session-params.test.ts test: port JS/package.json invariant tests from Python to vitest 2026-07-15 17:24:12 -04:00
chat-title.test.ts
…
chat-title.ts
…
chatImagePaste.test.ts fix(web): paste/drop images into dashboard Chat via HERMES_HOME/images 2026-07-10 02:20:04 -05:00
chatImagePaste.ts fix(web): paste/drop images into dashboard Chat via HERMES_HOME/images 2026-07-10 02:20:04 -05:00
clipboard.test.ts fix(dashboard): support mobile OAuth login 2026-07-09 12:21:16 +05:30
clipboard.ts fix(dashboard): support mobile OAuth login 2026-07-09 12:21:16 +05:30
cron-job.test.ts
…
cron-job.ts
…
dashboard-auth-reload.test.ts fix(dashboard): reload loopback tabs after stale session-token closes 2026-08-04 15:26:37 +05:30
dashboard-auth-reload.ts fix(dashboard): reload loopback tabs after stale session-token closes 2026-08-04 15:26:37 +05:30
dashboard-flags.ts
…
dashboard-modal-shell.test.ts fix(dashboard): opaque MoA presets modal (stop page bleed-through) (#67410) 2026-07-19 19:09:12 -04:00
dashboard-modal-shell.ts fix(dashboard): opaque MoA presets modal (stop page bleed-through) (#67410) 2026-07-19 19:09:12 -04:00
format.ts
…
fuzzy.ts
…
gatewayClient.test.ts fix(dashboard): reload loopback tabs after stale session-token closes 2026-08-04 15:26:37 +05:30
gatewayClient.ts fix(dashboard): reload loopback tabs after stale session-token closes 2026-08-04 15:26:37 +05:30
log-classify.test.ts fix(dashboard): QA pass — log colors, nameless channels, config bool, UX gaps 2026-07-26 15:17:30 -07:00
log-classify.ts fix(dashboard): QA pass — log colors, nameless channels, config bool, UX gaps 2026-07-26 15:17:30 -07:00
mcp-dashboard-oauth.test.ts fix(mcp): close hosted OAuth lifecycle gaps 2026-07-17 04:50:47 -07:00
mcp-dashboard-oauth.ts fix(mcp): close hosted OAuth lifecycle gaps 2026-07-17 04:50:47 -07:00
mcp-server-create.test.ts fix(dashboard): add MCP auth to profile builder (#65163) 2026-07-16 02:05:04 +05:30
mcp-server-create.ts fix(dashboard): add MCP auth to profile builder (#65163) 2026-07-16 02:05:04 +05:30
model-picker-filter.test.ts fix(dashboard): don't let a provider-name query hide the selected provider's models (#65374) (#65413) 2026-07-19 19:05:44 -04:00
model-picker-filter.ts fix(dashboard): don't let a provider-name query hide the selected provider's models (#65374) (#65413) 2026-07-19 19:05:44 -04:00
model-search-text.ts fix(models): match bare Kimi Coding k3 when searching kimi 2026-07-26 21:22:40 -07:00
nested.ts
…
pty-mobile-input.test.ts fix(dashboard): harden PTY reconnect race, wedged-connect recovery, IME guard 2026-07-09 13:50:17 +05:30
pty-mobile-input.ts fix(web): resolve all eslint errors, downgrade react-hooks v7 to warnings 2026-07-16 01:42:02 +05:30
pty-reconnect.test.ts fix(dashboard): harden PTY reconnect race, wedged-connect recovery, IME guard 2026-07-09 13:50:17 +05:30
pty-reconnect.ts fix(web): make PTY resume sanitizer work against real PTY output 2026-07-29 12:21:48 -04:00
pty-resume-loading.test.ts fix(dashboard): gate resume hydration on sanitized PTY payload 2026-07-31 09:47:06 -04:00
pty-resume-loading.ts feat(dashboard): add resume loading overlay helpers 2026-07-31 09:47:06 -04:00
pty-resume-sanitizer.test.ts fix(web): make PTY resume sanitizer work against real PTY output 2026-07-29 12:21:48 -04:00
pty-resume-sanitizer.ts fix(web): make PTY resume sanitizer work against real PTY output 2026-07-29 12:21:48 -04:00
reasoning-effort.test.ts feat(reasoning): add max and ultra effort levels (#62650) 2026-07-12 00:26:49 -07:00
reasoning-effort.ts feat(reasoning): add max and ultra effort levels (#62650) 2026-07-12 00:26:49 -07:00
resolve-page-title.test.ts fix(dashboard): QA pass — log colors, nameless channels, config bool, UX gaps 2026-07-26 15:17:30 -07:00
resolve-page-title.ts fix(dashboard): QA pass — log colors, nameless channels, config bool, UX gaps 2026-07-26 15:17:30 -07:00
schedule.test.ts
…
schedule.ts
…
session-import.test.ts feat(dashboard): add session import flow 2026-07-13 15:41:00 +05:30
session-import.ts feat(dashboard): add session import flow 2026-07-13 15:41:00 +05:30
session-refresh.test.ts
…
session-refresh.ts
…
slashExec.ts
…
utils.ts
…