Cue-sheet review screen before riding (issue #55) #118
No reviewers
Labels
No labels
area:companion
area:docs
area:shared
area:tooling
area:watchapp
blocker
kind:chore
kind:feature
kind:spike
kind:test
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
robert/PedalPebble!118
Loading…
Reference in a new issue
No description provided.
Delete branch "area/cue-sheet-review"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #55.
Adds
CueSheetReviewScreen(companion/route/.../route/enrich/CueSheetReviewScreen.kt): a scrollable list of every cue with direction icon, distance-along-route and street name; which tier/enricher produced the sheet (visibly less trustworthy when it's the geometric guess, tier 3); a per-cue "Guess" badge forNAV_CUE_CONFIDENCE = 0cues; hand delete and direction-correct, persisted via a newCueSheetCache.updateCues; and total cue count plus route distance as a sanity check against the planner. Reached from a new "Review cues" button onRouteDetailScreen, followingRouteLibraryScreen's existing local-state screen-toggle pattern (this project has no navigation library, per #46's audit).Two new detection heuristics (
companion/core/.../route/enrich/CueSheetReviewAnalysis.kt)findDenseCueClusters: 3+ cues within 40 m of route distance are flagged as a likely curve-mis-read-as-turns cluster. The 40 m window deliberately mirrors D27's own ±20 m heading-delta window for the (still unbuilt) geometric fallback — the same physical scale a real turn occupies. Three, not two, because two close cues is unremarkable (a mini-roundabout followed by a side turn); three real junctions that close together would be a safety hazard no planner produces.findGeometricMismatches: compares a cue's claimed direction against an independently computed heading-delta turn (±20 m window, matching D27 again) via two newRouteGeodesyhelpers (bearingDegrees,pointAtDistanceMeters). The straight/turn threshold is 20°, intentionally more sensitive than D27's own old 25° figure — this check's false positives cost a rider one extra glance, not a wrong instruction, so it leans toward flagging.Both are unit-tested in
:companion:coreagainst realGpxCueEnricher(tier 0) output, including a real fixture (bikerouter-style-cues.gpx) where the mismatch check correctly flags both real cues once RDP simplification is accounted for (neither cue's snapped point sits at the polyline's actual corner) — a genuine finding, not a fabricated one.Honest scope limits
BRouterEnricher(#27),MatchingEnricher(#28) andGeometryEnricher(#29) are all still open, unimplemented issues — only tier 0 is wired into any build today (seeRouteStore.kt). Every display in this screen dispatches generically onEnrichmentTier/Direction(exhaustivewhen, no hardcoded tier-0-vs-tier-3 special case), so it needs no changes once they land — but the "entirely tier 3" banner and the geometric-guess badge are tested only against hand-builtCuedata taggedEnrichmentTier.GEOMETRY, since there is no realGeometryEnricheryet to produce that data for real. This PR does not fabricate one.BRouterEnricher(#27)'s own job to compute (D25), and nothing in this codebase carries a divergence figure today for this screen to read — building UI for a number nothing produces would mean inventing a fake one, so this PR omits it rather than do that. Added a dependency edge onto #27 in the tracker for this reason.RoutePreviewgains an optionalhighlightPointparameter (a dot drawn on the existing schematic polyline sketch) for "tapping a cue shows it on a map preview" — reusing the #25/#40 schematic preview rather than building a second polyline renderer, since a real georeferenced map doesn't exist yet (#42).Verification
Real builds only, on Robert's local Android SDK/JDK 21:
./gradlew :companion:core:test— 342 tests, all green (including the newCueSheetReviewAnalysisTestand the newCueSheetCache.updateCuescoverage inCueSheetCacheTest)../gradlew :companion:route:assembleDebugand./gradlew :companion:assembleDebug— both green.de/en string parity kept from the start, per docs/TEAM.md's Kestrel convention.