feat(ui): installable offline PWA (F5) #31
Reference in New Issue
Block a user
Delete Branch "feature/ui-finalize-f5-pwa"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
F5 — PWA (installable + offline-tolerant)
From
ui/PLAN-finalize.mdF5 (depends on F6, now merged).What changed
src/service-worker.ts, native SvelteKit, noWorkbox): a version-keyed cache precaches the app shell, build
artefacts (incl.
core.wasm), and static files;activatepurges oldcaches (no stale code after a deploy); cache-first for build/files,
network-first elsewhere, cached-shell fallback for offline navigations.
The gateway is never intercepted. Registered for production only
(
kit.serviceWorker.register: false+ a manual!devregister in theroot layout) so
vite devand the dev-server e2e suite run worker-free.static/manifest.webmanifest; a dependency-free generated icon set(
scripts/gen-pwa-icons.mjs, placeholder from the favicon — swappable);manifest / light+dark theme-color / apple-touch tags in
app.html.Tests
New
pnpm test:pwa(playwright.pwa.config.ts+tests/pwa/pwa.spec.ts)runs against a production preview and checks: manifest + installable
icons, SW registration under a single version-keyed cache, and offline
shell load. Wired into
ui-test.Acceptance correction
"Lighthouse PWA ≥ 90" is dropped — Lighthouse removed the PWA category in
v12 (current 13.x). The Playwright checks verify the same install/offline
behaviour directly. Documented in
ui/docs/pwa-strategy.md.Verification
pnpm check0/0; Vitest 761; PWA spec 3/3; the push CI run is green(full e2e worker-free + PWA gate).
🤖 Generated with Claude Code