Files
bellsystems-cp/frontend/src/pages/bellcloud
bonaminandClaude Opus 5.5 fb35ace0c7 feat(devices): paint list/detail from last-known data, revalidate silently
The device list and detail page showed empty status columns/fields until
every request finished. They now render instantly from the last-known data
and refresh in the background, with a small "Syncing…" spinner in the page
header while fresh data is in flight.

- lib/deviceCache.js: last-known device list (per query), devices by id,
  fleet status map, list metrics and Health-overview datasets. In memory
  plus sessionStorage (except the large Health datasets); every storage
  access is guarded.
- DeviceList: seeded from cache; status + metrics fetched in parallel with
  the device list instead of after it; out-of-order search responses are
  ignored; live heartbeats are written back to the cache.
- DeviceDetail: seeded from cache (DeviceList already holds the device),
  reloads after modal saves refresh in place instead of unmounting the
  tab, status comes from the new /mqtt/status/{serial}.
- HealthTab overview: same stale-while-revalidate per device + range.

Health tab firmware lag: the Firmware/OTA tile read the version from the
latest diagnostics report, which the firmware sends only every 5 minutes
(the first 5 minutes after boot), and the tab never re-fetched it while
open — so after an OTA it kept showing the old version. Firmware reports the
same compiled FW_VERSION in heartbeat and diagnostics, so the tile now uses
the heartbeat (30s, pushed live over WebSocket) and only shows the OTA
"update available" badge when the diagnostics report describes the
firmware that is running now. HealthTab also passes deviceId/canEdit down
to LogsTab for the log management actions in the next commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 21:34:38 +02:00
..