feat(dashboard): prefix browser tab title with pending call count
When approvals or questions are waiting, document.title is prefixed with (N) so the operator can see activity in a background browser tab without switching windows. Clears to the base title when zero. Implemented in refreshTabCounts (1s tick): strips any existing prefix before re-applying so the hive-identity title update (once on state load) composes cleanly.
This commit is contained in:
parent
d4d8fa6d7a
commit
fa62417328
1 changed files with 6 additions and 0 deletions
|
|
@ -4036,6 +4036,12 @@ window.marked = marked;
|
||||||
(approvalsState?.pending?.length ?? 0) +
|
(approvalsState?.pending?.length ?? 0) +
|
||||||
(questionsState?.pending?.length ?? 0);
|
(questionsState?.pending?.length ?? 0);
|
||||||
setTabCount('call', callCount);
|
setTabCount('call', callCount);
|
||||||
|
// Browser tab title prefix — lets the operator see the pending
|
||||||
|
// call count without switching to the window. Strips any existing
|
||||||
|
// `(N) ` prefix before re-applying so identity-title updates
|
||||||
|
// (which run once on state load, not every tick) compose cleanly.
|
||||||
|
const rawTitle = document.title.replace(/^\(\d+\) /, '');
|
||||||
|
document.title = callCount > 0 ? `(${callCount}) ${rawTitle}` : rawTitle;
|
||||||
// SYST3M — queued + running rebuild_queue entries (terminal
|
// SYST3M — queued + running rebuild_queue entries (terminal
|
||||||
// entries are kept for history but aren't 'attention').
|
// entries are kept for history but aren't 'attention').
|
||||||
let sysCount = 0;
|
let sysCount = 0;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue