Repository navigation
fix(web): keep the offline app shell when account data is cleared - #1019
Merged
Medformatik merged 1 commit intoNov 16, 2026
Merged
Medformatik merged 1 commit into
Medformatik merged 1 commit into
Conversation
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.
What changed and why
After an account is deleted, the browser's local data is cleared, including every Cache Storage cache. One of those is the service worker's app-shell cache: the offline page, the manifest and the bundled map style and sprite. They are public build files fetched without credentials, and they are written only when a worker version installs. Deleting them left the installed app without its offline page and offline styles until the next deploy installed a new worker.
The cleanup now keeps caches whose name starts with
app-shell-and deletes all others as before: API responses, searches, photos, weather, map and imagery tiles, glyphs, preferences and the worker's generic runtime caches. A cache added later is deleted too, because only the app shell is exempt. Local storage, IndexedDB and offline packages are cleared exactly as before.The name prefix existed as repeated literals; it is now one constant used by the worker and the cleanup.
The impact was smaller than first assumed: page navigations are network-only by design, so the app never cold-starts offline. What went missing was OpenMapX's own offline page and the offline copy of the bundled styles.
Verification
accountDeletionCleanup.test.ts: both app-shell caches survive while sixteen runtime caches are deleted (failed before the change); the failure-counting case is unchanged.swCaches.test.ts, the web and service-worker typechecks and Biome on the touched files pass locally.Release and upgrade impact
Product impact: ordinary
No package release: the extension CLI bundles some core sources but none of the code changed in this stack; its built bundle contains no trace of it.