Full Offline-First PWA, Background Sync, Competing Score Conflict Resolution & Offline Course Maps
Makes DG Cardmates fully usable without cell signal: adds Service Worker App Shell precaching, a durable IndexedDB mutation outbox with Background Sync for scores, RSVPs, tee-time polls, round creation/edits, comments, chat, disc bag, and GPS throws, atomic Firestore transactions with 3-way per-player auto-merge and a side-by-side Conflict Resolution Drawer for competing offline edits, plus automatic map tile caching and Save Area Offline map packs.
Dig into all 5 changes in v6.6.0
- Offline-First App Shell, Durable IndexedDB Outbox & Background Sync: Added build-time precache manifest generation for offline cold starts and replaced localStorage-only score queuing with a durable IndexedDB outbox (mutation_outbox, sync_conflicts, map_packs) wired to Service Worker Background Sync plus instant reconnect flushing across live scoring, RSVPs, tee-time polls, round creation/edits, comments, round/crew/DM chat, disc bag updates, and GPS throw measurements.
- Competing Background Sync Resolution (3-Way Auto-Merge + Conflict Drawer): Upgraded score, RSVP, poll, comment, and round edits to run inside atomic Firestore transactions using 3-way conflict detection: edits to different players auto-merge seamlessly, identical edits converge silently, and true same-player conflicts preserve the cloud score while surfacing a side-by-side Cloud vs. Your Offline Edit card (Keep Cloud / Use Mine / Edit) in the new Offline & Sync Drawer.
- Offline Course Maps (Auto-Cached Tiles + Save Area Offline Packs): Added automatic LRU map tile caching (up to 1,200 tiles) in the Service Worker alongside explicit Save Area Offline controls in Course Map and Course Detail Modal to download OpenStreetMap and optional satellite tile packs for dead-zone courses, with storage usage and pack cleanup in the Sync Drawer.
- Subtle Top-Bar Sync Badge & Profile Offline Manager: Replaced the floating bottom offline banner with an unobtrusive top-bar Sync badge (hidden during normal connected play, surfacing offline status, active syncing, queued edits, or reviewable conflicts) plus an always-available Offline & Sync entry in Profile Settings to manage saved map packs.
- Idempotent Offline Message & Round Replay + Dynamic Version Span: Switched offline-created rounds and chat messages to deterministic document IDs so Background Sync retries never duplicate records, ensured Service Worker cache updates preserve saved offline map packs, and made the About page Version History date span update automatically from VERSION_HISTORY.json.