Repository navigation
Conversation
rfkill-blocking Bluetooth (which is how the bar's own power toggle turns it off, so the state survives reboots) drops the adapter from BlueZ entirely rather than merely disabling it. The panel's icon logic only handled a disabled-but-present adapter, returning an empty string when adapter was null, and the widget's `visible: adapter !== null` binding hid it outright. Together these made the tray icon vanish instead of showing the intended disabled glyph.
toggleBluetooth() no-op'd when the adapter was null, and the power switch itself was hidden in that case too (visible: !!root.adapter). Combined with the icon/visibility fix in the previous commit, turning Bluetooth off left no way to turn it back on from the panel: the switch disappeared, and even reaching it via IPC did nothing. Updates the pinned source-regex test for the toggle's rfkill call and adds coverage for the null-adapter cases (icon, widget visibility, switch visibility, and the toggle no longer bailing out).
|
Thanks for tracking this down. The bug is real: on Five other open pull requests fix the same thing: #12241, #12585, #13204, #13655 and #13806. I compared all six diffs against
#13204 and #12585 tell a blocked radio apart from missing hardware by asking rfkill, which still lists the switch while it is blocked. That works from a cold start, and it leaves machines with no Bluetooth hardware untouched. #12585 is the more complete of the two, but it no longer merges cleanly. #12241 and #13806 latch on "an adapter was seen once", so they don't help after a reboot with the block set. #13655 takes the same How this was checked: Claude Opus 5.5 read the diffs and the surrounding code. Nothing was run on a worker, because a fix that isn't the one going forward isn't worth spending a worker on. There was no second opinion: the configured reviewer (Codex Medium) answered a ping, but today's review budget was already spent, so the comparison above is one model's reading. Next step: the maintainer chooses between the competing fixes. Nothing is needed from you unless they ask. |
Summary
rfkill block bluetooth(so the off-state survives reboots), which drops the adapter from BlueZ entirely rather than merely disabling it.Panel.qml'siconproperty only accounted for a disabled-but-present adapter, returning an empty string whenadapterwasnull; the widget'svisible: adapter !== nullbinding then hid it outright — the tray icon vanished instead of showing the disabled glyph ().visible: !!root.adapter), andtoggleBluetooth()no-op'd on a null adapter — so once Bluetooth was off, there was no way left to turn it back on from the panel at all.Fix
icon: treat "no adapter" and "adapter disabled" the same way, both showing the disabled glyph.visible: truealways, and leticonalone carry the on/off/disabled state.toggleBluetooth(): no longer bails out when there's no adapter — it can still askomarchy-bluetooth-powerto turn the radio back on.Test plan
omarchy plugin clone omarchy.bluetooth, confirmed with screenshots that the icon shows the disabled glyph when off and the normal glyph when on, and that the power switch stays visible and functional in both states../test/all— 5 pre-existing failures (missingomarchy-pkgscheckout, a locale-encoding issue in an unrelated test, and a bar-icon centering test), all reproduced identically on unmodifiedmaster; none related to this change.