Riders keep writing in about the wrong gear number in MyWhoosh and others.
The answer has always been the gear overlay, and the one-time toast that said
so was the wrong messenger: it fired once, mid-connect, and scrolled away
before anyone read it.
Move the offer onto the trainer card, where it stays until it is acted on.
- New SetupStepId.trainerGearOverlay, last in the trainer checklist and
offered only once the bridge is up, the trainer app runs on this device
(Target.thisDevice), the platform can draw an overlay, and a Virtual
Shifting session is producing a gear to draw. Ticks off — and leaves the
card — as soon as the overlay is enabled.
- Its button reads "Enable overlay" and deep-links to the trainer detail
page's Overlay section, which owns the permission and PiP flows.
- SetupStep gains an `optional` flag so an offer stays an offer: it does not
colour the card, does not count towards the banner's steps, and never
stops "Ready to ride". Marked OPTIONAL on its own line, via the tag the
card header already wore (now a shared OptionalTag).
- Drops OverlayConnectHint, its ProxyDevice listener and the
overlay_connect_hint_shown flag. The two l10n strings it owned are reused
as the step's hint and button label in all six locales.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Nearly every MyWhoosh/Rouvy bridge rider pairs the virtual trainer, then
writes support asking why the gear shown in the trainer app doesn't sync
— trainer apps can't display BikeControl's virtual gears. Surface the
canonical answer (the gear overlay) exactly once, at the moment the
question would otherwise arise: the first time a trainer app connects to
the virtual trainer while the overlay is off.
- OverlayConnectHint fires an AlertNotification (toast + activity-log
entry) whose button deep-links to the trainer detail page, scrolled to
the Overlay section (new revealOverlaySection param).
- Hooked on ProxyDevice's device-level isConnected wrapper so it
survives emulator/mode swaps; gated on an active VS session
(fitnessBike != null), overlay disabled, and a persisted one-time
flag (overlay_connect_hint_shown).
- New l10n strings in all six locales.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
debugText now runs a multi-second mDNS scan. Stop awaiting it before
navigating — kick it off as a future, open the chat immediately, and let
SupportChatPage await it lazily for the diagnostic preview and at send time.
Show a one-time, full-screen explainer the first time the Smart Trainer
page is opened: Virtual Shifting is in beta, works with dozens of trainers
(some not perfectly yet), links to the supported-trainers list, and invites
feedback. Gated by a global 'virtual_shifting_intro_seen' pref and skipped in
screenshot mode. Reuses existing icons only. Strings added in all 6 locales.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- ConnectionCard: "No connection" shows "Not connected" instead of the
bridge connect instruction; switching modes keeps the bridge accordion
mounted with inline progress (drops the "Connecting in ... mode"
placeholder card).
- proxy_device_details: stable keys on ConnectionCard / LiveMetricsSection
/ MiniWorkoutCard. On (dis)connect, conditional siblings toggle both
above (FTMS warning) and below (gear/settings/VS-notice) these widgets,
trapping the unkeyed ones in Flutter's reconciliation middle and
remounting them — which collapsed the accordion and rebuilt the page.
- ProxyDevice: re-establish the emulator-state bindings on every
(re)connect (_rebindEmulatorState in startProxy). The in-place
"No connection" disconnect detaches them on a reused ProxyDevice, so
reconnecting Virtual Shifting left the UI stuck on "connecting" while
the emulator was actually connected.
- ProxyDevice.disconnect/switchRetrofitMode/handleServices: await the
emulator stops so mDNS/TCP is torn down before reporting disconnected,
and log the previously swallowed detach errors.
- connection.dart: log the discovered device name instead of its runtime
type.
- Bump prop for the awaited mDNS teardown.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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>
activeDefinition now returns the CompositeBleDefinition; consumers
that need the FitnessBikeDefinition specifically use the fitnessBike
convenience getter. Bumps prop submodule to pick up the composite
machinery.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a Supabase-backed support chat that replaces the existing trainer
feedback page and the mail support entry in the help dropdown. The chat
captures the same telemetry snapshot (extracted into a shared
TelemetrySnapshot module) and supports threaded replies and attachments.
- New SupportChatService wrapping the four edge functions plus a signed
URL helper for support-attachments storage.
- New SupportChatPage / SupportThreadPage with composer, attachment chips,
optimistic send, sign-in gate, and pull-to-refresh.
- Help dropdown's Mail entry replaced with "Chat with Support" that
pre-fills debugText() as freetext on the first message.
- Trainer device details "Provide Feedback" button now opens the chat
with TelemetrySnapshot.fromDevice telemetry.
- Login screen gets a subordinate "Don't want to sign in? Write a mail
instead" ghost button (mobile only) that opens the existing mailto.
- Telemetry helpers moved out of the deleted trainer feedback files into
lib/services/telemetry_snapshot.dart; test rewritten for the new class.
https://claude.ai/code/session_0155Bb4kCYaxKh7zQfoQHZET
Workout: Pause/Resume action is a new InGameAction in the trainer-control
group. It toggles core.workoutRecorder between recording and paused
states without requiring a connected proxy trainer (handled in
base_actions.dart before the proxy dispatch). No-op when the recorder
is idle.
Inline feedback prompt replaces the standalone "Provide Feedback"
button on the proxy device details page. It shows "Does it work?"
with a 3-cell grid (Yes / No difference / No). Yes and No navigate
to TrainerFeedbackPage with the rating pre-filled (TrainerFeedbackPage
now accepts an optional initialRating). "No difference" dismisses
the prompt for the current page session.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Move user-facing literals (page titles, mode labels, hints, metric
labels, weight tile copy, unlock-confirm prompts) to the ARB files
so they go through AppLocalizations. Mirror new English copy into
de/es/fr/it/pl pending translation.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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).
The details page's _gearSection and _settingsSection gate on
`def is FitnessBikeDefinition`, which flips to false in Proxy mode
(activeDefinition becomes ProxyBikeDefinition). Without a listener on
emulator.retrofitMode, switching to Proxy left the VS cards stale on
screen. Hook the notifier into _onEmulatorStateChanged so setState
fires on every mode swap.
ConnectionCard's connected-state view is now just the mode picker —
the large coloured "Proxy/WiFi/Bluetooth active" banner (and the bridge
row with device-name / IP) is removed. Dead _bridgeRow and _dot helpers
dropped.
ShiftingConfigPicker no longer sits between the connection card and the
gear section; it's now the first entry inside TrainerSettingsSection,
grouping config-scoped controls (picker, VS mode, gear settings, bike
weight, rider weight).
Feedback is naturally scoped to a specific connected trainer, so its
entry point belongs on the device details page next to Disconnect,
not on the generic Trainer page.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The page already listened to emulator.isStarted/isConnected, but not
to the BLE device's own connection state (BaseDevice.isConnected is a
plain bool set by the connection framework). Subscribe to
core.connection.connectionStream — matching ProxyPage's pattern — so
the page rebuilds when the BLE device connects or disconnects.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1. Show gear hero + live metrics + settings before bridge is live by
listening to emulator.isStarted/isConnected and rebuilding the page
when the connection state changes.
2. Replace all GestureDetector fake-buttons with proper Button.ghost /
Button / ButtonStyle.destructive in gear_hero_card, gear_ratios_card,
gear_ratios_editor_page, and trainer_settings_section.
3. Enforce monotonic gear-ratio ordering: when a per-gear ratio changes,
all lower gears are pulled down and all higher gears are pushed up
so the table stays non-decreasing (prop submodule bumped).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The page Column's default (center) cross-axis alignment left its
stretch-using children (_actions, _settingsSection, inner columns in
LiveMetricsSection and TrainerSettingsSection) without a bounded
cross-axis width to propagate, triggering a RenderBox-not-laid-out
assertion during performLayout. Restoring crossAxisAlignment: stretch
gives every child a tight 800-wide constraint from the outer
ConstrainedBox and cascades cleanly to the stretch-inner columns.
Also swap Container(constraints: …) for ConstrainedBox since we no
longer need the Container's padding/decoration affordances here.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The _card helpers in ConnectionCard and TrainerSettingsSection, plus the
_deviceCard helper in the page root, wrap a Container without an
explicit width. When the outer max-width Container gives loose (0..800)
constraints — which it does because Container(constraints:) does not
tighten min — these cards tried to shrink-wrap a stretching Column,
producing a RenderPadding-without-size assertion at layout time.
Setting width: double.infinity on the card Containers forces them to
take the full available width, matching the existing pattern in
GearHeroCard.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>