Repository navigation
Conversation
Adds the offlineMode flag to both the backend registry and its required frontend mirror, following the existing pattern used by goldenTicket and askAiChatbot. Defaults to false; category is experimental, which was previously defined in the type but unused. Refs vicharanashala#162
Configures vite-plugin-pwa with manual service worker registration (injectRegister: false) so nothing registers unless the offlineMode flag is on. Caches FAQ content and program-context endpoints (batches, feature-flags) via Workbox StaleWhileRevalidate, since the FAQ page can't render without knowing the active program even when the FAQ data itself is cached. skipWaiting/clientsClaim are enabled so a newly-installed worker takes over immediately instead of waiting for all tabs to close. Refs vicharanashala#162
OfflineModeManager is a headless component mounted inside FeatureFlagProvider that watches the offlineMode flag's live value and enables/disables the service worker accordingly — including unregistering it and clearing its caches if the flag is turned off after being on, rather than just leaving a dormant worker behind. Refs vicharanashala#162
Adds /offline, gated by FeatureGate like other experimental features (e.g. /golden). Shows live connection status, whether the service worker is active, how many FAQ pages are cached, and an install button using the beforeinstallprompt event. Refs vicharanashala#162
apps/frontend/dev-dist/ is generated by devOptions when running pnpm dev with the PWA plugin enabled. dist/ was already ignored; dev-dist/ wasn't. Refs vicharanashala#162
…t-fix fix(lint): remove unused vars in scripts, bootstrap, config
Laks04
force-pushed
the
test/bookmark-toggle
branch
from
September 3, 2026 13:26
170be79 to
df90197
Compare
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.
not yet merged into main. CI will fail until #169 merges — this is
expected, not a bug in this PR. Once #169 lands, this will pass cleanly
against main.
What changed
Adds a new test file covering registerOfflineServiceWorker.ts — the
flag-gated service worker registration/unregistration logic introduced
in #169. No existing files are modified; this only adds test coverage
that the Offline Mode report itself flagged as missing ("No automated
tests were added for the new code... in this first iteration").
Related issue
Refs #162
Refs #169
Type of change
Area affected
CI verification
cachesproperty on window, leaking into the next test); fixed by deleting
the property instead of reassigning it when the original was
undefined
Notes for reviewer
Individual contribution within the Offline Mode team project (#169).