Parent
What to build
Trim range selection when creating a Favorite. The star action on an open history ride enters trim mode: two drag handles on the metric chart timeline (time is domain truth; map trimming is ambiguous on loops), defaulting to the full Moving Window. Dragging updates a live highlight of the selected sub-range on the map route and live-recomputed stats for the range. Save creates the Favorite from the selected range (free milliseconds — no snapping, no minimum range). Multiple Favorites can be created from one ride.
Likely files
src/modules/history/components/HistorySessionSheet.tsx - hosts the star action and chart; trim mode lives here
src/modules/history/components/historyChartMetrics.ts - chart data shaping for the timeline
src/modules/history/lib/rideFormat.ts - stat formatting for the live recompute readout
src/modules/history/store/historyStore.ts - selected session samples feeding live stats
src/components/gestures/ - existing gesture primitives for drag handles
Implementation hints
- Live stats can be computed JS-side from already-loaded session samples for preview; the durable stats are still computed natively at creation (slice 1 API).
- Highlighting a sub-range on the route: filter loaded GPS samples by the handle range; reuse the existing route rendering path rather than a second map source if possible.
- Use Reanimated shared values for handle drags to avoid render storms (see
docs/agents/react.md conventions).
- If the trim handles become a reusable control, add a showcase preview under
src/app/settings/components/.
Acceptance criteria
Blocked by
Related
Parent
What to build
Trim range selection when creating a Favorite. The star action on an open history ride enters trim mode: two drag handles on the metric chart timeline (time is domain truth; map trimming is ambiguous on loops), defaulting to the full Moving Window. Dragging updates a live highlight of the selected sub-range on the map route and live-recomputed stats for the range. Save creates the Favorite from the selected range (free milliseconds — no snapping, no minimum range). Multiple Favorites can be created from one ride.
Likely files
src/modules/history/components/HistorySessionSheet.tsx- hosts the star action and chart; trim mode lives heresrc/modules/history/components/historyChartMetrics.ts- chart data shaping for the timelinesrc/modules/history/lib/rideFormat.ts- stat formatting for the live recompute readoutsrc/modules/history/store/historyStore.ts- selected session samples feeding live statssrc/components/gestures/- existing gesture primitives for drag handlesImplementation hints
docs/agents/react.mdconventions).src/app/settings/components/.Acceptance criteria
Blocked by
Related