docs: add v1 completion plan to CLAUDE.md

This commit is contained in:
Davide Scaini
2026-06-03 00:05:35 +02:00
parent 879eaea3df
commit 5fa8fa86f9
+34
View File
@@ -91,3 +91,37 @@ Files saved to a user-accessible location (iOS Files app / Android shared storag
- Structured workouts / intervals - Structured workouts / intervals
- Offline maps - Offline maps
- Live tracking / sharing - 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 (12 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 (12 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 `<View>` in `RecordingScreen` with a `<MapLibreGL.MapView>` + `<MapLibreGL.Camera>` that follows current location
- [ ] **Live track polyline** — subscribe to `trackPoints` from the store and render a `<MapLibreGL.ShapeSource>` + `<MapLibreGL.LineLayer>` that updates as points arrive