Commit Graph

54 Commits

Author SHA1 Message Date
Jonas Bark
40a114b913 test: housekeeping
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 20:23:17 +02:00
Jonas Bark
50ac4379ba fix(trainer): the bridge presents its own services and never waits on the trainer 2026-08-18 18:44:07 +02:00
Jonas Bark
4df41bdece fix(rouvy): keep the bridge connection stable 2026-08-16 14:13:09 +02:00
Jonas Bark
55d35b0add fix(rouvy): restore Virtual Shifting on the bridged trainer 2026-08-16 12:44:23 +02:00
Jonas Bark
27462b1c58 fix(rouvy): adjust the bridge's advertised services 2026-08-16 12:44:22 +02:00
jonas.bark@gmx.de
599e2e644d fix: let trainer apps on the network find BikeControl again
Retires the Windows IPv6 workaround instructions along with it — they no
longer apply.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-10 14:33:34 +02:00
Jonas Bark
967a123786 feat(onboarding): refresh existing copy from the design, changelog entry
Updates sramSetupIntro and sramAuthorizeBody in intl_en.arb to the
clearer design wording (English only; other locales retranslate via
Localazy), adds the setup-wizard CHANGELOG entry under 6.3.0, and fixes
a test assertion that collided with the reworded SRAM intro copy.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-09 22:16:50 +02:00
Jonas Bark
2e63bf580a fix(dircon): derive a real mDNS serial-number for WiFi trainers
The advertised serial was sliced off the raw device id. WiFi trainer ids
are `dircon://<name>` and `dircon://` is itself exactly nine characters —
the same length as the reference serial the slice was sized against — so
every WiFi-proxied trainer advertised the identical, information-free
`serial-number=dircon://`.

Strip any `scheme://` prefix before slicing, and pad short ids instead of
letting substring throw. BLE device ids keep their existing derivation,
covered by a regression test.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-07 11:30:12 +02:00
Jonas Bark
be56055587 refactor(sram): route advert-filter coverage through prop fixtures
The advertising record layout and device-type codes are prop's; this test
asserts only the app's routing decision. Renamed so the old path can be
removed from history.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-27 19:57:00 +02:00
Jonas Bark
db5cc74a12 fix(erg,sram): shared ERG stepping with boundary guards; scope §7 guard to shifting-enabled; coalesce iOS echo presses
ERG (review findings on the ±5W change):
- New ErgPowerStepping extension is the single home for the 5W step and
  500W manual cap, replacing 7 inline copies (physical buttons, hero-card
  buttons/slider, three overlay controllers).
- Boundaries are guards, not clamps: up at >=500W is a no-op like the
  disabled UI button (a 600W FTMS target is no longer slashed to 500),
  down from >500W steps relative, and an unknown baseline (hub-commanded
  ERG reports no target) is a no-op with a new localized message instead
  of slamming the trainer to ~150W.
- ERG shift-up Success carries the button again so +5W presses show
  activity feedback (missed conversion from 843f7985).

SRAM gesture:
- Same-lever repeats inside the 90ms combo window coalesce as duplicates:
  a finger can't re-press in 90ms, but iOS re-delivers a colliding read
  response of the 0xFF edge through the notify callback — it must not
  actuate twice (nor break a combo when it misdecodes to the other lever).
- The §7 multishift guard only runs while shifting is enabled — the one
  state where a held paddle actually bursts (per c94b87f0's --observe
  capture). Bonded rapid tapping and both-lever combos are never
  throttled. Timer-driven instead of DateTime.now() (deterministic under
  fakeAsync) and cleared by _resetGesture on (re)connect.
- The "set up SRAM control" warning fires once per connection, not on
  every undecoded press.

Harness:
- EmulationSession.notify drops notifications for removed peripherals so
  delayed notifies (SRAM double-tap) can't land after teardown.
- The 0xFF press edge is SramAxsConstants.triggerEdge at all call sites;
  the emulation test waits on the named TRIGGER_UUID constant.
- New coverage: guard behavior through processCharacteristic in both
  states, burst suppression while unbonded, all-taps-delivered once
  bonded, ERG boundary/game-set-target cases.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 17:51:35 +02:00
Jonas Bark
39e9082e53 fix(sram): don't swallow same-lever repeats; restore §7 burst guard; fix failing tests
Gesture engine: a repeat of the SAME lever inside the 90ms combo window
can't be a combo, so flush the pending click instead of overwriting it —
rapid double-taps now deliver both shifts. The old press-swallowing was
accidentally doing multishift suppression, so bring back the explicit §7
guard (forward the first two rapid triggers, drop the 3rd+ within 350ms)
that the discrete-click rework removed.

Test fixes for the rest of the failing suite:
- review_prompt_service_test: derive seeds from sessionThreshold /
  snoozeSessions instead of hardcoding the old threshold of 3
- controller_settings_signal_change_test: persist a session key and run
  handleServices so the device is bonded and the Restore branch renders
- emulated SRAM AXS profile: send real 1-byte 0xFF edges (0x01 is now
  filtered as a read-response echo), expect the generic 'SRAM Button'
  name, and wait for the app's trigger subscription before tapping so
  the press can't land mid-connect and get wiped by the gesture reset

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 16:24:01 +02:00
Jonas Bark
ff2a2aace7 Merge branch '6.2-beta' into 6.3
# Conflicts:
#	lib/bluetooth/devices/sram/sram_axs.dart
#	lib/pages/controller_settings.dart
2026-07-09 15:07:49 +02:00
Jonas Bark
c94b87f08a feat(sram): discrete-click gesture + "both levers" front-shift combo
A SRAM press is a single 0xFF edge on d9050054 — no release event, and (with
shifting disabled) no multishift burst. An --observe capture confirmed a HELD
lever emits exactly one edge, so a hold is indistinguishable from a tap and
long-press cannot be reconstructed. Replace the old instant-down+up-per-edge
guard with a small assembler that treats every press as a discrete CLICK and
reconstructs the one thing the base device can't get from the raw edges — "both
levers at once":

- a press is buffered for a short combo window; if the other lever's press lands
  inside it, both buttons are emitted together in ONE call so the base device's
  _maybeHandleFrontShiftCombo fires frontShift ({shiftUp,shiftDown}) and
  suppresses the rear shifts — the "left+right together" goal;
- otherwise the single button clicks (down+up). Single vs double click is left
  to the base device (two discrete taps in its double-click window);
- supportsLongPress is set false — it's not achievable on this hardware.

Buffer/timer reset on (re)connect and cancelled on disconnect. Single clicks now
land ~_comboWindow (90ms) after the press instead of waiting on a release that
never comes. Combo detection still needs a two-lever hardware check.

Tests: fakeAsync coverage for a single discrete click, both-levers-together one
click, a held (single-edge) lever as a single click, and two spaced taps as two
clicks.
2026-07-09 14:49:28 +02:00
Jonas Bark
3778136411 fix(sram): differentiate left/right shifters and default one lever to shift down
Testers reported both AXS shifters doing the same thing and gears only ever
increasing, with presses logged as a generic "SRAM Paddle". Root cause: both
drop-bar paddles report button mask 1, so the mask alone can't tell them apart,
and every discovered button was hardcoded to InGameAction.shiftUp.

- Use the button event's controller device_type (prop SramPress.deviceType,
  field 2) to name and key buttons, so left and right become distinct keymap
  entries even in a plaintext (serial-less) session — the common case in the
  field. Names now resolve to "SRAM Left/Right Shifter" without needing an
  advert or the sparse d9050003 serial.
- Default the LEFT paddle to shift DOWN and everything else to shift UP so the
  shifters aren't identical out of the box ("one lever changes down") without
  hunting through the keymap. Every button stays freely remappable.
- Persist the device_type in the button record so a restart re-registers the
  same left/right name + default instead of a duplicate entry; two serial-less
  paddles that differ only by side stay separate, and a legacy side-less record
  upgrades in place once the side is known.
- Remember a shifter's side against its serial (preserving any known model) when
  both are seen, so its other buttons resolve the same name.
- Bump the prop submodule to the field-2 decode.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H48NvkfXYm2spiiwcTQsv8

# Conflicts:
#	prop
2026-07-09 09:20:12 +02:00
Jonas Bark
d2a5d188bf Use 5W ERG steps for physical shifter buttons, matching on-screen controls
Physical remote/shifter buttons adjusted ERG target power in 10W jumps
while the on-screen and overlay +/- buttons use 5W. Align the button
action path to 5W and apply the same 0-500W clamp as the UI.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 09:19:22 +02:00
Jonas Bark
50c3b6de09 fix(sram): cap guided sheet width on wide displays
The setup/restore bottom sheet spans the full window width; on desktop
that stretched the content unpleasantly. Centre it and cap it at 480
(heightFactor: 1 keeps the sheet shrink-wrapped to its content height).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-09 09:19:22 +02:00
Jonas Bark
bdfbe4395c fix(sram): differentiate left/right shifters and default one lever to shift down
Testers reported both AXS shifters doing the same thing and gears only ever
increasing, with presses logged as a generic "SRAM Paddle". Root cause: both
drop-bar paddles report button mask 1, so the mask alone can't tell them apart,
and every discovered button was hardcoded to InGameAction.shiftUp.

- Use the button event's controller device_type (prop SramPress.deviceType,
  field 2) to name and key buttons, so left and right become distinct keymap
  entries even in a plaintext (serial-less) session — the common case in the
  field. Names now resolve to "SRAM Left/Right Shifter" without needing an
  advert or the sparse d9050003 serial.
- Default the LEFT paddle to shift DOWN and everything else to shift UP so the
  shifters aren't identical out of the box ("one lever changes down") without
  hunting through the keymap. Every button stays freely remappable.
- Persist the device_type in the button record so a restart re-registers the
  same left/right name + default instead of a duplicate entry; two serial-less
  paddles that differ only by side stay separate, and a legacy side-less record
  upgrades in place once the side is known.
- Remember a shifter's side against its serial (preserving any known model) when
  both are seen, so its other buttons resolve the same name.
- Bump the prop submodule to the field-2 decode.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H48NvkfXYm2spiiwcTQsv8
2026-07-09 09:12:41 +02:00
Jonas Bark
c8776bd9bf Use 5W ERG steps for physical shifter buttons, matching on-screen controls
Physical remote/shifter buttons adjusted ERG target power in 10W jumps
while the on-screen and overlay +/- buttons use 5W. Align the button
action path to 5W and apply the same 0-500W clamp as the UI.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 08:10:19 +02:00
Jonas Bark
cd61f83045 fix(sram): cap guided sheet width on wide displays
The setup/restore bottom sheet spans the full window width; on desktop
that stretched the content unpleasantly. Centre it and cap it at 480
(heightFactor: 1 keeps the sheet shrink-wrapped to its content height).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 15:05:48 +02:00
Jonas Bark
e310adbceb Merge branch '6.2' into 6.3
Brings SRAM AXS shifter support, beta-access/Shorebird track, and the
battery-saver timeout fix into 6.3. Merged the prop submodule (83f4bf9) so the
SRAM parser/button-tables and the Climb protocol coexist. Resolved: CHANGELOG
(SRAM AXS folded into 6.3.0), the prop pointer, and repointed the SRAM
integration test to the fake-BLE harness that 6.3 promoted into lib/.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 12:04:00 +02:00
Jonas Bark
bc3b6c7a7b i18n(sram): localize the SRAM setup/restore UI strings (en/de/es/fr/it/pl)
Externalize the panel + guided-dialog strings into intl_*.arb across all six
languages and wire sram_axs.dart to context.i18n. Button/log labels stay in
English (technical identifiers). Regenerated lib/gen is gitignored.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 18:51:49 +02:00
Jonas Bark
9d4684922b fix(sram): suppress multishift bursts; only prompt authorize when a bond is needed
Add the protocol §7 multishift/hold guard: a held paddle makes the derailleur
emit a rapid burst of triggers — forward the first two (so a real double-click
still reaches the base device) and drop the 3rd+ rapid one, fixing a runaway
press loop. Also make the guided setup/restore dialog try the operation first
and only ask the user to press-and-hold the AXS button if a fresh bond is
actually required — no re-authorize prompt when already bonded.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 17:51:00 +02:00
Jonas Bark
df1cebd326 fix(sram): exclude non-button components from pre-registration; stabilize names
sramShifterAdverts now gates on effectiveType (no model escape hatch), so a
front derailleur or dropper post no longer mints a phantom paddle button.
Persist each shifter's advertised type/model by serial so a button's §6.4 name
survives sessions where the shifter isn't advertising, instead of orphaning the
keymap mapping.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 17:34:52 +02:00
Jonas Bark
821ba2d0fe feat(sram): connect only to the rear derailleur; name buttons per shifter type
Filter scan results to the RD (device-type record in the 0xFE51 advertising
service data, §2), so we no longer create a controller for bare shifters. Name
buttons from the pressing shifter's advertised type/model (§6.4 — Left/Right
Shifter, Aux Top, Bonus, ...) and pre-register nearby shifters' buttons on
connect so they appear without a press; degrade to Shifter A/B when no advert.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 17:17:18 +02:00
Jonas Bark
2e59a71518 feat(sram): interactive setup dialog on the main card with visible errors
Move the setup/restore panel onto the main device card (showAdditionalInformation)
and make setup a guided dialog: instructions to press-and-hold the AXS button →
progress → success, or the actual error (e.g. bond authorization failure) with a
Retry, instead of only logging to the console. Restore surfaces a toast.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 16:04:27 +02:00
Jonas Bark
200ee36e1b refactor(sram): use BikeControl's built-in double-click, drop custom gesture layer
Each physical (shifter, button) now emits one press so the base device
handles single/double click from the keymap, like every other controller.
Removes the SRAM-specific tap-count timer and the double-click-window setting/UI.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 14:47:13 +02:00
Jonas Bark
01ec230a2b feat(sram): guided setup / restore preferences panel
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 14:11:04 +02:00
Jonas Bark
e2475a9b76 feat(sram): decode presses into per-shifter/button model via prop logic
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 14:04:10 +02:00
Jonas Bark
c1ca003cf4 feat(sram): universal_ble transport implementation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 13:36:38 +02:00
Jonas Bark
34e60a498a fix(emulation): routing fallback for forgotten ids, capped write log, Di2 per-press baseline 2026-07-02 12:01:17 +02:00
Jonas Bark
c95eb147c3 feat(emulation): EmulationManager, profiles model, Click/Ride profiles, debug platform install
Adds the EmulationProfile/EmulatedInput model, EmulationManager +
EmulationSession, removePeripheral on the fake BLE platform, the first two
device profiles (Zwift Click + Ride) with an allEmulationProfiles registry,
core.emulation, and the debug-only RoutingBlePlatform install in main().
2026-07-02 09:45:12 +02:00
Jonas Bark
34c523eb58 feat(emulation): RoutingBlePlatform + real-platform factory 2026-07-02 09:28:32 +02:00
Jonas Bark
20ea804198 Reapply "refactor(emulation): promote fake BLE harness from test/ to lib/bluetooth/emulation"
This reverts commit 0346594c2e.
2026-07-02 09:14:48 +02:00
Jonas Bark
0346594c2e Revert "refactor(emulation): promote fake BLE harness from test/ to lib/bluetooth/emulation"
This reverts commit 45e987ef97.
2026-07-02 09:06:53 +02:00
Jonas Bark
45e987ef97 refactor(emulation): promote fake BLE harness from test/ to lib/bluetooth/emulation 2026-07-02 09:05:06 +02:00
Jonas Bark
69109184a7 feat(rizer): EliteRizer steering (calibration + PWM to steer actions)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 23:55:17 +02:00
Jonas Bark
acedcd36df feat(rizer): Elite Rizer incline protocol + encoder
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 23:45:19 +02:00
Jonas Bark
fc83374306 refactor(incline): drive dispatch/sink-selection/UI off any incline device
- connection.dart: add inclineDevices getter (ManualInclineDevice) and
  generalize sinkProvider to pick any connected InclineSink, not just
  WahooKickrClimb; relay fallback unchanged
- base_actions.dart: dispatch incline actions to inclineDevices, not
  climbAccessories; error message now says "No incline device connected"
- button_edit.dart: gate incline card on inclineDevices, title uses
  inclineActions l10n key (generic "Incline")
- keymap.dart: hasActiveAction incline clause gates on inclineDevices
- incline_controller.dart: reset _lastWritten on manual hold so returning
  to auto re-asserts the grade even when grade equals last auto-written value
- incline_controller_test.dart: add re-asserts-after-manual-hold test

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 23:40:41 +02:00
Jonas Bark
8bd23d7385 refactor(incline): rename Climb incline pipeline to device-agnostic Incline*
ClimbInclineSink → InclineSink, ClimbController → InclineController,
ClimbManualState → InclineManualState, ClimbMode → InclineMode.
Moves lib/bluetooth/climb/{climb_incline_sink,climb_manual_state,climb_controller}.dart
→ lib/bluetooth/incline/{incline_sink,incline_manual_state,incline_controller}.dart
and corresponding tests. Decouples InclineManualState from wahoo_climb.dart
constants (own kInclineManualMinGrade001/kInclineManualMaxGrade001, same values).
WahooKickrClimb and _ClimbRelaySink stay Climb-named; no behavior changes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 23:27:58 +02:00
Jonas Bark
4a7637a815 feat(climb): ClimbController 1 Hz pipeline + Connection wiring
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 21:47:45 +02:00
Jonas Bark
2fdbf376c3 feat(climb): pure ClimbManualState (auto/manual/step/clamp)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 21:00:30 +02:00
Jonas Bark
42c246799d Merge feat/screen-recording into 6.2: screen recording action (Android + macOS) + changelog 2026-06-24 20:21:47 +02:00
Jonas Bark
7c9ee4f747 feat: same-frame both-shifters combo → frontShift (Ride/Click)
Detect when a single BLE frame carries both the shiftUp-mapped and
shiftDown-mapped buttons (Zwift Ride / Click single-device controllers)
and emit a single frontShift, suppressing the two rear shifts.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 16:43:33 +02:00
Jonas Bark
81f5a433a6 feat: both-shifters combo (coincidence window) + BaseActions helpers
Add frontShiftComboEnabled getter, performInGameAction synthetic dispatch,
and a coincidence-window detector to BaseActions for two-device controllers
(e.g. Zwift Play) whose shifts arrive as separate performAction calls. When
the opposite rear shift lands within 120 ms, additively emit a frontShift
(the two rear shifts cancel; the front ring toggles). Reuses the existing
trainer-action/direct-connect routing rather than extracting a dispatcher.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 16:34:41 +02:00
Jonas Bark
e0cdd71e28 feat: route frontShift to FitnessBikeDefinition (direct path)
Add frontShift case to handleTrainerAction: ERG mode returns Ignored,
disabled returns Ignored, sim mode toggles front ring and returns
Success with large/small ring message. Add 3 ARB keys (6 locales) and
4 TDD tests in the consolidated test file.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 15:52:00 +02:00
Jonas Bark
843f798537 cleanup 2026-06-18 16:30:01 +02:00
Jonas Bark
e9e7425c29 Integration tests: controller connections + virtual shifting through fake platform seams
Add test/integration with platform fakes installed at the plugin seams
(UniversalBle.setInstance, NsdPlatformInterface.instance); everything
above them — Connection, device classification, protocol parsers, press
state machine, keymaps, ProxyDevice — is the real code:

- controller_connection_test: scan→classification (Zwift Click/Ride via
  manufacturer data, Di2 via service UUID, FTMS trainer→ProxyDevice,
  ignored names/devices), connect lifecycle (device-info reads, battery,
  RideOn handshake, subscriptions), drops, dedupe, forget list.
- controller_button_chain_test: byte-accurate BLE notifications through
  the full reaction chain — single/double/long press, trigger remapping,
  duplicate-frame dedupe, unmapped-button error surfacing, multi-button
  Ride presses.
- virtual_shifting_connection_logic_test: retrofit-mode defaults (WiFi /
  BT-wins / proxy for power meters), auto-connect consent gating,
  in-place "No connection" disconnect + in-place reconnect, WiFi trainer
  discovery rules (found/lost/connected-survives-flap, self-exclusion),
  and an end-to-end Click-press → real action pipeline → gear shift.

Protocol-level coverage (DirCon over real TCP, BLE peripheral) lives in
the prop submodule's own tests — no prop internals in this repo.

Bug fix found by these tests: Connection.disconnect(keepInList: true)
was defeated — UniversalBle.disconnect resolves only after the platform
disconnect event, so the still-attached connectionStream listener
re-entered disconnect() without keepInList and dropped the device,
orphaning the object the open details page holds (the exact bug
0db8cf0c addressed). Guarded via _inPlaceDisconnects.

Also update stale tests to current behavior: sim-mode shifts return
Ignored since e0e4494d (handled by the bridge, not forwarded, logged
neutrally), ControllerButton.initials direction arrows, and skip the
third BC2 state-machine test consistently with its siblings.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 18:59:14 +02:00
Jonas Bark
0db8cf0c31 Keep the device registered on in-place "No connection" disconnect
The "No connection" picker entry disconnects without leaving the details
page, but Connection.disconnect(forget: false) removed the ProxyDevice
from the registry (isResetting is false). The open page kept the now
orphaned object: rediscovery built a *new* ProxyDevice while the page
still pointed at the old one, so selecting Virtual Shifting again
reconnected a device absent from bluetoothDevices — its BLE notifications
were rejected ("Device not found") and the connection was force-dropped.

Add a keepInList flag to disconnect; the in-place "No connection" path
passes it so the same device object stays registered (and its scan
result is retained to avoid a churned duplicate) and remains
reconnectable on the same card. The Disconnect buttons, which pop the
page, keep the default removing behaviour.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 14:14:48 +02:00
Jonas Bark
60817dabee Smart Trainer card: stable keys, reconnect rebinding, awaited mDNS stop, No-connection UX
- 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>
2026-06-10 14:06:12 +02:00
Jonas Bark
72d26000e1 warn when connecting smart trainer 2026-05-07 15:57:02 +02:00