Files
DeepTutor/web/lib/send-retry.ts
XZH 80921f24ae fix(web): keep submits alive across the full reconnect ladder (#1648)
The outbound submit gates waited only 10 x 200ms (2s) for the WebSocket
to connect, while the transport reconnect ladder waits up to 8s per
rung. A Submit clicked mid-reconnect therefore gave up before the
socket could come back and reported a false server-side expiry while
the parked turn still held the session lease.

Move the shared budget into web/lib/send-retry.ts (60 x 200ms = 12s,
above the 8s rung cap plus jitter) and use it at all four gates:
QuizFollowupContext, ChatStateAdapter, BookChatPanel and the whisper
page. A guard test pins the budget above the worst-case reconnect
rung, and the failed-submission recovery spec now derives its fake
timer budget from the same constants.

Co-authored-by: multica-agent <github@multica.ai>
2026-09-29 14:41:54 -07:00

3 lines
97 B
TypeScript

export const SUBMIT_CONNECT_RETRY_INTERVAL_MS = 200
export const SUBMIT_CONNECT_RETRY_LIMIT = 60