Repository navigation
Web: send waiting edits as soon as the network is back - #106
Merged
Merged
Conversation
The push socket's reconnect backoff reaches 30 s while offline and nothing cut it short, and the outbox's own backoff reaches 30 s too; the one flush on the online event fails when that event comes before the network carries requests. Now the online event reconnects the socket at once and restarts its backoff from 1 s, and each hello (plus the page's online and focus retries) flushes the outbox, so the first answer from the server sends. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When Wi-Fi came back, an edit made offline waited for a backoff of up to 30 s (push socket and outbox both reach their cap while offline), and the single flush on the
onlineevent fails when that event comes before the network carries requests.push.retryNow(): theonlineevent cuts a waiting reconnect short and restarts the backoff at 1 s, so the socket probes at 1, 2, 4 s.afterHello: every hello sends waiting edits (and reruns an unfinished start, as before).online/focusretries while unreachable also flush the outbox.Tests: push
retryNowcases, live online reconnect,afterHelloandreconnectflush. Full suite 3696 passing, all tsc configs, leak-guard clean.Not addressed: a start whose request stalls at the network transition holds the start for up to the 30 s fetch timeout, and retries join it. Needs David's console timestamps to know if that happens.
🤖 Generated with Claude Code