Commit Graph

1476 Commits

Author SHA1 Message Date
Jonas Acker
6320134602 Merge review fixes: Android key capture 2026-11-30 20:41:52 +01:00
Jonas Acker
c5729f9903 Merge review fixes: gears and virtual shifting
# Conflicts:
#	lib/services/overlay/android_overlay_controller.dart
#	lib/services/overlay/desktop_overlay_controller.dart
#	lib/services/overlay/ios_overlay_controller.dart
#	lib/widgets/drivetrain/drivetrain_controls.dart
#	prop
2026-11-30 20:34:36 +01:00
Jonas Acker
bab932d77f Keyboard-only error: say "not connected", suggest the network method only where it exists
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 20:20:56 +01:00
Jonas Acker
bc43321337 Android: show the full accessibility disclosure before touch control
The keys-only disclosure (trainer app on another device) does not cover
touch gestures. The accepted disclosure is now remembered; "This device"
asks for the full one even when the service is already on, and gestures
and global actions are refused without it. Riders who used "This device"
before keep their consent. The keys-only text now says the service reads
which app is in front.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 20:20:01 +01:00
Jonas Acker
ba76657045 Leave store free Pro trials out of the rating prompt's owner gate
RevenueCat reports a free trial period on the store builds; a rider in
one has not paid yet. Stripe-build trials stay invisible client-side.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 20:17:49 +01:00
Jonas Acker
4d191a1f77 Tell auth failures apart from network ones and keep Strava's upload id
A missing session or failed token refresh was reported as 'network',
which refresh and the automatic upload ignore. It is now 'auth' and
reported. Strava's upload id is written before polling, so a failing
poll leaves a ride that resumes instead of uploading twice, and the
automatic upload's failure write can no longer throw out of the loop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 20:16:58 +01:00
Jonas Acker
489a221cc9 Keep the OBC shift mirror from spamming and drifting
Mirror the rear sprocket with the front derailleur on, so a front shift
sends no presses instead of a cassette's worth. Owe shifts to an app that
is attached but unreachable, start a (re)connected app from the current
gear, and re-baseline on a trainer or gear-count change instead of
sending the jump as a burst.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 20:15:47 +01:00
Jonas Acker
223d96f0d0 Android keys: follow the profile in use, ignore per device, spare built-in keys
- The background key list follows the action handler's profile, also when
  it is replaced without init (auto-copy on first key, duplicate, rename,
  Click V2 right-side remap).
- Keys register without a target too; dispose clears the native key list,
  and the service takes no key while no Flutter engine listens.
- Ignore is per device (by Android device name), persisted in the ignored
  devices list with undo, instead of a process-wide flag.
- Before Android 10, built-in keys (volume rocker, nav keys, on-screen
  keyboard) are no longer treated as remotes.
- Keys are left to a focused BikeControl text field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 20:15:43 +01:00
Jonas Acker
da2c8490da Ask for the automatic rating only with BikeControl in the foreground
The prompt fired the moment a qualifying session ended, usually with the
trainer app in front. iOS/Play then show nothing but the request still
counted as the one ask. Wait for the app to be resumed first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 20:13:04 +01:00
Jonas Acker
270e1e1a1a Route on-screen shifts through one path that follows the app's gears
The home card, drivetrain page and overlays shifted the bridge directly,
so with "Use the app's gears" on a shift landed briefly until the app's
next ratio undid it, and the ring toggle stayed reachable. shiftGear()
hands the shift to the app in that mode; the ring toggle is hidden and
inert there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 20:10:45 +01:00
Jonas Acker
c14c8d046d Zone mode engine: hold a limit in ERG, hand back to SIM
- ZoneModeEngine: once a second, 3 s power vs the range; outside it for
  the trigger time it holds the limit in sticky ERG (ramping up to a
  floor, straight to a ceiling) for the hold time, then hands back to the
  mode the rider came from (bump prop: exitErgMode can resume virtual
  shifting) and waits out 30 s. Pauses under 20 rpm, sleeps during ERG it
  did not set, yields to a rider who moves its target.
- Feedback: zone in/out chimes (own sound switch), phone buzz, toast, and
  a system notification while BikeControl is in the background
- "Trainer: Zone mode" button: back to SIM while holding, else on/off;
  shifts move the gear and SIM/ERG hands back while it holds; Power Lock's
  alert stays quiet for Zone mode's hold
- iOS Live Activity and PiP: ZONE pill with arrow, countdown, Back to SIM
- Controller loads its settings lazily

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 19:17:02 +01:00
Jonas Acker
366bf7f95b Zone mode UI: SIM | ZONE | ERG, zone band, overlay pill, settings
Zone mode is SIM with a power floor and ceiling held in ERG. This adds
its settings and screens; the engine that watches power and drives the
trainer comes next and publishes ZoneModeController.status.

- ZoneModeConfig/Controller: app-wide, range in W, % FTP or a Coggan
  zone, trigger and hold times, sound; Pro and FTP aware
- Ride card: ZONE segment, zone band under the readings, enforcing strip
  with countdown and Back to SIM; − / + off while it holds a limit
- Overlay: ZONE pill with arrow, countdown in the GEAR line, tap to hand
  back; window and + keep their place when it steps in
- Settings → Zone mode, linked from Settings and virtual shifting
- Strings in all locales

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 18:16:02 +01:00
Jonas Acker
0cddfd909b Merge feat/follow-app-gears into 8.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# 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/i10n/intl_zh.arb
2026-11-30 14:41:10 +01:00
Jonas Acker
f0fce75eb7 List screenshots BikeControl captured during a ride on the ride's page
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 14:20:27 +01:00
Jonas Acker
de04f2788e Support chat: route an email or sign-in code typed into the chat to the account card
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 14:13:46 +01:00
Jonas Acker
527ffb7d71 Debug hook: apply front shifting to the running trainer
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 13:45:26 +01:00
Jonas Acker
4fafb3f21a Debug hook: toggle front shifting
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 11:46:32 +01:00
Jonas Acker
b2fb8a7ffa Add debug-build service extensions for driving the app
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 11:36:33 +01:00
Jonas Acker
e6adbedea6 Show BikeControl's gear in TrainingPeaks Virtual
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 09:44:08 +01:00
Jonas Acker
fe8ac29adc Add option to use Zwift's or Rouvy's own gears
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 09:23:07 +01:00
Jonas Acker
923a871b7d Android: accessibility disclosure describes key capture when the trainer app is on another device
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 14:39:16 +01:00
Jonas Acker
3eb67b2f5d Share row no longer promises Strava and Garmin; Strava review screenshots
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 14:31:55 +01:00
jonasbark
4f6035fa25 Merge pull request #546 from OpenBikeControl/fix/android-media-remote-other-device
Android: media remotes work with the trainer app on another device
2026-11-29 14:24:36 +01:00
Jonas Acker
1bdcc20219 Upload rides to Strava and intervals.icu; Garmin via its import page
Connect an account in Settings > Connected accounts (in the browser, through
bikecontrol.app/connect/<service>); rides upload by hand from Export or
automatically once saved. Tokens stay in the activity-sync function. Garmin
has no upload API for us and its app files a shared .fit as a course, so the
Garmin row saves the file and opens Connect's import page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 12:44:18 +01:00
Jonas Acker
05629cc1ea Android: offer the accessibility service for every target, clean up replaced action handlers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 12:17:15 +01:00
Jonas Acker
8290d9f81d Android: take HID keys from the accessibility service for every target
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 11:54:32 +01:00
jonasbark
5fa34d058e Explain keyboard-only limits instead of 'does not support it' (#545)
With Local (keyboard) as the only connection, an action without a key
(e.g. Zwift's Ride On Bomb) said the trainer app doesn't support it.
Now it says the app has no keyboard command for it and points to the
network connection method.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 11:52:50 +01:00
Jonas Acker
6d9dcb4a4b Trainer Controls: lock the page to landscape for sideways phone mounts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 10:17:51 +01:00
jonasbark
5c8a652c32 Merge pull request #539 from OpenBikeControl/feat/review-prompt-paid-only
Ask Base and Pro owners for a rating directly
2026-11-27 13:08:07 +01:00
Jonas Acker
919c68ff9f Go straight to the rating sheet, no dialog first
The automatic prompt now requests the store's own rating sheet directly
instead of opening the feedback bottom sheet. That sheet stays reachable
from the menu's Feedback entry.

Unlike the tap path, the automatic one never falls back to opening the
store listing, and only marks the ask done when a sheet was actually
requested.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-11-27 12:55:59 +01:00
Jonas Acker
c228ec7cd5 Only ask Base and Pro owners for feedback
The feedback/rating sheet now requires an owned paid tier: Base bought
outright or an active Pro entitlement. Replaces the trial-only gate,
which let a free rider past it once their trial had expired.

ownsPaidTier is required, so no construction site can drop the gate by
leaving it out.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-11-27 11:37:59 +01:00
Jonas Acker
0d5718f8f9 Show Rouvy's Up/Down under Navigate
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 10:38:58 +01:00
Jonas Acker
0cfc722c14 7.7.3+174; Black Friday trial on the Stripe builds is one month
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 11:52:59 +01:00
Jonas Acker
eae9586867 Paywall: show the free trial on Pro Yearly
Store builds read the trial from the yearly product the Pro button buys
(App Store intro price at 0 + intro eligibility, Play default option's
free phase); Stripe builds show 2 months free inside the Black Friday
window. Badge on the yearly plan, trial label on the button and the
length plus the price after it right under the button (Apple 3.1.2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 11:12:15 +01:00
Jonas Acker
d3e75d0e69 fix(ios): end leftover gear Live Activity and really quit from Settings
A swipe-kill only ends the Live Activities the plugin created in that same
process, never one adopted from an earlier launch, so the gear island could
outlive the app, reopen it on every tap, and resist both its own stop button
and Settings > Close and quit (that launch tracked no activity and had no
button handler installed).

- clear leftover activities at iOS startup
- hide() ends every activity, not only the one this launch tracked
- install the island button handler when the controller is created
- close and quit exits the process on iOS, where SystemNavigator.pop() is ignored

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 09:19:05 +01:00
Jonas Acker
bb3e5d5ce8 Microsoft Store sync: don't send an empty collections ID key
The Store returns an empty string, not an error, when it can't make one
(seen on an unpackaged Windows build).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:07:19 +01:00
Jonas Acker
eac04bc348 Microsoft Store: record a Base purchase on the account for the Black Friday deal
After a Store purchase, and once per account at sign-in, the app asks the
backend (ms-store-sync) for a service ticket, turns it into a collections
ID key (new native getCustomerCollectionsIdKey, StoreContext
.GetCustomerCollectionsIdAsync) and hands it back; the backend reads the
Store's acquiredDate and records the Base. The deal is now offered on the
Microsoft Store build too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:00:56 +01:00
Jonas Acker
b60f4d6b19 Paywall: say on Black Friday that Base bought today works on every device
Replaces the store-bound note on the Base card during the promotion
window, on the builds whose purchase reaches the account (App Store, Mac
App Store, Play, Windows download), with a sign-in hint when signed out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 16:51:44 +01:00
Jonas Acker
340bbfd364 Unlock Base on every platform for a base_any_platform entitlement
The backend reports base_any_platform for a Base bought during a
cross-platform promotion. Signed in, every build now unlocks Base for it,
and a store check that finds no purchase on this device no longer clears
a purchase the entitlements still grant.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 16:51:44 +01:00
Jonas Acker
d73e177b32 KICKR BIKE steer: restore the rider's latest mapping, not the oldest snapshot
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 13:22:50 +01:00
Jonas Acker
dd2136472d 7.7.0: the nine new OpenBikeControl apps in the changelog and linked to smarttrainerapps.com
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 16:19:00 +01:00
Jonas Acker
edbd161289 Onboarding: Bluetooth-only apps get the Bluetooth method and its permission
Picking where Grimpa, Biketerra or Ride Cave runs switched on the
OpenBikeControl network method, which these apps can't use, and left
Bluetooth off. It switches on their Bluetooth method now. On Android the
controller step asks for the advertise permission in the same sheet as the
scan ones (a refusal never holds the scan), and the method starts once
granted, or on the ride step when it was granted before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 16:07:32 +01:00
Jonas Acker
f492875ce7 Merge remote-tracking branch 'origin/main' into 7.7 2026-11-24 15:56:52 +01:00
Jonas Acker
71446081fc Android: the notification's "Close" removes the gear overlay too
The overlay runs in a service of its own, so closeAndQuit left it floating
over other apps after BikeControl had quit. It is closed first now, not
switched off, so it comes back on the next ride.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 15:50:29 +01:00
Jonas Acker
7e33d96997 Onboarding app grid: outlined seal top-left, smarttrainerapps.com link and Grimpa code
The official seal is now white with a black outline and sits in the tile's
top-left corner; the selection check moves to the top-right. The picked
app's spotlight links its smarttrainerapps.com entry (ref=bikecontrol), and
Grimpa, now first among the officially supported apps, shows its rider
code BIKECONTROL (20% off the first Grimpa Plus purchase) with a copy button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 15:43:08 +01:00
Jonas Acker
a9bd95dbf9 feat(apps): nine more trainer apps support OpenBikeControl
PedalCraft, suffer.online, Kardiacs, Sueur, TrainerKit, Pedal Mania,
Warp, hupser and SaddleOut implement OpenBikeControl, so they join the
shared OpenBikeControl trainer apps. All connect over Bluetooth; Sueur
also over the network (off by default in Sueur, the rider accepts each
device). Logos bundled, with the openbikecontrol.org fallback for
patched builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 15:42:28 +01:00
Jonas Acker
6e8cb8bab9 Android: offer the gear overlay for Bluetooth-only trainer apps
An app BikeControl reaches over Bluetooth alone (Grimpa, Biketerra, FulGaz,
RideCave, Wahoo) always runs on another device, so the phone is free. The
Ride card and onboarding's last step now offer the overlay there, worded as
keeping the gear in view over any app on this phone, and it reopens by
itself on the next launch like the same-device overlay. It is not a setup
step on the trainer card.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 15:38:10 +01:00
Jonas Acker
4d3aa2a99f Wahoo app selectable as a trainer app again
The Bluetooth bridge it needs now asks for Android's advertise permission,
so it shows up in the Wahoo app. Changelog entry moves to 7.7.0; the Wahoo
tests run again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 13:16:44 +01:00
Jonas Acker
08b7b7617a Ask for the Bluetooth permission before a Bluetooth-only app's bridge starts
FulGaz and Biketerra find trainers over Bluetooth only, so the picker's WiFi
bridge became a Bluetooth one without asking for Android's advertise
permission; the bridge spun forever and the app never listed it. The picker
asks now, a bridge started without it says so, and picking Virtual Shifting
again on the trainer card restarts it.

The trainer card names the entry the app lists over Bluetooth (Android
shortens the name). On a Mac, connection settings say the Wahoo app can't
find the bridge there. Wahoo tests that need the app in the chooser are
skipped while it is hidden.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 13:07:25 +01:00
Jonas Acker
699b076828 Android: say when the trainer app can't find the bridged trainer, clearer no-Wi-Fi advice, no "App crashed" for an offline sign-in refresh
- Home: with the trainer app on this device and a build that pairs trainers
  over Bluetooth only (or a Store app on a PC), the trainer step now says
  that virtual shifting can't reach it here and which setups work, instead
  of asking the rider to pick an entry the app will never list. Its button
  opens the trainer's page.
- Home: with such an app on another device and the bridge on the network,
  the step adds what to switch if that device runs Android.
  `virtualShiftingTransportsOnAndroid` carries what the Android build can
  find, wherever BikeControl itself runs.
- Home: a phone on mobile data only, with the trainer app on the same
  phone, is told to join any Wi-Fi or use Local.
- The auth state listeners have an error handler: a token refresh that
  fails offline was logged as an app crash by every listener.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 12:00:40 +01:00