Repository navigation
feat: a late-discovery hint, the spec GATT service, iOS announcement, macOS keys and menu bar - #17
Merged
Atlanwhite147 merged 6 commits intoNov 29, 2026
Conversation
added 6 commits
November 29, 2026 17:05
MyWhoosh asks for the service once, at startup. The bridge now watches the mDNS traffic it already answers, and when every browse arrived before its own announcement it says so on the simple screen, in one sentence, with the one action that helps.
The peripheral was a skeleton with project-local UUIDs, so no third-party application could find it. It now exposes d273f680 with buttons on d273f681, haptics on d273f682 and application information on d273f683, the SIG Device Information service beside it, and reads answered from the state the bridge holds. Notifications are serialized and spaced by 500 ms because Android drops concurrent ones and a lost release leaves a button stuck down; buttons changed together share one frame, capped at the specification's 20 bytes. The Android backend is a BluetoothGattServer and compiles; macOS and iOS still need a CBPeripheralManager one, and nothing was measured against a real application.
A raw multicast socket needs Apple's entitlement, but the system publishes a Bonjour service on the application's behalf and the daemon emits the multicast: the bridge therefore registers _openbikecontrol._tcp on the port it already holds. NetService rather than NWListener, because a listener must own the TCP port and this one is opened by Dart; NSBonjourServices and the local network description were already declared. docs/ios-multicast.md is left alone: whether a game on another device connects to a phone that announces is a measurement nobody has made yet.
The transport and the engine were already there; what macOS lacked was a way to type into another application and a way to live without a window in front. Keys and clicks are now posted as CGEvents, with the Accessibility permission asked on the first press because a dropped event returns no error. The application stays alive when its window closes and shows the bridge state in a menu bar item that starts and stops it. The macOS build is no longer sandboxed: a sandboxed application cannot be granted Accessibility, and the zip distribution does not need the sandbox. Unit-tested against a mocked channel; no Mac was touched, so the hardware run is still owed.
The capability stays: iOS announces itself through the system publisher and the switch keeps working there. What was missing is the sentence, so a running bridge is not read as a promise: the Network screen now says the platform is not supported yet and why. The README, the platforms table and the changelog stop blaming the multicast entitlement, which is no longer what blocks iOS; what is missing is a measurement on an iPhone.
Once a day, after the first frame, one anonymous GET of the static downloads/version.txt with a three second timeout. The published version is compared by number, so 0.3.10 is newer than 0.3.9 and a build number breaks a tie. A newer release puts one line and one word on the simple screen, and a card with Check now in Advanced. A failed check is silence: nothing stored, so the next launch retries, and nothing downloaded or installed ever.
Atlanwhite147
deleted the
hermes-subagent/subagent-work-openzclick-w40-fa5380
branch
November 29, 2026 21:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Four features taken from the November watch, plus an update notice and one correction, each with its unit tests. Nothing here was measured on hardware except where it says so.
What this adds
1. The screen names a game that looked before the bridge existed (
31df604)MyWhoosh browses for
_openbikecontrol._tcponce, at startup: a bridge published later leaves its button dead until the game restarts. The bridge now watches the mDNS traffic it already answers (MdnsQueryWatcher, shared port 5353), keeps the two timestamps apart (LateDiscoveryDetector, pure Dart) and, when every browse came before its own announcement, says so on the simple screen in one sentence with the one action that helps: quit MyWhoosh and open it again.2. The bridge serves the specification's GATT service (
9cb3a15)Service
d273f680, buttons ond273f681(read and notify), haptics ond273f682, application information ond273f683, plus the SIG Device Information service. The project-local526f7565…UUIDs reached no third-party application. Notifications go through one serialized queue spaced by 500 ms, because Android drops concurrent notifications and a lost release leaves a button stuck down; buttons changed together share one frame, capped at the specification's 20 bytes; a press and its release can never share one. The Android backend is aBluetoothGattServer, reachable from a "Bluetooth controller" switch on the Advanced screen.3. iOS announces itself without Apple's entitlement (
2de833d)The system Bonjour publisher registers
_openbikecontrol._tcpon the port the bridge already holds, and the daemon emits the multicast.NWListenerwas not used on purpose: a listener must own its TCP port, and that port is opened by Dart withoutSO_REUSEPORT, so a second listener cannot bind.NetServicepublishes on a port it does not own, through the samedns_sdpath BikeControl measured.docs/ios-multicast.mdis untouched, as asked.4. macOS: keys through
CGEvent, and a menu bar item (d57c9ef)Key and pointer injection over a channel to
MacKeyInjection, with the Accessibility permission asked on the first press (macOS drops a posted event without an error). The application survives its window closing and lives in the menu bar: state, start and stop, show the window, quit. The macOS build is no longer sandboxed, because a sandboxed application cannot be granted Accessibility.5. The bridge screen keeps saying iOS is not supported (
4855149)The capability stays, the sentence was missing: the Network screen now says the platform is not supported yet, and the README, the platforms table and the changelog stop blaming the multicast entitlement, which is no longer what blocks iOS.
6. The interface says when a newer release is published (
e4b9e5b)Once a day, after the first frame, one anonymous GET of
downloads/version.txtwith a three second timeout. The published version is compared by number, not by text:0.3.10is newer than0.3.9, and a build number breaks a tie, so a rider on a test build is never told to downgrade. A newer release puts one line and one word ("Update") on the simple screen, and a card withCheck nowat the bottom of Advanced. A failed check is silence: no error, nothing stored, so the next launch retries instead of waiting a day. Nothing is downloaded or installed, and the request carries no identifier or version.Measured
core:dart analyzeclean, 354 tests,dart formatclean.transports: clean, 149 tests, format clean.app:flutter analyzeclean, 221 tests, format clean.flutter build apk --debugsucceeds, so the Kotlin backend compiles.https://openzclick.147.ovh/downloads/version.txtanswers200withversion: openzclick 0.3.4, which the parser accepts as it is.Not measured, and not claimed
CBPeripheralManagerbackend exists for macOS or iOS yet.curl, not from a built application: the three second timeout and the silence on failure are unit-tested, not ridden.site/index.htmlstill says the multicast entitlement is what blocks an iPhone. That is now false, and the site is not part of this change.Defaults
Commit messages are in English and lowercase, one per feature. No code was copied from QZ, BikeControl or ShiftLink: only their failure modes were read.