The previous SW (pedscribe-v12) precached /js/app.js, /js/auth.js,
and /css/styles.css — all deleted in the previous commit. Without
this fix, every existing PWA install would 404 on the next SW
install attempt and serve stale cached vanilla pages forever.
Changes:
• CACHE_NAME bumped to pedscribe-v13 → activate event evicts the
v12 cache (and any earlier).
• SHELL_ASSETS narrowed to [/, /manifest.json]. Hashed Vite
assets are not precached because their filenames change on
every build — they're served fresh from the network with Vite's
immutable Cache-Control as backup.
• Fetch handler:
- /api/* → bypass SW (medical data must always be fresh).
- /app/assets/* → network-first, cache fallback for offline.
- everything else → cache-first with stale-while-revalidate.
• Promise.allSettled around cache.add() so a single missing
asset can't break the whole SW install.
Existing PWA users get the new shell on their next visit
(skipWaiting + clients.claim).
Old pedscribe-v11 cache was serving stale admin.js to browsers
even after server updates. New cache name forces old SW to
deactivate and all clients to get fresh JS on next load.
Also switch JS/CSS from stale-while-revalidate to network-first
so code fixes are picked up immediately.
- APK: Add WAKE_LOCK, BOOT_COMPLETED, ACCESS_NETWORK_STATE permissions
- APK: Disable allowBackup for medical data security
- APK: AudioRecordingService now acquires wake lock, has stop action in notification
- Serve /.well-known/assetlinks.json for TWA domain verification
- Service worker: cache app shell, stale-while-revalidate for assets, network-first for API
- Admin model management: validate model ID format, prevent built-in conflicts, audit toggle actions, prevent disabling all models
- Bump version to v9.0.0, Docker tag to v9