Skip to content

Don't treat Bluetooth Trusted as a completed pairing - #7880

Open
reinierbutot wants to merge 1 commit into
basecamp:quattrofrom
reinierbutot:fix/bluetooth-trusted-unpaired
Open

Don't treat Bluetooth Trusted as a completed pairing#7880
reinierbutot wants to merge 1 commit into
basecamp:quattrofrom
reinierbutot:fix/bluetooth-trusted-unpaired

Conversation

@reinierbutot

Copy link
Copy Markdown

Fixes #7879

Problem

If the first Bluetooth pair attempt fails, the panel never pairs that device again.

omarchy-bluetooth-device pair ignored a failed bluetoothctl pair and still trusted the address. The panel treats trusted as already paired (paired || bonded || trusted), so later clicks only connect. BlueZ Trusted is not a bond. After this, bluetoothctl info shows 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

  • Trust and connect only after bluetoothctl pair succeeds
  • Group known devices as paired or bonded, not merely trusted — trusted-unpaired stay with discovered devices
  • Clicking an unpaired device pairs it again, even if it is already trusted

Testing

./test/shell.d/bluetooth-test.sh passes, 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 on quattro without this change — three need an omarchy-pkgs checkout; launch-about wants a live compositor animation.

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.
Copilot AI balanced review requested due to automatic review settings August 23, 2026 12:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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.

Bluetooth panel treats trusted-but-unbonded devices as paired and never retries pairing

2 participants