fix(agent): route hardware operations through inventory channels - #532
Merged
Merged
Conversation
Greptile SummaryThe PR routes Agent hardware operations through inventory-owned HID++ channels instead of opening competing connections.
Confidence Score: 5/5The PR appears safe to merge because no blocking failure remains in the eligible follow-up review scope. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| crates/openlogi-agent-core/src/hardware.rs | Centralizes Agent hardware reads and writes on registry-confirmed capture or inventory channels and removes route-open fallback. |
| crates/openlogi-agent-core/src/hook_runtime.rs | Threads the channel registry into hardware actions dispatched by OS hooks. |
| crates/openlogi-agent-core/src/orchestrator.rs | Supplies the shared registry to volatile-setting reapplication and related hardware operations. |
| crates/openlogi-agent-core/src/watchers/gesture.rs | Coordinates capture sessions and gesture-triggered actions with inventory channel ownership. |
| crates/openlogi-agent/src/server.rs | Routes immediate IPC hardware operations through the Agent's capture channel and inventory registry. |
| crates/openlogi-hid/src/write/shared.rs | Adds existing-channel variants that preserve route-derived device indices for feature operations. |
| crates/openlogi-hid/src/write/lighting.rs | Moves keyboard lighting onto an existing HID++ channel and emits bounded per-key raw reports. |
| crates/openlogi-hid/src/transport/windows.rs | Routes 0x12 lighting reports through the Windows long-report endpoint and its native fallback. |
| crates/openlogi-hidpp/src/channel.rs | Adds timeout-bounded raw report writes with a 64-byte maximum. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
IPC[Agent IPC] --> Select[Select authoritative channel]
Hook[Hook and gesture actions] --> Select
Reapply[Reconnect reapply] --> Select
Capture[Current capture channel] --> Select
Registry[Inventory channel registry] --> Select
Select --> Shared[SharedChannel]
Shared --> Features[DPI / SmartShift / wheel]
Shared --> Lighting[Keyboard lighting]
Features --> Device[HID++ device]
Lighting --> Raw[Bounded 0x12 raw reports]
Raw --> Device
Reviews (3): Last reviewed commit: "fix(windows): gate non-windows hid write..." | Re-trigger Greptile
15 tasks
Collaborator
|
@safonin Can you please fix the issues with the pipeline? |
Contributor
Author
|
sure thing |
Contributor
Author
|
Fixed in 6392871. The non-Windows |
davidbudnick
force-pushed
the
fix/agent-hardware-routing
branch
from
August 9, 2026 23:47
6392871 to
eef6696
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Route all Agent-side, route-addressed HID++ reads and writes through the exact inventory-owned channel introduced by #522. This avoids competing HID opens while the inventory or capture watcher already owns the device and provides the shared-channel foundation needed by the MX Keys work.
Changes
0x12lighting frames and route0x12through the Windows long-report endpointHidppChannelTesting
cargo fmt --all -- --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspaceRUSTDOCFLAGS="-D warnings" cargo doc -p openlogi-hidpp -p openlogi-hid --no-deps0x12endpoint selection is unit-tested, but the change was not runtime-tested on Windows hardware.Part of #521