You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(pwa): automatically recover offline screen when connectivity returns - #536
The cached PWA offline.html screen only exposed a manual reload button. Restoring Wi-Fi/mobile data left listeners on the offline page until they clicked Retry, even though the player already has a separate autoReconnect stream recovery setting.
Changes
Add connection recovery on the offline page: immediate online event handling, a lightweight same-origin manifest probe on entry / foreground, and a 3–15 s bounded exponential retry interval in case online is not dispatched.
Verify a valid fresh response before navigating, use the current service-worker scope (including PR preview paths), and keep the existing page URL on reload.
Suspend polling while hidden and prevent concurrent probes / reload loops. Preserve a manual Retry button and all 7 existing translations, with an accessible connection state.
Bump the offline cache version so existing installed PWAs eventually receive the new fallback page without replacing active sessions.
Add regression tests for online/manual recovery, invalid response, retry backoff, preview scope and foreground behavior; update PWA QA documentation.
Safety
Do not cache/play audio while offline; no stream/source URL is exposed.
No changes to the player lifecycle or autoReconnect preference.
No autoplay on page reload. No SEO / canonical / GA4 changes.
Validation
Added Node test coverage in tests/pwa-reconnect.test.mjs and updated tests/pwa-install-shell.test.mjs.
GitHub CI to validate before moving out of draft. Real-device Android/iOS checks still needed.
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing
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
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
The cached PWA
offline.htmlscreen only exposed a manual reload button. Restoring Wi-Fi/mobile data left listeners on the offline page until they clicked Retry, even though the player already has a separateautoReconnectstream recovery setting.Changes
onlineevent handling, a lightweight same-origin manifest probe on entry / foreground, and a 3–15 s bounded exponential retry interval in caseonlineis not dispatched.Safety
autoReconnectpreference.Validation
tests/pwa-reconnect.test.mjsand updatedtests/pwa-install-shell.test.mjs.