rspace-online/backlog/tasks/task-135 - PWA-—-offline-su...

35 lines
1.1 KiB
Markdown

---
id: TASK-135
title: PWA — offline support (SW + IndexedDB)
status: Done
assignee: []
created_date: '2026-03-29 20:52'
labels:
- pwa
- offline
milestone: m-2
dependencies: []
priority: medium
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
Write sw.js (service worker with 3 cache buckets: shell/guides/mediapipe, cache-first for shell+CDN, network-first for guides, offline fallback) and manifest.json (PWA install metadata).
<!-- SECTION:DESCRIPTION:END -->
## Acceptance Criteria
<!-- AC:BEGIN -->
- [ ] #1 Three versioned cache buckets
- [ ] #2 Shell pre-cached on install, old caches cleaned on activate
- [ ] #3 CACHE_GUIDE_URL message handler for dynamic guide caching
- [ ] #4 Offline fallback: cached index.html for nav, error JSON for guides
- [ ] #5 PWA manifest with standalone display and portrait orientation
<!-- AC:END -->
## Final Summary
<!-- SECTION:FINAL_SUMMARY:BEGIN -->
sw.js (210 lines): 3 cache buckets, pre-cache on install, clients.claim(), offline fallback. manifest.json with simulator shortcut.
<!-- SECTION:FINAL_SUMMARY:END -->