feat(android): trip history list + route replay map (Phase 28.5)
This commit is contained in:
+20
-20
@@ -178,30 +178,30 @@ android/
|
||||
- [x] Auto-refresh every 2s; polling stops when navigating away from the tab
|
||||
- [ ] GPS map (MapLibre) — deferred: needs the MapLibre dep + basemap over hotspot (no internet).
|
||||
|
||||
### 28.5 — Trip history ⬜ NOT STARTED
|
||||
### 28.5 — Trip history ✅ DONE (2026-08-15)
|
||||
**Depends on: 28.1. Independent of 28.2–28.4.**
|
||||
|
||||
#### 28.5.1 — Data layer
|
||||
- [ ] Retrofit interface additions:
|
||||
- `GET /api/trips` → `List<TripSummary>`
|
||||
- `GET /api/trip/{id}` → `TripRoute` (list of route points with lat, lon, speed, timestamp)
|
||||
- `GET /api/geocode?lat={}&lon={}` → `GeocodeResult` (label)
|
||||
- [ ] Room cache: store trip list + last-viewed route for offline viewing
|
||||
- [ ] Commit: `feat: trip history data layer`
|
||||
#### 28.5.1 — Data layer ✅
|
||||
- [x] Retrofit interface additions to `PiApi`:
|
||||
- `GET /api/trips` → `TripsResponse` (list of `TripSummary`)
|
||||
- `GET /api/trip/{id}` → `TripRoute` (metadata + route points with lat/lon/speed/source)
|
||||
- `GET /api/geocode?lat&lon` → `GeocodeResult`
|
||||
- `POST /api/geocode/batch` → `Map<String,String>` (one call for all start/end labels)
|
||||
- [x] `TripViewModel`: `loadTrips()` (with batch geocode of start/end), `loadRoute(id)`, `clearRoute()`
|
||||
- [ ] Room cache (trip list + last route for offline) — deferred; Pi is the live source
|
||||
|
||||
#### 28.5.2 — Trip list UI
|
||||
- [ ] LazyColumn of trips: date, start time, distance (km), duration, start→end locations
|
||||
- [ ] Tap → navigates to route replay
|
||||
- [ ] Sort: by date (default: newest first)
|
||||
- [ ] Commit: `feat: trip list screen`
|
||||
#### 28.5.2 — Trip list UI ✅
|
||||
- [x] `LazyColumn` of trips: date, start→end time, distance, duration, avg/max speed, start→end labels
|
||||
- [x] Tap → opens `TripReplayScreen`
|
||||
- [x] Newest first (Pi returns newest-first)
|
||||
|
||||
#### 28.5.3 — Route replay UI
|
||||
- [ ] MapLibre MapView with route polyline + start/end markers
|
||||
- [ ] Timeline scrubber (slider) with timestamp + speed label
|
||||
- [ ] Play/pause button: animates marker along route
|
||||
- [ ] Geocoded location name below scrubber (debounced while scrubbing)
|
||||
- [ ] Trip stats header: date, distance, duration, avg speed, max speed
|
||||
- [ ] Commit: `feat: route replay screen`
|
||||
#### 28.5.3 — Route replay UI ✅
|
||||
- [x] MapLibre `MapView` with the Pi's offline raster tiles (`/static/vendor/tiles/{z}/{x}/{y}.png`, zoom 8–15) — works with no internet
|
||||
- [x] Route polyline (GeoJsonSource + LineLayer) + cursor circle marker, camera fit to bounds
|
||||
- [x] Timeline scrubber (Slider) with timestamp + speed label
|
||||
- [x] Play/pause button animating the cursor along the route (~5 fps)
|
||||
- [x] Trip stats header: distance, duration, avg speed, max speed
|
||||
- [ ] Start/end markers + geocode label below scrubber — deferred
|
||||
|
||||
### 28.6 — Remote portal direct access ⬜ NOT STARTED
|
||||
**Depends on: 28.1 (credentials). Independent of 28.2–28.5. Stretch goal.**
|
||||
|
||||
Reference in New Issue
Block a user