fix(openlogi): stabilize bluetooth direct devices#342
Conversation
Filter non-identifying direct HID++ model info before it becomes a persistent device identity, and keep Bluetooth-direct offline placeholders on the HID++ self slot instead of slot 0. Treat no-evidence direct refreshes for cached devices as transient misses so a slow or sleeping BLE device replays last-good inventory instead of being cleared. Required macOS privacy grants for packaged installs: - Input Monitoring: OpenLogi GUI app bundle at /Applications/OpenLogi.app (binary: /Applications/OpenLogi.app/Contents/MacOS/openlogi-gui). - Input Monitoring: OpenLogi Agent helper bundle at /Applications/OpenLogi.app/Contents/Library/LoginItems/OpenLogiAgent.app (binary: /Applications/OpenLogi.app/Contents/Library/LoginItems/OpenLogiAgent.app/Contents/MacOS/openlogi-agent). - Accessibility: OpenLogi Agent helper bundle at /Applications/OpenLogi.app/Contents/Library/LoginItems/OpenLogiAgent.app (binary: /Applications/OpenLogi.app/Contents/Library/LoginItems/OpenLogiAgent.app/Contents/MacOS/openlogi-agent), because the agent owns the CGEventTap mouse hook. Remove the temporary async-hid path patch/vendor tree and raw HID transport trace from the final change; the fix now stays inside OpenLogi's probe and GUI state logic.
Greptile SummaryThis PR stabilizes Bluetooth-direct Logitech device discovery and GUI state. The main changes are:
Confidence Score: 4/5The direct self-slot classification path needs a fix before merging.
crates/openlogi-hid/src/inventory/probe.rs and crates/openlogi-gui/src/state/devices.rs Important Files Changed
Reviews (1): Last reviewed commit: "fix(openlogi): stabilize bluetooth direc..." | Re-trigger Greptile |
| let walk_succeeded = capabilities.is_some(); | ||
| let caps = capabilities.unwrap_or_default(); | ||
| let is_peripheral = probe.battery.is_some() || caps.buttons || caps.pointer || caps.lighting; | ||
| let is_peripheral = probe.direct_peripheral_evidence; |
There was a problem hiding this comment.
Kind-Only Direct Devices Disappear
When a Bluetooth-direct mouse answers DeviceTypeAndName but the battery, model, and capability root probes time out, probe_direct_features still builds kind-presumed button and pointer capabilities, but direct_peripheral_evidence stays false. This gate then treats the usable self slot as non-peripheral, so a first probe is rejected as Unkeyed and a cached device disappears after the miss grace instead of staying in the GUI.
| record.online | ||
| && record.display_name == identity.display_name | ||
| && record.kind == identity.kind | ||
| && matches!( |
There was a problem hiding this comment.
Identical Devices Shadow Placeholders
This match suppresses any unit-keyed, non-identifying direct identity when any live direct record has the same display name, kind, VID, and PID. Two identical Logitech devices can share all of those fields, so if one is online and the other is asleep, the sleeping device's only offline placeholder is dropped from the carousel until it probes live again.
https://github.com//issues/336
|


Filter non-identifying direct HID++ model info before it becomes a persistent device identity, and keep Bluetooth-direct offline placeholders on the HID++ self slot instead of slot 0.
Treat no-evidence direct refreshes for cached devices as transient misses so a slow or sleeping BLE device replays last-good inventory instead of being cleared.
Required macOS privacy grants for packaged installs:
Input Monitoring: OpenLogi GUI app bundle at /Applications/OpenLogi.app (binary: /Applications/OpenLogi.app/Contents/MacOS/openlogi-gui).
Input Monitoring: OpenLogi Agent helper bundle at /Applications/OpenLogi.app/Contents/Library/LoginItems/OpenLogiAgent.app (binary: /Applications/OpenLogi.app/Contents/Library/LoginItems/OpenLogiAgent.app/Contents/MacOS/openlogi-agent).
Accessibility: OpenLogi Agent helper bundle at /Applications/OpenLogi.app/Contents/Library/LoginItems/OpenLogiAgent.app (binary: /Applications/OpenLogi.app/Contents/Library/LoginItems/OpenLogiAgent.app/Contents/MacOS/openlogi-agent), because the agent owns the CGEventTap mouse hook.
Remove the temporary async-hid path patch/vendor tree and raw HID transport trace from the final change; the fix now stays inside OpenLogi's probe and GUI state logic.