From 5fa8fa86f96bab8c7ed5dfc7ca5d05a69ede00b8 Mon Sep 17 00:00:00 2001 From: Davide Scaini Date: Wed, 3 Jun 2026 00:05:35 +0200 Subject: [PATCH] docs: add v1 completion plan to CLAUDE.md --- CLAUDE.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 54dd5a6..7e24911 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -91,3 +91,37 @@ Files saved to a user-accessible location (iOS Files app / Android shared storag - Structured workouts / intervals - Offline maps - Live tracking / sharing + +--- + +## v1 Completion Plan + +Scaffold is done (all screens, navigation, store, services, GPX, DB, upload). +Items below are what remains before v1 is shippable. + +### 1 — Quick fixes (each < 30 min) + +- [ ] **Keep-awake toggle** — `useKeepAwake()` in `RecordingScreen` is unconditional; wire it to `keepAwake` from the store so the toggle actually works +- [ ] **Sensor button on Recording screen** — no entry point to the SensorPairing modal; add a BLE icon button in the header or stats area that calls `nav.navigate('SensorPairing')` +- [ ] **GPS pause/resume** — `pause()` / `resume()` only change store state; also call `stopGpsRecording()` / `startGpsRecording()` so the background task actually pauses + +### 2 — BLE (half day) + +- [ ] **Android runtime permissions** — `BLUETOOTH_SCAN` + `BLUETOOTH_CONNECT` require explicit permission requests on Android 12+; add a `requestBlePermissions()` call in `SensorPairingScreen` before scanning +- [ ] **Cadence CSC parsing** — `subscribeCadence()` in `ble.ts` is stubbed; implement stateful CSC Measurement parsing (track previous crank revolution count + timestamp, compute RPM from delta) +- [ ] **BLE persistence** — save paired device IDs + types to AsyncStorage on connect; on app start, attempt to reconnect to previously paired devices automatically + +### 3 — Km notifications (half day) + +- [ ] **Permission request** — call `Notifications.requestPermissionsAsync()` on first launch +- [ ] **Milestone tracker** — track last notified km in the GPS background task (or store); fire a notification each time `distanceMeters` crosses a new km boundary, gated on the `kmNotifications` setting from AsyncStorage + +### 4 — Android battery optimization prompt (1–2 hours) + +- [ ] On first launch, detect if the app is affected by battery optimization (`expo-intent-launcher`) and show a one-time prompt directing the user to whitelist bincio-rec; persist dismissal in AsyncStorage so it only shows once + +### 5 — Map (1–2 days) + +- [ ] **Initialize MapLibre** — call `MapLibreGL.setAccessToken(null)` at app start (or configure a tile provider in Settings); add a tile source (e.g. OpenFreeMap / self-hosted) +- [ ] **Replace placeholder** — swap the grey `` in `RecordingScreen` with a `` + `` that follows current location +- [ ] **Live track polyline** — subscribe to `trackPoints` from the store and render a `` + `` that updates as points arrive