hermes-agent/web/src/components
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
..
AuthWidget.tsx fix(dashboard): QA pass — log colors, nameless channels, config bool, UX gaps 2026-07-26 15:17:30 -07:00
AutoField.tsx
…
AutomationBlueprints.tsx fix(dashboard): use DS Button prefix/size API instead of inline icons 2026-06-18 16:00:26 -04:00
ChatSessionList.tsx fix(sec): update npm deps to resolve `npm audit` warnings 2026-07-31 13:42:03 -04:00
ChatSidebar.test.tsx fix(dashboard): bound WS ticket minting on the events + PTY sockets (supersedes #81931) (#81978) 2026-08-08 16:01:02 -04:00
ChatSidebar.tsx fix(dashboard): bound WS ticket minting on the events + PTY sockets (supersedes #81931) (#81978) 2026-08-08 16:01:02 -04:00
ConfirmDialog.tsx fix(web): remove marketing backdrop stack for lighter dashboard shell 2026-06-29 12:30:24 -07:00
DeleteConfirmDialog.tsx
…
HermesConsoleModal.tsx fix: wire HermesConsoleModal WS into stale-token reload guard 2026-08-04 15:26:37 +05:30
LanguageSwitcher.tsx fix(web): polish dashboard sidebar chrome and model card menus 2026-06-29 12:30:24 -07:00
Markdown.tsx
…
ModelInfoCard.tsx feat(dashboard): nous-blue theme, bulk sessions, schedule picker (#37383) 2026-06-02 12:37:40 -04:00
ModelPickerDialog.tsx fix(models): match bare Kimi Coding k3 when searching kimi 2026-07-26 21:22:40 -07:00
ModelReloadConfirm.tsx Fix model picker and autorefresh on change 2026-06-19 07:25:35 -07:00
OAuthLoginModal.tsx i18n(dashboard): translate OAuth copy-code strings in all locales 2026-07-09 12:21:16 +05:30
OAuthProvidersCard.tsx
…
PlatformsCard.tsx feat(relay): terminal 4401 (opt-out) → clean "Relay disabled" state 2026-06-24 18:43:01 +10:00
ProfileScopeBanner.tsx feat(dashboard): unify multi-profile management — one machine dashboard, global profile switcher (#44007) 2026-06-11 03:29:33 -07:00
ProfileSwitcher.tsx fix(web): polish dashboard sidebar chrome and model card menus 2026-06-29 12:30:24 -07:00
ReasoningPicker.tsx Fix dashboard chat model profile scoping 2026-07-07 17:44:44 -07:00
ScheduleBuilder.tsx feat(dashboard): nous-blue theme, bulk sessions, schedule picker (#37383) 2026-06-02 12:37:40 -04:00
SidebarFooter.tsx fix(web): polish dashboard sidebar chrome and model card menus 2026-06-29 12:30:24 -07:00
SidebarStatusStrip.tsx fix(sec): update npm deps to resolve `npm audit` warnings 2026-07-31 13:42:03 -04:00
SkillEditorDialog.tsx feat(dashboard): SKILL.md editor on Skills page + attach-skill selector in cron modals (#44231) 2026-06-11 06:10:27 -07:00
SlashPopover.tsx
…
ThemeSwitcher.tsx fix(web): polish dashboard sidebar chrome and model card menus 2026-06-29 12:30:24 -07:00
ToolsetConfigDrawer.tsx fix(dashboard): persist Discord toolsets to Discord platform 2026-07-16 00:20:33 -07:00