feat(offline): implement client-side Service Worker range caching for PMTiles and telemetry #98
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/offline-service-worker"
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?
Summary
Implements client-side Service Worker range caching for PMTiles archives and offline telemetry snapshots.
Closes #95
Principles applied
principle-boundary-discipline: Isolated offline interceptor logic strictly inside the service worker execution context without leaking offline plumbing into core MapLibre layer code.principle-test-behavior-not-implementation: Verified service worker lifecycle handlers, range interceptors, and telemetry cache routes via behavioral assertions.principle-experience-first: Ensures field officers in deep peatlands with no GSM connectivity maintain access to cached map vector tiles and telemetry.ponytail-review: Native browser ServiceWorker and CacheStorage APIs utilized directly without heavy Workbox bundle bloat.Impact
public/sw.jsand declarative lifecycle registration inRootLayout.Anti-Overengineering Audit (ponytail-review)
Verification proof
pnpm exec vp check: Passed cleanly with zero errors or warnings across 244 files.pnpm test: 15 test suites and 87 unit tests passed in 466ms.pnpm build: Next.js 16.4.0 Turbopack production build succeeded cleanly.public/sw.js) #41