Commit Graph

10 Commits

Author SHA1 Message Date
Jonas Bark
82917c3c9d fix(overlay): widen drag hit area; fix PiP show/hide race; orientation-safe DI detection
- The floating overlay's drag handle now fills the full 24px trailing slot
  instead of only the 14px icon.
- iOS overlay: arm PiP only while still showing and tear it down if a hide
  lands mid-start(), so a show/hide race can't orphan a frozen PiP window.
- Detect Dynamic Island via the max safe-area inset instead of the top inset,
  which collapsed in landscape and could auto-start an unwanted PiP.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 19:58:26 +02:00
Jonas Bark
32bfe2add7 fix(overlay): centre the gear value and even out padding
Equal-width leading/trailing slots keep the primary readout centred
whether or not the app icon / drag handle is shown; the container's
horizontal padding is now symmetric and the bottom row no longer carries
an extra inset — so the value lines up over the metrics row.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 15:57:49 +02:00
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
30a1dd3f5d changelog, paywall adjustment 2026-05-13 11:56:12 +02:00
Jonas Bark
aa9283137b fix multi window macOS 2026-05-11 10:02:09 +02:00
Jonas Bark
9c43a07cb0 fix gear change buttons 2026-05-10 11:10:22 +02:00
Jonas Bark
76b32cfd56 overlay: remove TrainerOverlayHost widget
The host was only needed to swap the main window's UI into compact
overlay mode. With a real second window, the main window tree is
unchanged. Remove TrainerOverlayHost from _Starter's child in main.dart
and delete the file.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 16:12:41 +02:00
Jonas Bark
bce7041520 feat(overlay): mount TrainerOverlayHost at app root for desktop compact mode
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 09:07:35 +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