mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-15 14:22:43 +00:00
Follow-up hardening on the salvaged NS-591 mobile-chat reconnect fix, from
review findings:
- Guard the page-resume reconnect against the async socket-open window:
a connectInFlightRef is set synchronously before the ticket-URL await so
a visibilitychange/focus fired during that gap (wsRef still null) can't
spawn a redundant second socket. Threaded through
shouldReconnectPtyOnPageResume as connectInFlight.
- Recover a socket wedged in WS_CONNECTING (half-open mobile socket after a
radio handoff — the NS-591 scenario) via a PTY_CONNECTING_TIMEOUT_MS
force-close so onclose routes into scheduleReconnect. Cleared on
open/close/effect-cleanup.
- Avoid collapsing legitimate single-letter reduplication ("a a") in the
mobile duplicate-final-word heuristic (>=2-char guard).
- Extract the 350ms replacement window and 1000ms resume throttle to named
exported consts; drop the dead WS_CONNECTING term from the resume
predicate's final expression.
Adds tests for the in-flight guard and the single-letter reduplication case.
|
||
|---|---|---|
| .. | ||
| AnalyticsPage.tsx | ||
| ChannelsPage.tsx | ||
| ChatPage.tsx | ||
| ConfigPage.tsx | ||
| CronPage.tsx | ||
| DocsPage.tsx | ||
| EnvPage.tsx | ||
| FilesPage.tsx | ||
| LogsPage.tsx | ||
| McpPage.tsx | ||
| ModelsPage.tsx | ||
| PairingPage.tsx | ||
| PluginsPage.tsx | ||
| ProfileBuilderPage.tsx | ||
| ProfilesPage.tsx | ||
| SessionsPage.tsx | ||
| SkillsPage.tsx | ||
| SystemPage.tsx | ||
| WebhooksPage.tsx | ||