Commit Graph

570 Commits

Author SHA1 Message Date
Jonas Bark
c4c48dff07 Merge remote-tracking branch 'origin/6.5' into 6.5 2026-08-21 08:03:17 +02:00
Jonas Bark
905c2641cd feat(ios/macos): detect the Local Network permission instead of failing silently
Denial of Apple's Local Network privacy permission is the most common cause of
"BikeControl can't see my trainer app" on iOS and macOS, and it fails
completely silently: Bonjour browses return nothing forever, advertisements
never leave the device, nothing throws. An app watching only for errors cannot
tell "permission is off" from "there is nothing out there".

Apple ships no authorization-status API for it (not iOS 14...26, not macOS
15...26), so the new local_network_permission plugin measures it: an NWListener
and an NWBrowser on _bikecontrol-preflight._tcp, then

  browser discovers the listener        -> granted
  kDNSServiceErr_PolicyDenied (-65570)  -> denied
  neither, before the deadline          -> unknown

unknown is a real outcome, not an error — a device with no usable network never
completes the round trip even when the permission is fine — so everything fails
open on it and only a positive denial blocks the user.

The probe *is* the request: the system prompt fires on the first Bonjour
operation, so there is no separate request step, and after the user answers,
System Settings is the only way back.

- LocalNetworkAccess caches the result (probes cost a real round trip while
  getStatus() runs on every tile mount, tap and resume) and collapses
  concurrent probes into one, since two listeners on the same service type
  would resolve each other.
- LocalNetworkRequirement gates the three LAN tiles: MyWhoosh Link, Zwift mDNS
  and OpenBikeControl mDNS. Suppressed in screenshot/demo mode like the rest.
- Diagnostics drop the old guess (inferred from whether a discovery scan
  returned anything, which could not tell denied from an empty LAN) for the
  measured local-network=granted|denied|unknown.
- _bikecontrol-preflight._tcp added to NSBonjourServices on both platforms;
  without it the browse fails for a reason unrelated to the permission.

The Xcode project deployment-target bumps (ios 13.0->15.0, macos 10.15->12.0)
are Flutter's own migration aligning project defaults with the Podfiles; they
happen on any first build.

Verified with real builds on both platforms, not just analysis: flutter build
macos --debug and flutter build ios --no-codesign both succeed, the framework
is linked in, and the preflight service type is present in both built
Info.plists. 35 tests cover the mapping, cache, concurrency and fail-open
behaviour.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-21 07:58:18 +02:00
Jonas Bark
d16f3b96e8 refactor(attribution): use maintained play_install_referrer plugin
android_play_install_referrer 0.4.0 is discontinued on pub.dev (replaced
by play_install_referrer). Swaps the reporter's PlayInstallReferrerSource
over to the maintained package; behaviour is unchanged — same read/catch/
recordError/return-null shape, just PlayInstallReferrer.installReferrer
instead of AndroidPlayInstallReferrer.installReferrer.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-17 07:57:10 +02:00
Jonas Bark
7e3a48d162 feat(attribution): report the Play install referrer once per install
The referrer source is behind an interface so the reporting logic is unit
tested without the Play plugin, which needs a real device.

The done-flag is only written after a successful send, so a failed report
retries on the next launch instead of vanishing. A missing referrer still
reports, because an install with no attribution is still an install and the
organic baseline is what paid gets compared against.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-16 20:29:42 +02:00
Jonas Bark
b8d3eda58d version++ 2026-08-16 15:03:06 +02:00
Jonas Bark
421a3c71ef version++ 2026-08-15 13:29:16 +02:00
Jonas Bark
d2e1bf9091 version++ 2026-08-11 19:54:05 +02:00
Jonas Bark
dea2547134 chore(release): 6.4.0
Bumps the version to 6.4.0+144 and opens the 6.4.0 changelog section,
dated today. The guided-setup bullet moves here from 6.3.0 — that
version shipped on 09-07-2026, before the wizard existed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-10 16:31:23 +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
0723272455 prepare release 2026-07-09 15:17:51 +02:00
Jonas Bark
7e1de77bdd feat(apps): add Strappo as an officially supported trainer app
Strappo (getstrappo.com) integrates the open OpenBikeControl protocol, so it
joins the supported-apps list as an official network/BLE partner (obpMdns +
obpBle) — button events arrive over the protocol, so no keyboard keymap is
needed. Adds the SupportedApp definition, registry entry, partner logo asset,
and a registration test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 12:38:30 +02:00
Jonas Bark
e7b7e8ba46 chore: bump build to 6.2.0+142 for a new iOS build
6.2.0+141 already has a Shorebird release, so a fresh iOS build needs a
higher build number; the marketing version stays 6.2.0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 23:43:27 +02:00
Jonas Bark
aee00402fc version++ 2026-06-26 22:41:11 +02:00
Jonas Bark
460be55a66 version++ 2026-06-26 22:00:18 +02:00
Jonas Bark
2e58e26911 update changelog 2026-06-25 06:57:29 +02:00
Jonas Bark
a4ee87e85f feat(6.2): Windows screen recording backend (WGC + Media Foundation) [UNVERIFIED — needs Windows build]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 17:42:15 +02:00
Jonas Bark
0a2c3916ef chore(6.2): scaffold screen recording deps and in-repo plugin 2026-06-24 16:16:02 +02:00
Jonas Bark
b201cb3e53 Generate localized store screenshots (golden_screenshot 11)
- Bump golden_screenshot 8.2.0 -> ^11.0.1 (drops the Yaru dependency, hence the
  linux plugin-registrant change).
- screenshot_test.dart now renders each scene for 6 locales (en/de/es/fr/it/pl)
  via a shoot() helper, writing screenshots/<locale>/<scene>-<device>.png.
  Marketing titles are translated per locale (de/es/fr/it/pl are drafts).
  - main.dart: screenshotLocale global drives the app locale in screenshot mode
    (was hardcoded to English).
  - v11 only loads fonts found in the rendered tree, so loadAssets() runs after
    the first pump.
- Virtual Shifting scene shows the gear UI instead of the "trainer doesn't
  advertise FTMS" warning: added ProxyDevice.debugAttachFitnessBike (test seam,
  no server side-effects) and hide the MyWhoosh gearing hint in screenshot mode.
- prepare_store_screenshots.sh maps each store locale from its language folder
  (de-DE <- screenshots/de, ...).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 11:22:56 +02:00
Jonas Bark
dd34d41088 increase version 2026-06-17 20:55:36 +02:00
Jonas Bark
c41683421e Merge remote-tracking branch 'origin/6.0.1' into custom-mdns-responder
# Conflicts:
#	.gitignore
#	lib/bluetooth/devices/openbikecontrol/obc_mdns_emulator.dart
#	prop
2026-06-12 12:03:37 +02:00
Jonas Bark
b0f43f33ef version++ 2026-06-12 11:03:58 +02:00
Jonas Bark
0ba398b2c9 Merge branch '6.0.0' into custom-mdns-responder 2026-06-12 09:16:15 +02:00
Jonas Bark
336e36a644 version++ 2026-06-12 08:08:57 +02:00
Jonas Bark
a60a1384e3 Merge origin/universal-ble-2-peripheral: universal_ble 2.0.0 peripheral mode
Brings the BLE peripheral-mode migration to universal_ble 2.0.0 into the
WiFi DirCon trainer-discovery branch and bumps universal_ble to the latest
fork commit (ref: changes, 2.0.0).

Conflict resolutions:
- prop submodule: merged the universal_ble 2.0 transporter migration with
  the WiFi DirCon TrainerTransport refactor; kept the '0x' short-UUID
  normalisation on startAdvertising. Updated BleCharacteristic call sites
  to the new 3-arg (uuid, properties, descriptors) constructor.
- obc_ble_emulator.dart: took the PeripheralServer / universal_ble 2.0
  write-handler migration; kept the richer Error(button:) context on
  sendAction (using _currentDeviceId, the migrated connection tracker).
- unlock.dart: kept the main.dart import.
- pubspec.yaml: kept version 6.0.0+135; took ref: changes for universal_ble.

Pre-existing prop test failures (composite/dircon/fitness serviceUUIDs) are
unchanged by this merge — they fail identically on the pre-merge branch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 09:19:58 +02:00
Jonas Bark
57f0b707d8 enable trainingpeaks, version++ 2026-06-06 20:31:27 +02:00
Jonas Bark
8f221245cc new unlock method 2026-06-06 19:54:00 +02:00
Jonas Bark
c66657bb1a version++ 2026-06-03 16:13:20 +02:00
Jonas Bark
0ec9943c35 version++ 2026-06-02 22:22:38 +02:00
Jonas Bark
b492a4e9a6 update changelog, version 2026-06-02 21:14:34 +02:00
Jonas Bark
1c064e1867 update libs 2026-05-20 23:06:42 +02:00
Jonas Bark
29741e520f migrate peripheral mode to universal_ble 2.0.0
Drop bluetooth_low_energy. Move OBC BLE emulator, Zwift emulator, and
the remote mouse / keyboard pairing flows onto a new PeripheralServer
wrapper around UniversalBlePeripheral that routes per-characteristic
read/write handlers, so multiple peripheral instances coexist without
clobbering universal_ble's process-wide handlers.

Also: onValueChange callback gains a timestamp param (v1.0.0 breaking
change), PeripheralManager().showAppSettings() → openAppSettings(),
UUID.short(0x12) → literal UUID, and prop submodule bumped to the
matching universal_ble peripheral rewrite.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 09:28:39 +02:00
Jonas Bark
086e1e1d08 version++ 2026-05-17 20:19:40 +02:00
Jonas Bark
088b63ea16 version++ 2026-05-17 20:19:40 +02:00
Jonas Bark
afd7447b68 version++ 2026-05-13 16:09:51 +02:00
Jonas Bark
6ccd82df1e version++ 2026-05-13 16:09:51 +02:00
Jonas Bark
353a1f98ba MyWhoosh Windows workaround 2026-05-13 13:24:50 +02:00
Jonas Bark
45a831b17c MyWhoosh Windows workaround 2026-05-13 13:24:50 +02:00
Jonas Bark
0b78fdf858 version++ 2026-05-13 12:23:12 +02:00
Jonas Bark
4de774440e version++ 2026-05-13 12:23:12 +02:00
Jonas Bark
602af653f3 version++ 2026-05-13 10:38:28 +02:00
Jonas Bark
f8800cbd1b version++ 2026-05-13 10:38:28 +02:00
Jonas Bark
c6f87da27e version++ 2026-05-12 21:49:37 +02:00
Jonas Bark
9b94f8071d version++ 2026-05-12 21:49:37 +02:00
Jonas Bark
8bf8aa6bb7 overlay/macos: vendor multi_window_native and make sub-windows NSPanels
Forked the upstream package
(https://github.com/Swatimishra8/multi_window_native) into
packages/multi_window_native and pinned pubspec to the path dep.

Key macOS change in the vendored plugin's createNewWindow:
- NSPanel instead of NSWindow with styleMask = [.titled, .closable,
  .resizable, .nonactivatingPanel, .utilityWindow].
- isFloatingPanel = true, becomesKeyOnlyIfNeeded = true,
  hidesOnDeactivate = false.
- level = .screenSaver (highest standard user-space level).
- collectionBehavior = [.canJoinAllSpaces, .fullScreenAuxiliary,
  .stationary, .ignoresCycle].
- Initial size dropped from 1440x900 / minSize 800x900 to 220x140 /
  minSize 160x80 (closer to what the trainer overlay needs).

With those properties set at construction time, the sub-window sits
above fullscreened trainer apps from the moment it's shown — no more
retry loop chasing the window after the fact.

MainFlutterWindow.swift's onEngineCreatedCallback no longer needs the
elevation retry; it just calls RegisterGeneratedPlugins on the new
engine and leaves the window-level work to the plugin.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 12:18:58 +02:00
Jonas Bark
29a267eba4 overlay/macos: vendor multi_window_native and make sub-windows NSPanels
Forked the upstream package
(https://github.com/Swatimishra8/multi_window_native) into
packages/multi_window_native and pinned pubspec to the path dep.

Key macOS change in the vendored plugin's createNewWindow:
- NSPanel instead of NSWindow with styleMask = [.titled, .closable,
  .resizable, .nonactivatingPanel, .utilityWindow].
- isFloatingPanel = true, becomesKeyOnlyIfNeeded = true,
  hidesOnDeactivate = false.
- level = .screenSaver (highest standard user-space level).
- collectionBehavior = [.canJoinAllSpaces, .fullScreenAuxiliary,
  .stationary, .ignoresCycle].
- Initial size dropped from 1440x900 / minSize 800x900 to 220x140 /
  minSize 160x80 (closer to what the trainer overlay needs).

With those properties set at construction time, the sub-window sits
above fullscreened trainer apps from the moment it's shown — no more
retry loop chasing the window after the fact.

MainFlutterWindow.swift's onEngineCreatedCallback no longer needs the
elevation retry; it just calls RegisterGeneratedPlugins on the new
engine and leaves the window-level work to the plugin.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 12:18:58 +02:00
Jonas Bark
805d0e410c overlay/desktop: use multi_window_native on both platforms with selective plugin registration
Drop desktop_multi_window entirely; unify macOS + Windows on
multi_window_native. Windows runner re-gets the CreateNewWindow /
CloseWindow / SetMainWindowMethodHandler plumbing with selective
sub-engine registration (only WindowManagerPlugin +
MultiWindowNativePlugin) to avoid the deadlock caused by full
RegisterPlugins on secondary engines. macOS MainFlutterWindow narrows
onEngineCreatedCallback from RegisterGeneratedPlugins to the same two
plugins for consistency.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 11:14:05 +02:00
Jonas Bark
960a12d077 overlay/desktop: use multi_window_native on both platforms with selective plugin registration
Drop desktop_multi_window entirely; unify macOS + Windows on
multi_window_native. Windows runner re-gets the CreateNewWindow /
CloseWindow / SetMainWindowMethodHandler plumbing with selective
sub-engine registration (only WindowManagerPlugin +
MultiWindowNativePlugin) to avoid the deadlock caused by full
RegisterPlugins on secondary engines. macOS MainFlutterWindow narrows
onEngineCreatedCallback from RegisterGeneratedPlugins to the same two
plugins for consistency.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 11:14:05 +02:00
Jonas Bark
7c06b3330f overlay/desktop: use desktop_multi_window on Windows, keep multi_window_native on macOS
Add `desktop_multi_window: ^0.3.0` alongside `multi_window_native: ^1.0.4`.
On Windows the sub-window is now spawned via `WindowController.create` with a
JSON `role=trainer-overlay` argument (detected in `main()` before any heavy
bootstrap), and state/actions flow over `WindowMethodChannel(kOverlayChannel)`.
macOS continues using `MultiWindowNative.createWindow` / `notifyAllWindows` /
`registerListener` unchanged.

Windows runner reverts all `multi_window_native` plumbing:
`SecondaryWindowContext`, `CreateNewWindow`, `CloseWindow`,
`SetMainWindowMethodHandler`, and the plugin source compiled directly into the
runner are removed. `flutter_window.cpp` instead registers
`DesktopMultiWindowSetWindowCreatedCallback` so every sub-engine gets plugins.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 10:33:14 +02:00
Jonas Bark
20fc10395d overlay/desktop: use desktop_multi_window on Windows, keep multi_window_native on macOS
Add `desktop_multi_window: ^0.3.0` alongside `multi_window_native: ^1.0.4`.
On Windows the sub-window is now spawned via `WindowController.create` with a
JSON `role=trainer-overlay` argument (detected in `main()` before any heavy
bootstrap), and state/actions flow over `WindowMethodChannel(kOverlayChannel)`.
macOS continues using `MultiWindowNative.createWindow` / `notifyAllWindows` /
`registerListener` unchanged.

Windows runner reverts all `multi_window_native` plumbing:
`SecondaryWindowContext`, `CreateNewWindow`, `CloseWindow`,
`SetMainWindowMethodHandler`, and the plugin source compiled directly into the
runner are removed. `flutter_window.cpp` instead registers
`DesktopMultiWindowSetWindowCreatedCallback` so every sub-engine gets plugins.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 10:33:14 +02:00
Jonas Bark
40d297ba64 overlay/desktop: switch to multi_window_native
Drops desktop_multi_window 0.3.0 in favour of multi_window_native 1.0.4
on a new branch (feature/trainer-overlay-multi-window-native).

Mechanism is different but the responsibilities map cleanly:
- `MultiWindowNative.createWindow([routeName, argsJson, theme])` spawns
  the sub-window; main() detects it via the first arg.
- Communication is broadcast by method name through
  `notifyAllWindows` + `registerListener`. Conventions:
    main → overlay: trainerOverlay.state
    overlay → main: trainerOverlay.action / ready / positionChanged
  Each side filters by method name; the API has no per-window targeting.
- The overlay window grabs its windowId via `windowManager.getId()` and
  broadcasts `trainerOverlay.ready` so the controller can later close it.
- `notifyUiRendered()` is called after the first frame, per the package's
  black-screen workaround on macOS/Windows.

Native shims:
- macOS MainFlutterWindow.swift: re-register plugins on every new
  sub-engine via `MultiWindowNativePlugin.onEngineCreatedCallback`. Kept
  the `.statusBar` / `.fullScreenAuxiliary` elevation for visibility
  above fullscreened trainer apps; the callback now finds the new
  sub-window's NSWindow by matching the FlutterViewController's engine.
- Windows flutter_window.cpp: reverted the desktop_multi_window callback;
  multi_window_native's Windows wiring requires a more invasive
  flutter_window.h / cpp change (SetOnCloseCallback, GetFlutterViewController,
  callback registration in main.cpp) which is TBD. The overlay is only
  verified on macOS in this branch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 09:11:00 +02:00