Skip to content

Fix run-from-source Bluetooth permission trap + 30 s search window (v1.2.1) - #11

Merged
mlstr0m merged 1 commit into
mainfrom
fix/bluetooth-permission-ux
Jul 17, 2026
Merged

Fix run-from-source Bluetooth permission trap + 30 s search window (v1.2.1)#11
mlstr0m merged 1 commit into
mainfrom
fix/bluetooth-permission-ux

Conversation

@mlstr0m

@mlstr0m mlstr0m commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

Addresses a real-world failure report (Reddit): running from source, the user only ever saw the Accessibility prompt, never the Bluetooth one, and scans silently found nothing. Root cause: in run-from-source mode the Bluetooth TCC permission belongs to Terminal/Python, and the prompt only fires on the first scan — our README claimed both prompts appear at first launch. They were also watching System Settings → Bluetooth, where a BLE client's peripheral will never be listed.

  • Clicking Connect now checks CBManager.authorization() — if denied/restricted, an alert explains the Terminal/Python subtlety and opens the Bluetooth privacy pane directly
  • Initial search keeps scanning for 30 s instead of one 5 s window (no more racing the pair button)
  • bleak scan errors map to actionable messages (unauthorized / powered off)
  • "Not found" message + README explicitly say the controller never shows in System Settings → Bluetooth
  • Version 1.2.1

Test plan

  • 52 bridge checks (new: retry-finds-on-second-round, error-message mapping) + 50 DSU checks, all green locally; CI runs them on this PR
  • CBManager.authorization() verified working via pyobjc on a real machine

🤖 Generated with Claude Code

….2.1)

Reddit user report: only the Accessibility prompt ever appeared, scans
always came back empty, and they were watching System Settings →
Bluetooth for the controller (where it will never show up).

- Detect CBManager.authorization() == denied/restricted when clicking
  Connect: explain that the permission belongs to Terminal/Python when
  running from source, with a button opening the Bluetooth privacy pane
- Initial search now keeps scanning for 30 s (rounds of 5 s) instead of
  a single window — no more racing the pairing-mode advertising
- Scan failures map to actionable messages (unauthorized → permission
  steps, powered off → enable Bluetooth) instead of raw bleak errors
- "Not found" error and README now state explicitly that the controller
  never appears in System Settings → Bluetooth, and that the Bluetooth
  prompt fires on first scan (Terminal owns it in run-from-source)
- Tests: scan retry round, error message mapping (52 bridge checks)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mlstr0m
mlstr0m merged commit 4698e2f into main Jul 17, 2026
2 checks passed
@mlstr0m
mlstr0m deleted the fix/bluetooth-permission-ux branch July 17, 2026 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant