refactor(fleet): separate naming, routes, and snapshot writes

This commit is contained in:
lda committed 2026-10-11 19:24:39 +07:00 Verified
1 parent a4029e20bf
commit c172ce6603
8 files changed
+663 -411

No files matched your search

@@ -75,6 +75,14 @@ Current DHCP leases are summary-eligible and may support wake if they include a
`Device.ips` and `Device.macs` stay as summaries. Summary IPs come from concrete live-ish sources such as current neighbor rows and current DHCP lease rows. Hook-derived and offline IPs remain visible through endpoints but are collapsed out of primary UI summaries by default.
Fleet display labels prefer the saved device name, then a hostname, then a MAC,
then an IP. Generated address labels use `Device: <address>` without presence
prefixes; the badge carries presence. An inactive IP is only a naming fallback
when no name or MAC exists, never evidence of a current address or a wake route.
Offline neighbor evidence does not establish that a DHCP address has expired or
been reassigned. If a concrete source observes that endpoint again, its eligible
IP returns to the summary; manually remembered identifiers are not removed by this.
`Device.presence` is derived from all endpoints, not only summary-eligible endpoints. This lets concrete offline evidence matter while allowing stronger live evidence to override it.
The control plane derives stored snapshot presence and fleet presence from the
+1 -1
View File
@@ -27,7 +27,7 @@ live browser recovery and shutdown behavior are not established by those checks.
- [x] Make **forget remembered device** reachable in the frontend, with confirmation. The existing backend removes the known identity and its identifiers, not agent observations. An observed device may reappear as unknown.
- [x] Add remembered-device rename support, with backend validation and frontend editing (`PATCH /api/v1/control/devices/{device_id}`). Pinned state and identifiers are preserved.
- [ ] Check and complete editing of remembered-device notes.
- [x] Replace generic unnamed-row labels with useful fallbacks. Offline IP-only rows: `Offline device: <ip>`; unknown-presence IP-only rows: `Device: <ip>`. Use MAC fallback when no IP exists; retain a generic label only when neither exists. Inactive endpoint addresses can label a row without becoming active IPs or wake routes. Unknown-only fleet groups remain unknown.
- [x] Replace generic unnamed-row labels with useful fallbacks. Prefer saved name, hostname, then `Device: <mac>`, then `Device: <ip>`; retain a generic label only when neither address exists. Presence stays in the badge, not the name. Inactive IPs can label IP-only rows without becoming active IPs or wake routes. Unknown-only fleet groups remain unknown.
- [ ] Review frontend visibility defaults. Keep an explicit all-rows option; do not hide evidence just to fix poor labels. The user deliberately enabled all-row querying.
Identifier detachment already exists in the current frontend source; it is **not**