Don't treat Bluetooth Trusted as a completed pairing - #7880
Open
reinierbutot wants to merge 1 commit into
Open
Conversation
A failed pair still trusted the address, and the panel treated Trusted as already paired, so later clicks only connected. Trust only after pairing succeeds, and retry pair unless the device is paired or bonded.
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes #7879 by distinguishing Bluetooth trust from successful pairing.
Changes:
- Trusts and connects only after pairing succeeds.
- Classifies trusted-only devices as discovered.
- Adds regression coverage for failed pairing and device grouping.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
bin/omarchy-bluetooth-device |
Gates trust and connect on pairing success. |
shell/plugins/panels/bluetooth/Panel.qml |
Retries pairing for trusted-only devices. |
shell/plugins/panels/bluetooth/Model.js |
Corrects paired-device grouping. |
test/shell.d/bluetooth-test.sh |
Adds pairing-state regression tests. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Fixes #7879
Problem
If the first Bluetooth pair attempt fails, the panel never pairs that device again.
omarchy-bluetooth-device pairignored a failedbluetoothctl pairand still trusted the address. The panel treatstrustedas already paired (paired || bonded || trusted), so later clicks onlyconnect. BlueZ Trusted is not a bond. After this,bluetoothctl infoshows Trusted yes, Paired/Bonded no, and the device sits under PAIRED.Hit this with a Logitech MX Master 2S (BLE HID). Same trap for any device whose first pair fails.
Fix
bluetoothctl pairsucceedsTesting
./test/shell.d/bluetooth-test.shpasses, including new coverage that a failed pair does not trust or connect, and that a trusted-only device is discovered rather than known../test/all: 184 of 188 test files pass. The four failures (config,launch-about,snapper,unowned-system-paths) fail the same way onquattrowithout this change — three need anomarchy-pkgscheckout;launch-aboutwants a live compositor animation.