Feat/linked host switching - #479
Conversation
Greptile SummaryThe PR adds synchronized Easy-Switch handling for linked pointing devices and updates receiver arbitration, channel reuse, configuration, and capture lifecycle behavior.
Confidence Score: 4/5The PR does not yet appear safe to merge because valid host-key requests can still be discarded and concurrent receiver sessions can still split HID++ reports. Session reconciliation removes generation state before queued key-press completions are consumed, while gesture capture and host switching continue to use independent channel stores under simultaneous shared receiver leases. Files Needing Attention: crates/openlogi-agent-core/src/watchers/host_switch.rs, crates/openlogi-agent-core/src/receiver_access.rs, crates/openlogi-hid/src/channel_pool.rs
|
| Filename | Overview |
|---|---|
| crates/openlogi-agent-core/src/watchers/host_switch.rs | Adds generation-tagged host-switch session reconciliation and coordinated transitions. |
| crates/openlogi-agent-core/src/receiver_access.rs | Replaces exclusive capture ownership with shared session leases and reason-tagged exclusive operations. |
| crates/openlogi-hid/src/host_switch.rs | Implements host-control discovery, rollback-safe temporary reporting changes, event capture, and ordered device switching. |
| crates/openlogi-hid/src/channel_pool.rs | Adds transport-based channel reuse for host-switch sessions. |
| crates/openlogi-agent-core/src/orchestrator.rs | Resolves configured host-switch links and synchronizes capture targets with online state. |
| crates/openlogi-core/src/config/device.rs | Adds backward-compatible serialization of per-device host-switch targets. |
Reviews (6): Last reviewed commit: "style: rustfmt after host-switch rebase" | Re-trigger Greptile
b3694b8 to
762ec45
Compare
762ec45 to
97c329a
Compare
97c329a to
0c7564a
Compare
- add keyboard-initiated host-switch session handling - switch configured pointing devices before the keyboard leaves the host - resolve configured host-switch targets through the agent inventory - keep sessions synchronized with device availability changes - add TOML configuration and tests for host-switch targets
- add shared runtime storage for resolved host-switch links - rebuild links when configuration or device inventory changes - require the initiating keyboard to be online - preserve routes for sleeping linked target devices - ignore missing targets and empty link configurations - add coverage for online keyboard and sleeping target behavior
Handle poisoned DPI cycle locks explicitly in the online-state test so the workspace passes Clippy with unwrap_used denied.
0c7564a to
3e09ead
Compare
Summary
Add keyboard-initiated Easy-Switch synchronization for linked Logitech pointing devices.
When an Easy-Switch key is pressed on a compatible keyboard, OpenLogi switches every configured pointing device to the corresponding host channel before switching the keyboard. This allows the
configured devices to move together between hosts.
Implementing this feature also exposed a HID++ capture lifecycle issue: a device returning after an Easy-Switch transition retained its route but did not restart capture. The capture target now
follows the device's online state without resetting its DPI-cycle position.
Changes
openlogi-corehost_switch_targetsto the per-device TOML configuration.openlogi-hidopenlogi-agent-coreDocumentation
host_switch_targetsand provide a TOML configuration example.Testing
Automated verification:
devenv tasks run openlogi:checkOpenLogi hardware testing was performed on Linux using the OpenLogi 0.6.22 RPM package with:
Both combinations were tested with the new host-switch synchronization functionality.
Cross-agent behavior was additionally checked using the official Logi Options+ 2.5 client:
These checks confirmed that the devices can switch between corresponding host channels regardless of which agent manages them. OpenLogi itself was not runtime-tested on Windows or macOS as part
of this change.
Known limitations
Note
Depends on #453 for the online-aware input capture selection behavior. This branch will be rebased onto master after that PR merges, then re-tested before being marked ready for review.