Commit Graph

4 Commits

Author SHA1 Message Date
Jonas Bark
ff57b005d5 feat(shifting): show 2×N gear position when the front derailleur is active
With the virtual front derailleur on, the compact gear readout switches
from rear gear/total (14/25) to head-unit-style front×rear position
notation (small ring 1×N, large ring 2×N, e.g. 2×14) — matching how
Garmin/Wahoo display Di2/AXS gearing. With it off, it stays 14/25.

- Add tested formatGearReadout helper.
- Wire into the proxy card, debug menu, desktop second window + Android
  PiP/overlay (trainer_overlay_view), and the gear hero card (2× · 50T).
- Carry frontShiftEnabled + frontRingLarge through TrainerOverlayState
  (json, ==, hashCode, activity map) so the snapshot reaches the overlay
  and the iOS surfaces.
- iOS PiP + Live Activity: format 2×N centrally in GearSnapshot.
- Standardize the off-state readout to 14/25 across all surfaces.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 15:02:40 +02:00
Jonas Bark
9c43a07cb0 fix gear change buttons 2026-05-10 11:10:22 +02:00
Jonas Bark
73954458bd refactor(overlay): rename OverlayState -> TrainerOverlayState to avoid Flutter collision
Removes the need to `hide OverlayState` on shadcn_flutter imports in
trainer_overlay_view.dart and its widget test.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 23:06:24 +02:00
Jonas Bark
7940255188 feat(overlay): TrainerOverlayView shared widget
Adds TrainerOverlayView — a self-contained, platform-agnostic widget that
renders gear N/M, mode pill (ERG/SIM), and optional power/cadence metrics.
Wired via ValueListenable<OverlayState>; onModeToggle/onDragStart are nullable
for Android isolate compatibility. Covered by 3 widget tests (TDD).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 23:04:21 +02:00