fix(ipc,agent,desktop): surface Input Monitoring via agent status and fix registry bincode - #760
Merged
AprilNEA merged 1 commit intoAug 23, 2026
Conversation
Greptile SummaryThe PR moves macOS Input Monitoring status reporting to the hardware-owning agent and corrects the positional bincode representation of an absent standalone registry model ID.
Confidence Score: 5/5The PR appears safe to merge because no blocking failure remains within the eligible follow-up-review scope. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| crates/openlogi-agent-core/src/watchers/input_monitoring.rs | Adds a polling watcher that reports changes to the agent process’s macOS Input Monitoring grant. |
| crates/openlogi-agent-core/src/observable.rs | Seeds and publishes Input Monitoring state through the existing generation-stamped observation model. |
| crates/openlogi-agent/src/main.rs | Starts the permission watcher and applies its updates to observable agent state. |
| crates/openlogi-desktop/src/windows/settings/permissions.rs | Renders Input Monitoring from agent status and uses Unknown while no agent status is available. |
| crates/openlogi-core/src/device.rs | Ensures an absent standalone registry model ID still emits its positional bincode field. |
| crates/openlogi-ipc/src/ipc.rs | Appends Input Monitoring state to AgentStatus and versions both intentional wire-format changes. |
| crates/openlogi-ipc/tests/wire_format.rs | Updates wire goldens and verifies that serialized values deserialize and re-encode identically. |
Sequence Diagram
sequenceDiagram
participant macOS
participant Watcher as Agent permission watcher
participant State as ObservableState
participant IPC as Agent IPC
participant UI as Permissions UI
Watcher->>macOS: Check Input Monitoring access
macOS-->>Watcher: Granted or denied
Watcher->>State: Update input_monitoring_granted
State->>State: Increment generation when changed
UI->>IPC: observe(last generation)
IPC-->>UI: Complete AgentSnapshot
UI->>UI: Render Granted, Denied, or Unknown
Reviews (2): Last reviewed commit: "fix(ipc): surface Input Monitoring via a..." | Re-trigger Greptile
davidbudnick
previously approved these changes
Aug 21, 2026
…model_id bincode Fixes AprilNEA#606 — Input Monitoring row read the GUI process's IOHIDCheckAccess rather than the agent's, showing a grant that never affects HID discovery. Add input_monitoring_granted to AgentStatus (append-only, bump PROTOCOL_VERSION to 25), populate from openlogi_hid::permissions::has_access via a new input_monitoring watcher and ObservableState setter, and read it from AppState::agent_status in the Settings page. Fixes AprilNEA#571 — StandaloneDevice::registry_model_id used skip_serializing_if, truncating bincode when None and making every AgentSnapshot undecodable. Drop the attribute, keep #[serde(default)], regenerate the None golden and make assert_wire round-trip (decode + re-encode) without requiring PartialEq on tarpc-generated types. Depends on AprilNEA#759 (v24) — this stacks v25 on top; will rebase to keep 24+25 sequential once AprilNEA#759 lands.
AprilNEA
force-pushed
the
fix/permissions-input-monitoring-606
branch
from
August 23, 2026 04:01
b8cfde2 to
5816f93
Compare
Merged
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
Fixes #606 and #571.
#606: Settings → Permissions → Input Monitoring checked
IOHIDCheckAccessin the GUI process (openlogi-permissions::input_monitoring()), but HID devices are opened by the agent under a distinct code-signing identity (org.openlogi.agent). The row therefore showed the GUI's grant, not whether discovery can actually open HID. This mirrors the already-correct Accessibility handling.#571:
StandaloneDevice::registry_model_idusedskip_serializing_if, truncating bincode whenNoneand making everyAgentSnapshotundecodable while such a device is present.Changes
crates/openlogi-ipc/src/ipc.rs:55— bumpPROTOCOL_VERSION23→25: v24 fixes bincode forregistry_model_id, v25 appendsAgentStatus::input_monitoring_granted(with#[expect(clippy::struct_excessive_bools)])crates/openlogi-core/src/device.rs:410— dropskip_serializing_if, keep#[serde(default)]crates/openlogi-agent-core/src/watchers/input_monitoring.rs(new) +watchers/mod.rs— pollopenlogi_hid::permissions::has_access()like the accessibility watchercrates/openlogi-agent-core/src/observable.rs:46— seed and publishinput_monitoring_granted; addset_input_monitoring_grantedcrates/openlogi-agent/src/main.rs:318— spawn watcher and handleinput_monitoring_rx;#[expect(clippy::too_many_lines)]for selectcrates/openlogi-agent/src/bin/mock_agent.rs:620— mock status granted, remove Snapshot fails to decode when a standalone device has no registry_model_id #571 workaround commentcrates/openlogi-desktop/src/windows/settings/permissions.rs:54— readAppState::agent_status().input_monitoring_grantedinstead of localpermissions::input_monitoring()(Unknown while not connected)crates/openlogi-ipc/tests/wire_format.rs:66— makeassert_wireround-trip (deserialize + re-encode) without requiringPartialEqon tarpc types; regenerate goldens forAgentStatus/snapshot/observation andregistry_model_id = None(…6100)Testing
DEVELOPER_DIR=/Library/Developer/CommandLineTools cargo test -p openlogi-ipc --test wire_format— 13 passed (snapshot/observation with new bool, standalone None now decodable)cargo test -p openlogi-agent-core --lib observable— 10 passedcargo clippy -p openlogi-core -p openlogi-ipc -p openlogi-agent-core -p openlogi-agent --all-targets -- -D warnings— clean (after adding expects)RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --exclude openlogi-ui --exclude openlogi-desktop --exclude openlogi-overlay— cleanhas_access()and wiring through IPC; mock serves granted.Notes
Depends on #759 (v24). This branch stacks v25 on top and currently includes #571's fix as well; will rebase to keep 24→25 sequential once #759 merges (or this can supersede #759 if preferred).
Fixes #571
Fixes #606