Commit Graph

21 Commits

Author SHA1 Message Date
Jonas Bark
e79edf4809 UI adjustments 2026-06-10 08:53:30 +02:00
Jonas Bark
9fb8d63f9a refactor: collapse to a single shared DirconEmulator for VS mode
ftmsEmulator is now the single emulator for Virtual Shifting traffic
across all trainers and the Click V2. ProxyDevice keeps a per-instance
emulator only for proxy mode (each proxy trainer advertises its own
mDNS identity). ZwiftClickV2 attaches its def to ftmsEmulator directly.

ProxyDevice exposes its own state ValueListenables (isStartedListenable,
isConnectedListenable, retrofitMode, localAddress) that mirror the active
emulator, so UI bindings survive mode swaps. setRetrofitMode and
switchRetrofitMode live on ProxyDevice and migrate the FBD between
proxy/shared emulators.

Removes companionProvider, refreshCompanions, and the click-def
internal seeding in DirconEmulator.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 23:05:40 +02:00
Jonas Bark
67c64d376a build fix IOS 2026-05-13 08:23:19 +02:00
Jonas Bark
4cf347580d warn when connecting smart trainer 2026-05-07 15:57:02 +02:00
Jonas Bark
43cf9482bd UI fixes 2026-04-28 08:39:48 +02:00
Jonas Bark
6dd0dd92a1 Support UI adjustments 2026-04-27 19:20:28 +02:00
Jonas Bark
52d6f59e09 feat: show 'Looking for Smart Trainers…' progress chip on ProxyPage
Adds a small inline row at the bottom of the ProxyPage column with a
SmallProgressIndicator and a muted-text label. Visible only while
core.connection.isScanning is true via a ValueListenableBuilder, so
the chip self-hides between scan windows.

i18n: new lookingForSmartTrainers key in EN/DE/ES/FR/IT/PL.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 18:48:38 +02:00
Jonas Bark
03dfde8189 UI adjustments 2026-04-25 22:58:22 +02:00
Jonas Bark
9f3e418649 feat: default smart trainers to Virtual Shifting on first connect
Adds ProxyDevice.defaultRetrofitMode that returns RetrofitMode.bluetooth or
RetrofitMode.wifi when the device advertises FTMS and the user has a
matching Trainer Connection enabled (resolved via preferredBridgeTransport).
Power-meter-only and HRM-only devices, plus smart trainers with no enabled
Bridge transport, fall back to RetrofitMode.proxy.

Threads the device default through Settings.getRetrofitMode as a `fallback`
parameter so the auto-connect path, the tap-to-connect handler in
ProxyPage, and the picker's initState all surface VS first.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 22:40:36 +02:00
Jonas Bark
edf6af55f7 UI improvements 2026-04-25 22:36:25 +02:00
Jonas Bark
c51e8c7d03 feat(trial): block smart-trainer connect after 5-day trial expires 2026-04-24 08:29:13 +02:00
Jonas Bark
3b8b379c12 ui adjustments 2026-04-23 10:59:21 +02:00
Jonas Bark
e4e8626813 feat(overview): fold Smart Trainers into Controllers card with Connect button 2026-04-23 09:59:15 +02:00
Jonas Bark
60f4ef938b UI + logic adjustments 2026-04-21 11:46:58 +02:00
Jonas Bark
ddfc44ce24 feat(proxy): remember intent to connect; auto-start on next scan
Persist a per-trainer auto_connect_<trainerKey> flag via Settings. Set
to true whenever the user explicitly starts the emulator (tap in the
Trainer & Accessories list, or the Connect button on the disconnected
card). Clear to false when they tap Disconnect (or Disconnect & forget).

In Connection._handleConnectionQueue's proxy branch, after the shared
listener setup finishes, check the flag for the scanned ProxyDevice —
if set and nothing else is in flight, pick up the saved retrofit mode
and fire startProxy() so the emulator is ready by the time the user
opens the details page (or without opening it at all).
2026-04-21 10:55:33 +02:00
Jonas Bark
1754f4f4a8 feat(proxy): open details immediately; restore mode-picker subtitles
ProxyPage no longer awaits startProxy — the details page opens the
moment the user taps a device and the BLE connect runs in the
background. ProxyDevice exposes an isStarting ValueNotifier that flips
true across super.connect(), so ConnectionCard can render a
"Connecting in {mode} mode…" row (with a small progress indicator)
between the tap and the first successful start.

Also restore the per-mode hint subtitles on the live picker — they
were load-bearing ("Mirrors your trainer over WiFi…" etc.) and I'd
trimmed them to fit a compact row. Layout now matches the disconnected
picker (vertical list, icon + label + subtitle, CONNECT MODE header).
2026-04-21 09:49:52 +02:00
Jonas Bark
b2c42b50b8 refactor(proxy-list): separate auto-start from navigation branches for clarity 2026-04-21 09:42:24 +02:00
Jonas Bark
4bbaae858a feat(proxy-list): tap auto-starts emulator with the saved retrofit mode 2026-04-21 09:41:42 +02:00
Jonas Bark
9b9433dc8f feat(proxy): route proxy device taps to new details page
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 22:03:50 +02:00
Jonas Bark
25021b14c8 icon change 2026-04-15 19:54:23 +02:00
Jonas Bark
1cdcc15841 proxy #1 2026-03-23 10:25:09 +01:00