Repository navigation
Conversation
Add a bounded, session-local recovery window that starts on system wake or an offline-to-online transition, including a wake where navigator.onLine never changed. While the window is open and the latest notification fetch is a retryable all-account connection failure, retry on a short cadence instead of waiting for the normal poll. Recovery keeps the merged paused/loading status model: stale failures are presented as loading, so the tray does not flash the error icon while a retry is pending. Recovery ends on a clean or partial success, a definitive failure, or window expiry, then normal polling and any settled failure presentation resume. Tests cover the store, recovery hook, retry classification, poll cadence, the wake-failure retry path, and bounded expiry.
|
setchy
marked this pull request as ready for review
November 27, 2026 16:36
This branch has not been deployed
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.



Summary
navigator.onLinenever changed, so TanStack never sees a reconnect.loading, so the tray never shows the red error icon while a retry is pending. Recovery ends on a clean or partial success, a definitive failure, or window expiry; normal polling and a settlederrorpresentation then resume.Why
Resume/unlock can refetch before Wi-Fi/DNS has reconverged. If
navigator.onLineis alreadytrue, no reconnect event fires and the existing one-shot in-flight reconnect retry never runs. The failed wake fetch was presented aserror, leaving the tray red until the next 60s poll.What changed
useConnectionStore+useConnectionRecovery: session-local recovery window, wake/online entry, bounded settle.useNotificationsQuery: combines the store with the mergedreconnectedAthold;refetchIntervaluses the short recovery cadence for retryable all-account failures.recovery.ts+pollInterval.ts: forge-neutral retryable classification and interval computation.isPaused,isError, anddataUpdatedAtthrough the notification state.ARCHITECTURE.mdand adds store/hook/classification/cadence/integration tests.Verification
pnpm checkpnpm lint:checkpnpm test— 2,300 tests passed (222 files)loading+ 5s retry → success, and window expiry →error.Manual verification (pending)
OpenSpec change:
smooth-connection-recovery(storegitify-specs). Baseline: #3706.