Commit Graph

102 Commits

Author SHA1 Message Date
Jonas Bark
65f4f22527 fix(home): restore the Click after switching off the split representation
Reported from a device: pick right-side-only, then turn "use new unlock
method" off, and you are left with no Click at all and a chain showing
its empty "Controller" placeholder.

One cause, not two. Right-side-only puts the left puck on the ignored
list — but in the legacy representation the LEFT puck is what becomes
the unified ZwiftClickV2, and the right puck builds nothing at all (see
BluetoothDevice.fromScanResult). Ignored left plus null right leaves
nothing to build, and the "Controller" entry was never an orphan: it is
chainControllerTitle, the placeholder the chain correctly falls back to
when no controller exists.

So the toggle now clears the mode and un-ignores the left side before
switching. That path was private to the onboarding policy on the
assumption that right-side-only was the only way out of it; it is not,
so it becomes restoreLeftSides().

Three UI fixes alongside it.

The error banner over the chain is gone, with the state that only fed it
— both animation controllers, the shake, the latest-error entry. The
activity log and its tab dot are untouched; the chain says what is wrong
now, and a card repeating it above was the older answer to the same
question.

Button-action errors no longer toast while the onboarding wizard is
open. The wizard asks the rider to press a button precisely while the
trainer app or the keymap is not set up yet, so those presses fail by
design, and "X could not be performed" over the step that asked for the
press reads as the wizard being broken. Still logged to the activity
list.

And the checklist's step rows sat 4px from the card edge, so the active
step's highlight read as a panel the card had failed to contain. At 10
it sits inside the card, with StepRow's own inset still letting the
highlight bleed slightly wider than the text.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-11 17:00:05 +02:00
Jonas Bark
24f5da596d fix(home): device-testing fixes, and drop the VS takeover dialog
Four things found riding the real app.

The offline note claimed "your changes apply the next time it connects",
which is simply untrue — button mappings live in the keymap, not on the
device, so nothing is queued up waiting for a reconnect. It now says what
is actually true: you can still change what its buttons do.

A smart trainer that had only just been discovered announced itself as
"Wahoo KICKR lost connection". That was mine, and the cause is worth
recording: _handleConnectionQueue calls _connect() on every queued device,
but ProxyDevice.connect() deliberately no-ops unless the rider has asked
for that trainer. Recording "connected this session" right after connect()
returned therefore marked a trainer that never connected as having
connected — and the chain then read the disconnected state as a break.
Recording now hangs off the actual connection signal, and a new
DevicePresence.discovered ("in range, never connected") maps to a grey
"Not connected" that, being optional, doesn't stop the rider being ready.
A trainer that genuinely drops is still red.

"More options" had picked up two things that don't belong in a settings
drawer: a scanner running a permanent searching animation, implying work
the app wasn't doing on anyone's behalf, and a Close row on desktop, where
SystemNavigator.pop() does nothing useful and the window's own close
button is the way out. Pairing lives in the controller card's setup sheet,
which is where the scanner already was.

The virtual-shifting takeover dialog is gone entirely — the widget, the
shouldAutoConnect gate, the settings accessors and the onboarding call
site. Tapping Connect once is the whole consent story. Two tests asserted
the old gate; one is rewritten around intent alone being sufficient, and
the widget test for the dialog's presence is dropped rather than inverted,
because showSmartTrainerConsentDialog no longer exists and bringing the
gate back could not compile.

Also removes twelve imports in overview.dart left orphaned by the chain
refactor. Verified against the untouched 6.4 baseline: analyze reports no
errors, and the suite's failures are unchanged pre-existing golden drift.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-11 12:02:24 +02:00
Jonas Bark
55e2229a98 feat(home): rebuild the main screen as the setup chain
The old Main tab showed three cards that each exposed whatever the app
happened to know — battery, BETA tags, four live metrics, a media toggle,
a dropdown — and none of them answered the only question a rider has
before a ride: am I ready? When something broke, nothing on screen said
which link failed or what to do about it.

Now every link in the chain gets one card with the same three parts: a
status light in one shared vocabulary, an Edit in the same place on every
card, and a tick-off checklist whose next action carries its own
instructions. Ready cards collapse to one line; unresolved cards open
themselves onto the single active step. Green stays in the dot and ready
status lines stay grey, so colour on this screen always means "look
here". The banner is derived from the cards below it, never asserted
separately, so it cannot contradict them.

Remembered devices close a real gap. A controller that was switched off
or out of range vanished from the app completely — riders could not see
what they owned, could not tell "never set up" from "not here right now",
and could not change a mapping away from the bike. The contour now stays
on screen and stays interactive while disconnected, since mapping a
button is a keymap edit, not a radio operation. Swiping a disconnected
card forgets it, with Undo; a connected one has no dismiss gesture at
all, so the swipe can never drop a working controller.

Desktop follows ui_kits/app-desktop: the chain reads as one centred
column and the activity log is promoted from a tab to a permanent rail,
which is where Help now lives.

The status dot pulses six times rather than forever. This app holds a
wakelock so the home screen can sit lit on a handlebar for an entire
ride, and an animation that never ends also never lets a frame loop go
quiet — which hung every widget test that rendered an attention card.

Nothing is dropped: the scan options, media-key and phone-steering
toggles, ignored-devices list, recording indicator and quit action move
into a collapsed "More options" section below the chain.

Verified against a stashed baseline — the suite's 32 failures (stale
golden screenshots plus one load-dependent flake) are all pre-existing
and unchanged; 93 new tests pass and analyze is clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-11 10:38:37 +02:00
Jonas Bark
071d4969c5 feat(steering): show the steering gauge for Elite Sterzo and Rizer
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 22:05:00 +02:00
Jonas Bark
8b19b2ad3f refactor(phone-steering): replace steering-wheel gauge with compact horizontal gauge
Renames SteeringWheelGauge → SteeringGauge and rewrites the painter as a
horizontal bar with a sliding knob and glowing end zones, saving vertical space
on the device card footer. Updates the overview.dart usage and snapshot tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-30 11:25:42 +02:00
Jonas Bark
b44826779e feat(phone-steering): render steering-wheel gauge instead of phone contour 2026-06-30 10:40:39 +02:00
Jonas Bark
7161455736 cleanup 2026-06-28 12:19:09 +02:00
Jonas Bark
b472a340f4 feat(6.2): show reveal-recording action on mobile too (opens gallery via gal); platform-aware label 2026-06-24 18:59:37 +02:00
Jonas Bark
2eb7e56219 feat(6.2): move Record Screen under Weitere Aktionen (below screenshot) + open-folder action on saved recording 2026-06-24 18:48:22 +02:00
Jonas Bark
64e015313b feat(6.2): add Record Screen editor card and recording indicator
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 16:43:47 +02:00
Jonas Bark
a6f409f9ea misc fixes 2026-06-18 17:48:25 +02:00
Jonas Bark
743f74d03c Don't show toast popups during screenshots
Suppress the overview's alert toasts in screenshotMode and drop the Device
scene's "Connecting to:"/"Connection finished:" test notifications, so the
store screenshots no longer show a "Connecting to: Controller" popup.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 11:51:49 +02:00
Jonas Bark
e37a9de61d increase Zwift Click recommended firmware to 1.2.0, cleanup 2026-06-17 20:38:59 +02:00
Jonas Bark
6e0861e556 Name the trainer app and show its transport in connection alerts
The "connected"/"disconnected" activity alerts fired when a trainer app
attaches to one of our emulators now name the app ("Connected to Zwift",
"Disconnected from Zwift") and tag the alert with the transport, so the
activity log shows a WiFi or Bluetooth icon depending on how the app is
connected instead of always Bluetooth.

- AlertNotification gains a connectionType field + a connection() factory
  that builds the localized, app-named message and tags the transport.
- All 6 emulator call sites (Zwift BLE, FTMS/Rouvy mDNS) route through it,
  passing their own type and core.settings.getTrainerApp()?.name.
- ConnectionMethodType.activityIcon maps network -> wifi, else -> bluetooth;
  overview threads connectionType through and uses it for the leading icon.
- Reuse existing connectedTo string; add disconnectedFrom (en/de/es/fr/it/pl).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 21:22:59 +02:00
Jonas Bark
7cbedd491e fix logic 2026-06-07 09:21:49 +02:00
Jonas Bark
a68b68a1b4 fix button mapping popup 2026-06-01 11:53:55 +02:00
Jonas Bark
f2c8245370 translations 2026-05-31 17:20:25 +02:00
Jonas Bark
e518c47a28 animations 2026-05-31 10:40:28 +02:00
Jonas Bark
0a76de870a refactor: ProxyDevice owns trainer identity and def construction
handleServices builds both ProxyBikeDefinition and
FitnessBikeDefinition up front and attaches to the right emulator
based on retrofit mode. ProxyDevice provides advertisementName +
mdnsTxt to ftmsEmulator/_proxyEmulator via the new startServer
parameters. Drops DirconEmulator state mirroring that's no longer
needed. ZwiftClickV2 no longer calls startServer (click-alone
path removed per prop strip). UI consumers route through
ProxyDevice.advertisementName and device.retrofitMode.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 00:08:33 +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
b9527d8d48 fix logic 2026-05-13 19:57:21 +02:00
Jonas Bark
f28c175a48 show toast when activity tab isn't opened 2026-05-13 19:57:21 +02:00
Jonas Bark
a335694f0a UI fixes 2026-05-13 09:45:09 +02:00
Jonas Bark
5b2baf2e85 screenshots & iOS build 2026-05-13 09:30:13 +02:00
Jonas Bark
390d09b964 UI adjustments, add screenshot to support 2026-05-13 09:05:48 +02:00
Jonas Bark
c24df6e276 Support UI adjustments 2026-04-27 19:29:22 +02:00
Jonas Bark
30c4ae420b Merge branch 'claude/integrate-support-chat-qlJRP' into feat/proxy-device-details-page
# Conflicts:
#	lib/i10n/intl_de.arb
#	lib/i10n/intl_en.arb
#	lib/i10n/intl_es.arb
#	lib/i10n/intl_fr.arb
#	lib/i10n/intl_it.arb
#	lib/i10n/intl_pl.arb
#	lib/pages/proxy_device_details.dart
#	lib/pages/trainer_feedback.dart
2026-04-27 19:26:52 +02:00
Jonas Bark
6dd0dd92a1 Support UI adjustments 2026-04-27 19:20:28 +02:00
Jonas Bark
51cd2696eb feat: render review prompt banner on OverviewPage
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 12:10:31 +02:00
Jonas Bark
c27c65e06e screenshot adjustments 2026-04-26 11:47:54 +02:00
Jonas Bark
2071719fbd UI adjustments 2026-04-26 09:44:56 +02:00
Jonas Bark
642fc754a1 UI adjustments, BLE advertisement fix 2026-04-26 09:14:00 +02:00
Jonas Bark
edf6af55f7 UI improvements 2026-04-25 22:36:25 +02:00
Jonas Bark
fc30cb2be5 refactor: render error banner as centered card without pointer
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 21:01:22 +02:00
Jonas Bark
ff3049c7e5 refactor: remove flow-row visualization from OverviewPage
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 21:00:52 +02:00
Jonas Bark
df185e0478 feat: surface Bridge status in OverviewPage trainer card
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 20:54:55 +02:00
Jonas Bark
20dce926d0 fix advertising logic 2026-04-25 15:31:02 +02:00
Jonas Bark
59a9a15fe5 ui adjustments, DRY fixes 2026-04-24 14:32:55 +02:00
Jonas Bark
135494819d ui adjustments, DRY fixes 2026-04-24 14:13:05 +02:00
Jonas Bark
080e8a5c90 ui fixes 2026-04-24 13:42:45 +02:00
Jonas Bark
c4a3b6f6b6 feat(controller): footerBuilder returns a single widget; picks ControllerCanvas 2026-04-24 11:10:10 +02:00
Jonas Bark
cb9850ed7e fix(overview): restore red/green status icon on activity-log rows 2026-04-24 10:40:54 +02:00
Jonas Bark
4842ec90cb feat(controller): bigger button, initials label, action-icon overlay 2026-04-24 10:37:35 +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
4913915454 fix compilation 2026-04-19 12:26:09 +02:00
Jonas Bark
37a42e9d1e fix(overview): rebuild when connection changes so ProxyPage appears on new device
Subscribes to core.connection.connectionStream so the gated
\`proxyDevices.isNotEmpty\` section appears/disappears as proxy
devices connect or disconnect.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 10:27:36 +02:00
Jonas Bark
a028a1e606 release preparation 2026-04-17 09:44:39 +02:00
Jonas Bark
4464a8a1d9 UI adjustments 2026-04-16 10:22:57 +02:00