Precache page routes for offline support

Add /capture, /queue, /browser to SW precache so these pages work
offline without needing a prior visit. Capture and queue are fully
functional offline since they use local IndexedDB.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-07 22:07:14 -06:00
parent 793238b562
commit ac241fae2e

View File

@@ -1,9 +1,9 @@
// NextSnap Service Worker
// Provides offline-first caching for the app shell
const CACHE_VERSION = 'nextsnap-v20';
const APP_SHELL_CACHE = 'nextsnap-shell-v16';
const RUNTIME_CACHE = 'nextsnap-runtime-v16';
const CACHE_VERSION = 'nextsnap-v21';
const APP_SHELL_CACHE = 'nextsnap-shell-v17';
const RUNTIME_CACHE = 'nextsnap-runtime-v17';
// Offline fallback page (served when network fails and no cached version exists)
const OFFLINE_PAGE = `<!DOCTYPE html>
@@ -27,6 +27,9 @@ button:active{opacity:0.8}
// Assets to cache on install
const APP_SHELL_ASSETS = [
'/',
'/capture',
'/queue',
'/browser',
'/static/css/style.css',
'/static/js/app.js',
'/static/js/auth.js',