Add PWA manifest, icons and offline service worker to the admin app

- Static web app manifest (standalone, brand-token colours) with 192/512
  "any" icons and a 512 maskable icon, generated as real PNGs by
  admin/scripts/generate-icons.mjs (zlib only, no network).
- Hand-written public/sw.js: precaches the shell on install, prunes stale
  caches on activate, falls back to the cached index.html for offline
  navigations, serves same-origin static assets cache-first; never
  handles cross-origin or non-GET requests.
- registerServiceWorker() registers /sw.js only in production builds and
  logs on failure; called from main.tsx. index.html links the manifest,
  theme colour and apple-touch-icon.
- Vitest coverage for manifest installability, icon PNG dimensions, the
  worker's install/activate/fetch behaviour and the production guard.

Task: 96ab3c0b-7554-4098-8af1-2be7815f8929

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-23 19:22:26 -04:00
co-authored by Claude Opus 5.5
parent 75ad9892b8
commit fb432fda5a
10 changed files with 452 additions and 1 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB