Working offline
The coach app is designed for chairlifts. When your phone loses signal, the Today view keeps functioning:
- Reading today’s events, roster, coach notes — all in memory.
- Marking attendance — your taps queue locally and sync when you’re back online.
- Coach notes & channel posts — these require a network connection (they fan out to other families). You’ll see a friendly error and can retry.
What you’ll see when offline
A yellow bar slides in at the top of /coach/today:
● Offline — your changes will sync when you're back online.Per-event, a ↻ N pending chip shows how many of your attendance taps
are queued waiting to upload.
When you’re back online, the bar flips blue:
● Syncing 2 attendance changes……and disappears once everything has flushed. You’ll see a brief refresh to pull the latest state from the server.
What survives a cold reload
You can close the app and re-open it while offline. The PWA service worker serves the page shell from cache, and the localStorage-cached data renders today’s roster (the version you last saw online).
You cannot sign in fresh while offline — magic links need a network trip. Once signed in on a device, you stay signed in.
What doesn’t work offline
- Posting a coach note (it fans out to families).
- Posting to the channel chat (Telegram API call).
- Marking attendance for an event you haven’t loaded yet (no roster cached).
- The desktop
/coach/eventslist (it always fetches fresh).
If you tap something that requires network while offline, you’ll get a friendly “Offline — requires connection” hint and the action is not queued (because it’s a fan-out action — we don’t want unpredictable later sends).