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
Dead cleanup code: VERSION = "studymap-v1" (line 4) is never bumped by any build step, so the activate-time old-cache deletion (lines 22-32) can never fire and stale caches persist forever across deploys.
trimCache lags: it deletes exactly one entry per call while over limit (lines 34-38), so the tile cache can sit far above TILE_LIMIT.
PRECACHE gaps (line 8): omits /map — arguably the app's core route for offline use — plus built CSS/fonts.
Silent registration failure: src/components/pwa-register.tsx:10 swallows errors with .catch(() => {}), so broken SW updates are invisible.
Suggested fix
Derive/inject a version at build time (e.g. replace a placeholder in a prebuild step) so cleanup actually runs
Loop trimCache until under limit
Add /map to PRECACHE; log registration failures in dev
Problem
Audit of
public/sw.js:VERSION = "studymap-v1"(line 4) is never bumped by any build step, so the activate-time old-cache deletion (lines 22-32) can never fire and stale caches persist forever across deploys.lines 34-38), so the tile cache can sit far aboveTILE_LIMIT./map— arguably the app's core route for offline use — plus built CSS/fonts.src/components/pwa-register.tsx:10swallows errors with.catch(() => {}), so broken SW updates are invisible.Suggested fix
/mapto PRECACHE; log registration failures in devAcceptance criteria