feat(dashboard): preserve call-count prefix on hive-identity title update

On refreshState, the hive-identity title update (fired once when
hive_name/swarm_name are configured) now reads any existing (N) prefix
and preserves it, so the title doesn't briefly drop back to the bare
identity string before refreshTabCounts re-applies the prefix.
This commit is contained in:
iris 2026-06-05 11:32:25 +02:00 committed by mara
commit e24cfba124

View file

@ -3684,7 +3684,10 @@ window.marked = marked;
: hive || swarm;
hiveId.textContent = label;
hiveId.hidden = false;
document.title = label + ' // h1ve-c0re';
// Preserve any (N) call-count prefix already applied by
// refreshTabCounts so the title doesn't flicker on reload.
const existingPrefix = document.title.match(/^(\(\d+\) )/)?.[1] || '';
document.title = existingPrefix + label + ' // h1ve-c0re';
}
}
const openDetails = snapshotOpenDetails();