feat: Overview live-mode-only NRLs + split locations by type

Two Overview improvements for projects that mix vibration + sound:

- Live monitoring now includes only live-mode (connected) NRLs. connection_mode
  lives in the location's metadata JSON (default "connected"); offline/manual
  NRLs are excluded, and since the section hides when the list is empty, it
  disappears entirely when no NRL is a live SLM.
- The Overview location list is split into separate "Vibration Locations" and
  "NRLs" sections (driven by enabled modules) instead of one mixed list.
  Single-module projects still show just their one section. Live-chip repaint
  listener updated for the per-type list ids.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-22 18:12:45 +00:00
parent 85a64c83f8
commit ee6062f9fb
3 changed files with 40 additions and 27 deletions
+4 -2
View File
@@ -2287,8 +2287,10 @@ async function loadLiveStats() {
// The NRL list partial reloads via htmx (e.g. the 30s dashboard swap), which
// wipes the painted chips — repaint from the last poll as soon as it settles.
document.body.addEventListener('htmx:afterSwap', (e) => {
const id = e.target && e.target.id;
if (id === 'project-locations' || id === 'sound-locations') lsPaintInline(lsLastData);
const id = (e.target && e.target.id) || '';
// Overview lists are now per-type (project-locations-sound/-vibration); the
// Sound tab uses sound-locations. Repaint chips whenever any of them swap.
if (id.startsWith('project-locations') || id === 'sound-locations') lsPaintInline(lsLastData);
});
function startLiveStats() {