The keymap ('app') and the trainer app ('trainer_app') are independent
prefs. When the keymap one is missing while a trainer app is selected,
actionHandler.supportedApp stays null — every button press then threw
"Null check operator used on a null value" and the device registered no
buttons at all, so the SRAM edit screen came up empty.
- RemoteActions/DesktopActions/AndroidActions no longer dereference
supportedApp (or getKeyPair) with `!`; they return the same
noKeymapSet / noActionAssigned Error BaseActions already produces.
- Fall back to the selected trainer app when the keymap pref can't be
resolved (initializeActions, Settings.init, deleteCustomAppProfile).
- BaseDevice.getOrAddButton keeps the created button in availableButtons
even without a keymap, so the device still renders its buttons.
- The OBC BLE/mDNS emulators evaluated connectedApp.value! before the
null guard that follows, making the guard dead code — reordered.
- handleButtonsClicked now forwards through recordError, which is why
this never showed up in crash reporting.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
undelivered shifts
Three things.
The chain's 68 strings existed only in English, so five locales fell back
to it on the app's main screen. Now translated, in each file's own register
— informal second person throughout, matching the copy already around
them. Polish needed a `few` plural category for the step and day counters:
it uses a distinct form for 2-4, so `other` would have rendered "Zostały 2
kroków" instead of "kroki". Two keys written speculatively and never wired
up are dropped rather than sent to five translators.
The checklist's summary row sat inside a Button whose own padding inset it
past the steps below, and the leading glyphs differed in both width (15px
icon, 17px tick) and gap, so matching the outer inset alone would not have
lined them up. One _rowInset / _leadingSize / _leadingGap now governs both,
with the glyphs centred in a box of equal width. Two tests pin the tick and
the label columns, because this is exactly what drifts back unnoticed.
Finally, shifting with a trainer connected but no app holding the bridge
was charged to the daily command budget. Those shifts reach nothing. The
existing exemption only covered the case where the 20-minute
virtual-shifting budget was already ticking — that avoids double-billing —
so it grows a second reason: a command that was never delivered anywhere is
not a command the rider spent.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- 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>
When the active FitnessBikeDefinition handles a trainer action internally
(gear shift, front shift, mode switch, intensity), don't count it against
the daily command limit for a free tester whose bridge session is still
counting down — no Pro on this device, no full version, and the 20-minute
budget not yet exhausted. All other counting paths are unchanged.
The increment now runs after handleTrainerAction so the decision can key
off whether the FBD actually handled the action. Gating lives in the pure,
testable BaseActions.isExemptInternalTrainerAction and is applied in both
the performAction trainer branch and the both-shifters combo path. Bumps
the prop submodule to its 6.3 branch for the new isCountingDown getter.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VRVXtrmcgtKKz46AVDyqQp
- FrontShiftCard now applies its toggle/chainring changes to the live
FitnessBikeDefinition (not just the persisted config), so enabling the
virtual front derailleur takes effect immediately instead of only after a
reconnect/mode-switch — the combo gate read the config while the action
checked the def, so the just-enabled feature reported itself disabled.
- Bound the small-ring stepper to the large ring so small can't exceed large
(which inverted the ratio and made the shift a no-op).
- Error-handle the fire-and-forget front-shift combo so a throw is recorded
instead of becoming an unobserved async error.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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>
Pressing a virtual-shifting button after the trainer app (Zwift) had
disconnected logged the misleading "Could not perform <key>: No action
assigned" — but an action *is* assigned; the trainer app just isn't
connected to receive it.
Root cause: a pure in-game action (gear shift) has no keyboard/touch
fallback, so when no trainer app accepts it the press fell through to the
platform keyboard path, which reports "no action assigned". This only
surfaced with local control enabled, because `local` counts as a
"connected" trainer connection yet its sendAction always returns
NotHandled — so isTrainerConnected() was true and the generic
"no connection method active" guard was bypassed.
Fix: detect delivery failure after _handleDirectConnect. When a
trainer-app-only keypair (KeyPair.isTrainerAppActionOnly — an in-game
action with no keyboard/touch/command/screenshot fallback, excluding
headwind/trainer-control which target a proxy/accessory) goes unhandled,
report "Could not perform <key>: <app> is not connected" instead. Such
keypairs also now skip the generic isTrainerConnected early-return so the
specific message wins consistently. Keypairs with a keyboard fallback are
untouched and still fall through to the keyboard.
Tests: KeyPair.isTrainerAppActionOnly discrimination (keyboard/touch/
command fallback and outside-trainer-app actions excluded) and an
end-to-end regression covering the exact #367 trigger (local control on).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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>