Skip to content

fix(web): keep the offline app shell when account data is cleared - #1019

Merged
Medformatik merged 1 commit into
fix/saved-list-dead-add-place-buttonfrom
fix/account-deletion-keeps-app-shell
Nov 16, 2026
Merged

Medformatik merged 1 commit into
fix/saved-list-dead-add-place-buttonfrom
fix/account-deletion-keeps-app-shell

Conversation

@Medformatik

Copy link
Copy Markdown
Collaborator

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.
  • Not verified: in a browser with an installed worker (delete an account, go offline, reload, expect the offline page).

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.

@Medformatik Medformatik self-assigned this Nov 16, 2026
@Medformatik
Medformatik added this pull request to stack #989 November 16, 2026 10:14
@Medformatik
Medformatik merged commit 243c26a into main Nov 16, 2026
24 checks passed
@Medformatik
Medformatik deleted the fix/account-deletion-keeps-app-shell branch November 16, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant