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
…
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
…
DeleteConfirmDialog.tsx
…
HermesConsoleModal.tsx fix: wire HermesConsoleModal WS into stale-token reload guard 2026-08-04 15:26:37 +05:30
LanguageSwitcher.tsx
…
Markdown.tsx
…
ModelInfoCard.tsx
…
ModelPickerDialog.tsx fix(models): match bare Kimi Coding k3 when searching kimi 2026-07-26 21:22:40 -07:00
ModelReloadConfirm.tsx
…
OAuthLoginModal.tsx i18n(dashboard): translate OAuth copy-code strings in all locales 2026-07-09 12:21:16 +05:30
OAuthProvidersCard.tsx
…
PlatformsCard.tsx
…
ProfileScopeBanner.tsx
…
ProfileSwitcher.tsx
…
ReasoningPicker.tsx Fix dashboard chat model profile scoping 2026-07-07 17:44:44 -07:00
ScheduleBuilder.tsx
…
SidebarFooter.tsx
…
SidebarStatusStrip.tsx fix(sec): update npm deps to resolve `npm audit` warnings 2026-07-31 13:42:03 -04:00
SkillEditorDialog.tsx
…
SlashPopover.tsx
…
ThemeSwitcher.tsx
…
ToolsetConfigDrawer.tsx fix(dashboard): persist Discord toolsets to Discord platform 2026-07-16 00:20:33 -07:00