fix(agent): prefer online device for input capture#453
Conversation
Greptile SummaryThis PR fixes input capture falling silent when the persisted GUI device selection is offline.
Confidence Score: 5/5Safe to merge — the online-preference logic in The three-step fallback chain in No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[pick_current: devices + saved key] --> B{saved key in device list?}
B -- No --> E
B -- Yes, index S --> C{devices at S is online?}
C -- Yes --> D[return S - prefer online saved]
C -- No --> E{any online device?}
E -- Yes --> F[return first online index]
E -- No --> G[return S - all-offline preserve]
D --> Z[current index]
F --> Z
G --> Z
Z --> I{next_current != self.current?}
I -- Yes --> J[self.current = next_current + rebuild shared maps]
I -- No --> K[update devices only, skip rebuild]
Reviews (2): Last reviewed commit: "docs(agent): clarify inventory selection..." | Re-trigger Greptile |
21fba99 to
b9e84f3
Compare
Summary
Keep programmable input capture on a usable device when the persisted GUI selection is offline.
Changes
openlogi-agent-core: prefer the saved GUI selection while it is online, otherwise use the first online device, and preserve the saved selection when every device is offline.Testing
cargo fmt --all -- --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspaceFixes #452