From fa62417328950f8d7300274f4c085751ad906693 Mon Sep 17 00:00:00 2001 From: iris Date: Fri, 5 Jun 2026 11:30:59 +0200 Subject: [PATCH] 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. --- frontend/packages/dashboard/src/tabs.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/packages/dashboard/src/tabs.js b/frontend/packages/dashboard/src/tabs.js index 5ef70fc0..2441836c 100644 --- a/frontend/packages/dashboard/src/tabs.js +++ b/frontend/packages/dashboard/src/tabs.js @@ -4036,6 +4036,12 @@ window.marked = marked; (approvalsState?.pending?.length ?? 0) + (questionsState?.pending?.length ?? 0); 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 // entries are kept for history but aren't 'attention'). let sysCount = 0;