mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 04:59:37 +08:00
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>