feat(mobile): GPS playback dev tool#81
Draft
cafca wants to merge 19 commits into
Draft
Conversation
Timer-driven 4 Hz engine with play/pause/seek/override and a broadcast UserLocation stream; freezed PlaybackState holds all simulation fields.
preview.time is milliseconds (matches home_eta_provider, route_sheet usage). Treating it as seconds made baseSpeed 1000x too small — at 10x multiplier, slider advanced ~1m in 30s on a 2.5km route.
Add SyntheticPuckOverlay (blue 22px circle) that projects the playback controller's current latlng to screen coordinates, and a ref.listen on PlaybackState that animates the camera to the synthetic position on each tick when in following mode. Gate myLocationEnabled and trackingCompass calls by playback state so the native GPS puck is hidden during playback.
# Conflicts: # mobile/lib/providers/navigation_provider.dart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
In-app GPS playback drawer for testing nav/TTS/reroute on real devices without riding. Replaces the location stream with a synthetic source the operator drives along the planned route.
Playback drawerswitch enables.animateCamera.myLocationEnableddisabled in playback mode so MapLibre's CL puck doesn't compete.Architecture:
mobile/lib/dev/{polyline_walker,playback_engine,playback_state,playback_controller,dev_mode,switchable_location_source}.dart+widgets/{playback_drawer,synthetic_puck_overlay}.dart.SwitchableLocationSourceswaps real GPS ↔ engine stream when toggle flips.Spec:
docs/superpowers/specs/2026-04-25-gps-playback-tool-design.md. Plan:docs/superpowers/plans/2026-04-25-gps-playback-tool.md.Test plan
flutter analyzeclean (very_good_analysis preset)flutter test221/221 pass