Repository navigation
Don't treat Bluetooth Trusted as a completed pairing - #7880
reinierbutot wants to merge 2 commits into
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.
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.
|
Reviewed at b88af95. The bug is real and this fixes it. What ran. On a disposable Omarchy worker I wrote a separate reproduction with a stubbed Second opinion. Codex Medium reviewed it too; independence is not guaranteed. It checked BlueZ 5.80–5.87 source and confirmed the assumption the fix rests on:
Codex suggested a narrower alternative: only drop Next. Labelled |
|
Tested this PR's Gating trust and connect on the exit status relies on
On the same machine the stock script left the AirPods One thing I noticed: in one attempt, I only exercised the script. The |
|
I compared this with #13811 and #14319 on real hardware (ThinkPad T14 Gen 2a, Realtek, BLE mouse), applied onto 4.0.4 at For this PR, with the pairing agent stopped, the pair fails as expected. The device is not left trusted, and it goes back under discovered, so it can be retried. That's the fix this issue asks for. But the helper exits 0 and nothing tells the user the pair failed. The panel launches it with Tested with help from Claude Code; every run was on my machine. |
The panel launches omarchy-bluetooth-device with Quickshell.execDetached, so it never sees the helper's exit status or stderr: a failed pair now leaves the device retryable, but nothing says it failed. Notify instead, with a fixed message and a distinct one for the 20 second timeout, and exit 1 for anyone running it by hand. The message never carries bluetoothctl's output, which after a timeout is discovery chatter naming other nearby devices. Folded in from omacom#14319. Co-Authored-By: David Boulay <david.boulay@lojel.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
[Medium impact] The PR appears safe to merge. SummaryStops treating Bluetooth trust as a completed pairing.
No actionable issues found. Tests were inspected but not run.
|
|
Pushed 29d450d to this branch. It folds in the one thing #14319 adds: a failed pair now tells the user. Why. The panel starts the helper with What ran. On a disposable Omarchy worker, Who checked. I reviewed it (Claude Opus 5.5), and Codex Medium reviewed the new commit as a second opinion. It found no defects, checked every caller of the helper (only the panel, which ignores the exit status, plus the CLI router), and agreed the tests fail without the fix. Its independence is not guaranteed. Still the maintainer's call. The trade-offs from the first review still apply. A device that connects but rejects pairing no longer gets the connect fallback. A device that is trusted but not paired moves out of PAIRED and has no Forget. #13811, which also starts Next. This waits on the maintainer. Nothing is needed from you. |
|
This no longer merges into I have not pushed that merge. The classification for this head is unsettled: I read it as a bug fix, and Codex Medium, classifying the PR separately, read it as an enhancement. The likely reason is the failed-pair notification folded in at 29d450d, which is new behaviour on top of the fix. Until the two agree, it is not re-verified on a worker or brought back to Waiting on the maintainer to settle the class, either as a fix or by splitting the notification out. @reinierbutot, you're welcome to merge |
|
Checked the failed Check translation structure run for unchanged head A disposable worker was used only to check which translation test files exist at this head; no test suite, visual check or hardware test ran in this follow-up. No code was pushed or CI rerun. GPT-6 in Codex at high effort checked this evidence. Opus 5.5 High and muse-wonder via pi, thinking high reviewed it too and found no supported code fix from the available evidence; independence is not guaranteed. This waits on the maintainer because the CI investigation could not be completed. The existing classification disagreement and merge conflict remain unresolved. |
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.