fix(gui): drop disconnected devices from carousel#282
Conversation
Greptile SummaryThis PR removes the
Confidence Score: 5/5Safe to merge — a well-scoped removal of the offline-identity persistence layer with no new logic introduced. The change is a pure deletion: structs, methods, and call-sites that implement the phantom-card feature are removed uniformly across all three crates, tests are updated to match, and the remaining code (merge_inventory_snapshot with its grace-period logic) is untouched. Existing config files with identity fields will deserialize silently and cleanly because serde ignores unknown keys by default. No new code paths are introduced that could regress. No files require special attention. Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant Agent as HID++ Agent
participant RI as refresh_inventories
participant BDL as build_device_list
participant MIS as merge_inventory_snapshot
participant Carousel as Carousel UI
Agent->>RI: inventory snapshot (live devices only)
RI->>BDL: build from live inventory
BDL-->>RI: "Vec<DeviceRecord> (live only)"
RI->>MIS: merge with previous list
note over MIS: Keeps device through ≤2 consecutive misses<br/>(INVENTORY_MISS_GRACE = 2)
MIS-->>RI: merged list
RI->>Carousel: update device_list
note over Agent,Carousel: Fully disconnected device absent >2 snapshots → drops from carousel
note over Agent,Carousel: Previously: DeviceIdentity persisted to config.toml<br/>and offline placeholder added back — now removed
%%{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 RI as refresh_inventories
participant BDL as build_device_list
participant MIS as merge_inventory_snapshot
participant Carousel as Carousel UI
Agent->>RI: inventory snapshot (live devices only)
RI->>BDL: build from live inventory
BDL-->>RI: "Vec<DeviceRecord> (live only)"
RI->>MIS: merge with previous list
note over MIS: Keeps device through ≤2 consecutive misses<br/>(INVENTORY_MISS_GRACE = 2)
MIS-->>RI: merged list
RI->>Carousel: update device_list
note over Agent,Carousel: Fully disconnected device absent >2 snapshots → drops from carousel
note over Agent,Carousel: Previously: DeviceIdentity persisted to config.toml<br/>and offline placeholder added back — now removed
Reviews (4): Last reviewed commit: "fix(gui): drop disconnected devices from..." | Re-trigger Greptile |
|
@AprilNEA Any chance you could look at this one, its leaving lots of devices lingering when switching between my work and home macbook. |
da18ba3 to
9a84268
Compare
Fixes #280
Context
Testing
Demo
Screen.Recording.2026-06-17.at.12.33.50.AM.mov