FB-01: ambient GPS position drives the shared background map while idle

Adds ambientPositionProvider (never calls LocationSource.stop(), only the
idempotent start()) and wires it into ShellScaffold whenever no trip is
active, so the persistent background map centers and follows the device's
live GPS position at street-level zoom instead of sitting at (0,0)/zoom 2
until a recording starts. RideMap gains an ambientPosition param that the
existing chase-camera/pan-cancel/location-marker logic falls back to
whenever there are no recorded points, with recorded points always taking
priority. Also brings in the docs/feedback ticket set (FB-01..FB-05, README,
FEEDBACK.md) that this worktree's branch point predated.

Adds 10 tests (374 -> 384): RideMap-level ambient centering/chase/pan-cancel/
marker coverage in test/ride_map_test.dart, plus shell-wiring and
provider-level (never-calls-stop, mapEnabledProvider-off) coverage in
test/widget_test.dart. flutter analyze remains clean.
This commit is contained in:
2026-08-24 15:58:45 -05:00
parent 04127d7237
commit 756e3a9f53
12 changed files with 2234 additions and 15 deletions

41
docs/feedback/README.md Normal file
View File

@@ -0,0 +1,41 @@
# Post-launch feedback tickets
Same shape as `docs/ui-redesign/`: one file per ticket, Goal · Context · Design ·
Implementation · Acceptance criteria · Tests · Risks · Out of scope, written before
implementing, with an Outcome section appended after.
Source: `docs/FEEDBACK.md` — hands-on feedback after using the redesigned app. Turned
into 5 tickets, each independently completable (self-contained enough for a fresh
subagent with no prior context to implement correctly).
## The tickets
| # | Ticket | Size | Depends on | Status |
|---|---|---|---|---|
| [FB-01](FB-01-live-street-level-map.md) | Live, street-level map everywhere | L | — | Not started |
| [FB-02](FB-02-hide-idle-speed-panel.md) | Hide the idle Speed panel until recording starts | S | — | Not started |
| [FB-03](FB-03-grid-snapped-hud-widgets.md) | Grid-snapped HUD widgets with auto-fit text | L | — | Not started |
| [FB-04](FB-04-route-planner-map-render-fix.md) | Fix Route Planner's map failing to render + zoom | M | FB-01 (shared zoom constant) | Not started |
| [FB-05](FB-05-closed-loop-routes.md) | Closed-loop routes in Route Planner | M | FB-04 (same file) | Not started |
## Dependencies / dispatch order
```
Wave 1 (parallel): FB-01, FB-02, FB-03
Wave 2 (after Wave 1 lands): FB-04 — reuses FB-01's ambientZoom constant
Wave 3 (after Wave 2 lands): FB-05 — heavily edits the same file FB-04 just touched
```
FB-02 and FB-03 both touch `lib/src/ui/record/record_screen.dart`, but disjoint
regions (the idle-state `Column` vs. `_HudMetricValue`) — low conflict risk.
## Working method, per ticket
1. Implement against the ticket's own Implementation section.
2. `flutter analyze` clean, `flutter test` green — count must not regress (374 passing
before this batch starts).
3. Outcome section appended to the ticket file: what shipped, deviations, test counts.
4. Commit, status flipped to Done in both the ticket file and this table.
Android-emulator verification is best-effort only for this batch — lean on widget
tests as the primary bar; don't get stuck fighting emulator flakiness.