Skip to content

Web: send waiting edits as soon as the network is back - #106

Merged
dszp merged 1 commit into
devfrom
fix/web-reconnect-now
Nov 30, 2026
Merged

dszp merged 1 commit into
devfrom
fix/web-reconnect-now

Conversation

@dszp

@dszp dszp commented Nov 30, 2026

Copy link
Copy Markdown
Owner

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 online event fails when that event comes before the network carries requests.

  • push.retryNow(): the online event 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).
  • The page's online/focus retries while unreachable also flush the outbox.

Tests: push retryNow cases, live online reconnect, afterHello and reconnect flush. 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

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>
@dszp
dszp merged commit 4371c96 into dev Nov 30, 2026
2 checks passed
@dszp
dszp deleted the fix/web-reconnect-now branch November 30, 2026 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant