emma-hermes/web/src/lib
kshitijk4poor 6f42bf344c fix(dashboard): harden PTY reconnect race, wedged-connect recovery, IME guard
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.
2026-07-09 13:50:17 +05:30
..
api.test.ts fix(dashboard): support mobile OAuth login 2026-07-09 12:21:16 +05:30
api.ts fix(dashboard): support mobile OAuth login 2026-07-09 12:21:16 +05:30
chat-title.test.ts fix dashboard chat session titles 2026-06-21 22:44:02 -07:00
chat-title.ts fix dashboard chat session titles 2026-06-21 22:44:02 -07: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 feat(dashboard): expose cron job execution fields 2026-06-27 03:20:32 -07:00
cron-job.ts refactor(dashboard): tighten cron-job form helpers 2026-06-27 03:20:32 -07:00
dashboard-flags.ts feat(dashboard): always enable embedded chat; remove dashboard --tui flag 2026-06-04 03:03:35 -07:00
format.ts
fuzzy.ts feat: fuzzy search for the model picker (WebUI + TUI) 2026-06-01 16:58:58 -07:00
gatewayClient.ts fix(docker): include apps/shared in dashboard image build 2026-06-28 21:43:56 -05: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(dashboard): harden PTY reconnect race, wedged-connect recovery, IME guard 2026-07-09 13:50:17 +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(dashboard): harden PTY reconnect race, wedged-connect recovery, IME guard 2026-07-09 13:50:17 +05:30
reasoning-effort.test.ts feat(dashboard): add a reasoning-effort picker to the chat sidebar (#49141) 2026-06-19 11:37:40 -07:00
reasoning-effort.ts feat(dashboard): add a reasoning-effort picker to the chat sidebar (#49141) 2026-06-19 11:37:40 -07:00
resolve-page-title.ts fix(dashboard): UI polish — modals, layout, consistency, test fixes 2026-05-12 13:59:22 -04:00
schedule.test.ts feat(dashboard): expose cron job execution fields 2026-06-27 03:20:32 -07:00
schedule.ts feat(dashboard): expose cron job execution fields 2026-06-27 03:20:32 -07:00
session-refresh.test.ts fix(dashboard): refresh Sessions list in real time when new sessions are created 2026-06-19 17:26:11 +05:30
session-refresh.ts fix(dashboard): refresh Sessions list in real time when new sessions are created 2026-06-19 17:26:11 +05:30
slashExec.ts
utils.ts refactor(web): dashboard typography & contrast pass 2026-05-22 19:50:32 -07:00