fix(gui): drop disconnected devices from carousel#282
Conversation
Greptile SummaryThis PR removes the config-level
Confidence Score: 5/5Safe to merge — the deletion is surgical, the TOML migration is seamless, and the transient-miss safety net is already in place. The change removes a well-defined feature (config-level identity persistence) whose only job was to keep offline/sleeping cards visible. The HID layer's existing probe cache already covers sleeping devices (documented in the pre-existing DeviceRecord.capabilities comment), and merge_inventory_snapshot's two-miss grace period guards against transient probe gaps. Old config files that contain an identity block will silently ignore it on the next read because RawDeviceConfig has no deny_unknown_fields, so there is no compatibility breakage. All three call sites of persist_identities and build_device_list's Config parameter are consistently updated, the tests for the removed helpers are removed, and the remaining tests are updated to the new signature. No files require special attention. Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant Agent as HID Agent
participant GUI as GUI (AppState)
participant Carousel as Carousel UI
Note over Agent,Carousel: Before this PR — ghost cards could linger
Agent->>GUI: DeviceInventory (live probe)
GUI->>GUI: build_device_list(inventories, cache, config)
GUI->>GUI: append_offline_known (Config.known_identities)
Note right of GUI: Disconnected device "A"\nstill added from config!
GUI->>Carousel: [live B] + [ghost A]
Note over Agent,Carousel: After this PR — live inventory only
Agent->>GUI: DeviceInventory (live probe)
GUI->>GUI: build_device_list(inventories, cache)
GUI->>GUI: "merge_inventory_snapshot (grace=2 misses)"
Note right of GUI: Sleeping device kept ≤2 misses\nDisconnected device drops out
GUI->>Carousel: [live B] only
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant Agent as HID Agent
participant GUI as GUI (AppState)
participant Carousel as Carousel UI
Note over Agent,Carousel: Before this PR — ghost cards could linger
Agent->>GUI: DeviceInventory (live probe)
GUI->>GUI: build_device_list(inventories, cache, config)
GUI->>GUI: append_offline_known (Config.known_identities)
Note right of GUI: Disconnected device "A"\nstill added from config!
GUI->>Carousel: [live B] + [ghost A]
Note over Agent,Carousel: After this PR — live inventory only
Agent->>GUI: DeviceInventory (live probe)
GUI->>GUI: build_device_list(inventories, cache)
GUI->>GUI: "merge_inventory_snapshot (grace=2 misses)"
Note right of GUI: Sleeping device kept ≤2 misses\nDisconnected device drops out
GUI->>Carousel: [live B] only
Reviews (1): Last reviewed commit: "fix(gui): drop disconnected devices from..." | Re-trigger Greptile |
Fixes #280
Context
Testing
Demo
Screen.Recording.2026-06-17.at.12.33.50.AM.mov