hermes-agent/web/src/pages
Austin Pickett 2382f50f53
fix(dashboard): bound WS ticket minting on the events + PTY sockets (supersedes #81931) (#81978)
* fix(dashboard): retry stalled events feed reconnects

* fix(dashboard): bound the PTY ticket request before the socket exists

ChatPage's connect awaits a single-use ticket from `api.buildWsUrl()`
before `new WebSocket()`. That request produces no socket, so a
rejection or a hang emits no `close` event and never arms
PTY_CONNECTING_TIMEOUT_MS (set after the socket is constructed). The
tab stranded on "connecting" with `connectInFlightRef` stuck true,
which also suppresses the page-resume reconnect path.

Give the ticket phase its own deadline and route both failure modes
into the existing backoff. A `ticketSuperseded` flag invalidates a late
ticket result so a timed-out attempt cannot open a socket behind the
replacement it scheduled, and cleanup clears the timer on unmount.

`scheduleReconnect` now takes `number | null` so an attempt that died
before any socket existed omits the "(code N)" banner suffix instead of
inventing one.

Same bug class as the events-feed fix in the preceding commit, on the
main chat surface.

Co-authored-by: Gille <4317663+helix4u@users.noreply.github.com>

* test(dashboard): cover the PTY ticket connect deadline

Mirrors the events-feed cases in ChatSidebar.test.tsx: a rejected ticket
retries, a stalled ticket times out and its late resolution cannot open
a superseded socket, and a settled ticket disarms the deadline so
PTY_CONNECTING_TIMEOUT_MS remains the only guard on a wedged handshake
(NS-591 regression).

Both failure cases fail against ChatPage.tsx without the preceding fix.

Co-authored-by: Gille <4317663+helix4u@users.noreply.github.com>

---------

Co-authored-by: Gille <4317663+helix4u@users.noreply.github.com>
2026-08-08 16:01:02 -04:00
..
AnalyticsPage.tsx
…
ChannelsPage.tsx feat(dashboard): clarify manual Telegram bot setup 2026-07-16 00:21:01 -07:00
ChatPage.test.tsx fix(dashboard): bound WS ticket minting on the events + PTY sockets (supersedes #81931) (#81978) 2026-08-08 16:01:02 -04:00
ChatPage.tsx fix(dashboard): bound WS ticket minting on the events + PTY sockets (supersedes #81931) (#81978) 2026-08-08 16:01:02 -04:00
ConfigPage.tsx fix(dashboard): keep memory.provider in the config schema so Desktop's dropdown survives (#63886) 2026-07-13 18:56:51 -07:00
CronPage.tsx fix(dashboard): QA pass — log colors, nameless channels, config bool, UX gaps 2026-07-26 15:17:30 -07:00
DocsPage.tsx
…
EnvPage.tsx feat(agent): add Upstage Solar as a model provider 2026-07-15 00:09:24 +05:30
FilesPage.tsx
…
LogsPage.tsx fix(dashboard): QA pass — log colors, nameless channels, config bool, UX gaps 2026-07-26 15:17:30 -07:00
McpPage.tsx fix(mcp): complete OAuth through hosted dashboards 2026-07-17 04:50:47 -07:00
ModelsPage.tsx fix(moa): contain failed reference details 2026-07-23 18:40:09 -07:00
PairingPage.tsx fix(pairing): keep GUI approvals off the code brute-force lockout 2026-07-29 17:51:40 -05:00
PluginsPage.tsx fix(openviking): integrate reliability and configuration hardening 2026-08-03 20:35:47 +05:30
ProfileBuilderPage.tsx fix(sec): update npm deps to resolve `npm audit` warnings 2026-07-31 13:42:03 -04:00
ProfilesPage.tsx fix(sec): update npm deps to resolve `npm audit` warnings 2026-07-31 13:42:03 -04:00
SessionsPage.tsx fix(sec): update npm deps to resolve `npm audit` warnings 2026-07-31 13:42:03 -04:00
SkillsPage.tsx fix(sec): update npm deps to resolve `npm audit` warnings 2026-07-31 13:42:03 -04:00
SystemPage.tsx fix(sec): update npm deps to resolve `npm audit` warnings 2026-07-31 13:42:03 -04:00
WebhooksPage.tsx fix(web): remove marketing backdrop stack for lighter dashboard shell 2026-06-29 12:30:24 -07:00