Repository navigation
fix(offline): confirm a dropped connection before going offline - #581
Merged
Merged
Conversation
A single failed fetch (e.g. a swap cut off while navigating the sidebar) or an `offline` event flipped the lamp immediately. Now a retrying probe against the manifest must fail too; any HTTP response counts as reachable. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #581 +/- ##
=======================================
Coverage 94.18% 94.18%
=======================================
Files 94 94
Lines 26856 26856
=======================================
Hits 25293 25293
Misses 1563 1563 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Concurrent confirmations now share one in-flight probe, sync() counts its own failed manifest fetch as the first attempt, and the per-probe timeout drops from 5s to 2s. Co-Authored-By: Claude Sonnet 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.
Problem
Clicking a sidebar link sometimes flipped the connection lamp to Offline. A single failed fetch (e.g. a swap cut off during navigation, via
performSwap) or a browserofflineevent immediately setdata-offline.Fix
offline.js: going offline now requires a retrying probe (2 attempts, 300ms apart, 5s timeout) against/api/offline/manifestto fail too. Any HTTP response counts as reachable.sync()'s failure path, theofflineevent andnetworkFailedall use the same confirmation.app.js: awaitsnetworkFailed.data-offline, since detection is no longer instantaneous.Notes
offline_reading.feature: 13/13 scenarios pass.🤖 Generated with Claude Code