Commit Graph

7 Commits

Author SHA1 Message Date
Jonas Bark
67e405e6ad fix: name the Click V2 unlock mode, and say where unlocking happens
The card showed only "Entsperrmodus" and "Erneut einrichten", so it looked
identical whichever mode was set and coming back from the explainer read as
if the choice had done nothing. Name the mode that is actually set, modelled
as the three states the setup can rest in — unlock-with-Zwift, right-side-
only, and the legacy restart loop — resolved in one place so both pucks name
the same mode the same way.

The missing unlock option was real, too. unlockWarnings — which carries
"Jetzt freischalten" — is rendered only by the left puck and the legacy
unified controller, and returns nothing without a connection; the right puck
never carried it, correctly, since the left one is what Zwift locks. So in
Zwift mode with the left puck off, asleep or not yet rediscovered, the action
existed nowhere and the card sat silent. Point at the left controller in that
case instead. When it is connected nothing changes: the left card shows the
real unlock UI and the right card stays quiet.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-13 08:37:18 +02:00
Jonas Bark
74bb2737ba fix: UI feedback round — remembered devices, Click V2 unlock, paywall, Pro dialog
- Remembered controllers offer a single "Forget" instead of two disconnect
  variants: there is no link to drop on a device that isn't here.
- Click V2: drop the unlock-mode dropdown and the new-unlock-method toggle.
  The explainer stays the one place the mode is chosen — it also does the
  follow-on work (un-ignoring the left puck, the right-side-only remap,
  cancelling the reset timer) that the bare dropdown never did. "Set up
  again" now sits on the right puck's card too.
- Paywall: the Base column reads "Basis"/"Base" rather than "VOLL"/"FULL",
  and the one-time Base card moves above the Pro plans so top-to-bottom
  matches the comparison table's left-to-right.
- A remembered controller's own settings page shows its button mapping
  again. The gate counted live controllers only and KeymapExplanation
  looked its filterDevice up in the live list, so the page fell through to
  a warning about connection methods, which had nothing to do with it.
- showGoProDialog takes a feature name for its title, so the keymap sync
  cloud icon says what it does instead of only "Pro Feature".

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-13 07:50:34 +02:00
Jonas Bark
ff8d393046 fix(click-v2): apply pre-merge review fixes to onboarding flow
Fixes five review findings on the Click V2 onboarding branch:

1. "Set up again" now performs the same ClickLogic side effects
   (setupHandshake / resetTimer) the connect-time flow does for an
   already-connected left side, and refreshes UnlockToggle's state on
   return instead of leaving it stale.
2. ClickV2OnboardingCard gained an onCompleted callback (wired to
   DevicePage.onUpdate) so the device list refreshes even when no
   connectionStream event fires after the onboarding page closes.
3. A connect failure in ClickV2Onboarding._connectPending() now also
   surfaces a user-visible AlertNotification, not just a logged error.
   New l10n key clickV2Onboarding_connectFailed added in all six
   languages.
4. ClickV2OnboardingPage now builds its staggered-entrance
   CurvedAnimations once in initState instead of one per row per
   build, fixing an unbounded status-listener leak on _rows.
5. pendingDevices is intentionally left ungated on isPending (gating
   it would break _connectPending, which needs it precisely because
   isPending already flipped false) but is now correctly documented,
   and _connectPending skips devices the battery saver suppressed via
   the new Connection.isAutoReconnectSuppressed.

Also drops the redundant flutter/widgets.dart import from
click_v2_onboarding.dart (shadcn_flutter re-exports PageView/
PageController).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011GcRAUvS3gwjmfi2qJipcc
2026-08-03 18:14:06 +02:00
Jonas Bark
37152aafbe feat(click-v2): reopen the onboarding explainer from the unlock-mode selector
Adds a ghost "Set up again" button beside the Unlock mode label in
UnlockToggle so the Click V2 explainer stays reachable after the
one-time onboarding flow completes.

Also guards ClickLogic.setupHandshake against a null `services`: a
device's isConnected can flip true (via the raw BLE connection-state
listener) before connect() finishes assigning services, so the prior
force-unwrap could throw on that narrow race. The setting write still
happens either way; only the handshake is skipped, and skipping is
logged via a LogNotification rather than swallowed.
2026-08-03 16:20:11 +02:00
Jonas Bark
365893256d UX 2026-06-07 08:32:14 +02:00
Jonas Bark
27919882b4 Fix UX, translation 2026-06-06 20:20:29 +02:00
Jonas Bark
8f221245cc new unlock method 2026-06-06 19:54:00 +02:00