Commit Graph

12 Commits

Author SHA1 Message Date
Davide Scaini ea938e5644 design: align visual style with bincio_autarchive
- Add src/theme.ts with centralised color palette
- Backgrounds: #111 → #09090b, surfaces #1e1e1e → #18181b
- All cards get 1px #27272a borders (matches autarchive cards)
- Text: #fff/#888/#555 → #f4f4f5/#a1a1aa/#71717a
- Accent: #3b82f6 → #60a5fa (autarchive default palette)
- Tab icons: colored emoji → monochromatic Unicode (◉ ☰ ⚙)
- Action buttons use muted palette (#16a34a / #d97706 / #dc2626)
- Keep-awake toggle uses ◑/◌ symbols, border highlights accent on active
- Connect/Scan buttons match autarchive surface+border style
2026-06-03 09:50:05 +02:00
Davide Scaini 6e47ced264 feat: replace API token field with login flow
New auth.ts service: login() POSTs to /api/auth/token with handle +
password, stores instanceUrl/handle/apiToken in AsyncStorage, password
never persisted. logout() clears all credentials. loadAuthState()
returns stored credentials or null.

Settings screen now shows a login form (URL + handle + password) when
not connected, and a connected state card with Disconnect button when
logged in. km notifications toggle auto-saves without a separate Save
button.
2026-06-03 09:43:52 +02:00
Davide Scaini 9d82084fa1 feat: section 5 — MapLibre map with live track and camera follow
Replace SVG TrackView with a real MapLibre map:
- OpenFreeMap liberty tiles (no API key)
- Camera follows user in course mode while recording
- GeoJSONSource + LineLayer renders track polyline updated live
- UserLocation dot shows current GPS position
- Sensors button overlaid with semi-transparent background
2026-06-03 09:32:49 +02:00
Davide Scaini 4e1c2ebef9 fix: battery optimization prompt — add missing manifest permission and fix fallback
REQUEST_IGNORE_BATTERY_OPTIMIZATIONS intent is silently dropped without
the matching manifest permission. Added it to app.json permissions.
Also replaced .catch() chain (which only triggers on thrown errors) with
try/catch blocks so the fallback to IGNORE_BATTERY_OPTIMIZATION_SETTINGS
actually fires. Added resetBatteryOptPrompt() helper to re-trigger the
prompt during testing.
2026-06-03 09:18:03 +02:00
Davide Scaini 765efe288e feat: section 4 — Android battery optimization prompt
One-time prompt on first launch (Android only) directing the user to
exclude bincio-rec from battery optimization. Uses the direct
REQUEST_IGNORE_BATTERY_OPTIMIZATIONS system dialog with a fallback to
the general settings page for OEMs that block the direct intent.
Dismissal persisted in AsyncStorage so prompt never repeats.
2026-06-03 09:09:51 +02:00
Davide Scaini 5f12b2857d feat: section 3 — km milestone notifications
- Foreground notification handler in App.tsx (iOS shows banners while active)
- requestNotificationPermissions() called on app mount
- GPS task tracks running distance per recording session (module-level state)
- Fires immediate notification at each km crossed, gated on kmNotifications setting
2026-06-03 09:03:55 +02:00
Davide Scaini 2378d31f0b feat: section 2 — BLE permissions, cadence parsing, sensor persistence
- requestBlePermissions() handles BLUETOOTH_SCAN + BLUETOOTH_CONNECT on Android 12+
- parseCscMeasurement() implements stateful CSC crank RPM with uint16 rollover
- savePairedDevice / loadPairedDevices / removePairedDevice via AsyncStorage
- SensorPairingScreen: saved sensors section, auto-reconnect on mount, Forget button
2026-06-03 09:00:21 +02:00
Davide Scaini 767c2d78aa feat: section 1 — keep-awake toggle, sensor button, GPS pause, track view
- Keep-awake now conditional: activates only when recording + toggle on
- Sensor button overlaid on map area navigates to SensorPairing modal
- Pause/resume now start/stop the GPS background task, not just store state
- TrackView renders lat/lon polyline via react-native-svg (no tile server)
- react-native-svg added as dependency
2026-06-03 00:13:35 +02:00
Davide Scaini 5fa8fa86f9 docs: add v1 completion plan to CLAUDE.md 2026-06-03 00:05:35 +02:00
Davide Scaini 879eaea3df fix: restore CLAUDE.md and protect it from expo prebuild --clean
prebuild --clean overwrote CLAUDE.md with an Expo-generated stub.
Restored the original project plan and added ignorePaths in app.json
so Expo skips CLAUDE.md on future prebuild runs.
2026-06-03 00:02:50 +02:00
Davide Scaini 896b528a4c feat: scaffold Expo Prebuild project with all v1 screens and services
Sets up the full bincio-rec source tree: Zustand recording store with
haversine stats, background GPS via expo-task-manager, BLE scan/subscribe
for HR and power, GPX writer with Garmin extensions, SQLite recordings
list, multipart upload to bincio-activity, React Navigation stack with
bottom tabs, and build instructions in README.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 22:16:56 +02:00
Davide Scaini ee28cb0c30 Initial commit
Generated by create-expo-app 4.0.0.
2026-06-02 16:19:04 +02:00