From a58816d17e38a194727520298fe0ae30345add20 Mon Sep 17 00:00:00 2001 From: iris Date: Sun, 26 Jul 2026 17:21:21 +0200 Subject: [PATCH] fix(stats): move window selector into the page header tab bar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #2720 (partial — stats tab placement + contrast). The time-window nav was in
below the page title, so it controlled hash routing but wasn't visually part of the page chrome. Move it into
(same row as ← home / ST4TS), fill the remaining header space, and right-align the buttons — consistent with the /logs.html tabbar pattern. Also set explicit color/border on inactive buttons so they remain readable on lower-contrast operator colour schemes (var(--subtext1) fallback to var(--muted)). --- frontend/packages/dashboard/src/stats.css | 21 +++++++++++++++++---- frontend/packages/dashboard/src/stats.html | 15 ++++++--------- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/frontend/packages/dashboard/src/stats.css b/frontend/packages/dashboard/src/stats.css index ab991375..e7c9f665 100644 --- a/frontend/packages/dashboard/src/stats.css +++ b/frontend/packages/dashboard/src/stats.css @@ -16,14 +16,27 @@ body.stats-shell { padding: 1.2em 1.5em 2em; } -/* Window selector. Buttons keep the shared `.btn` pill look; the active - one is flagged by createTabStrip via `.hive-tab--active` (was a bespoke - `.active` toggle). */ +/* Window selector — now lives in the page-header (same row as ← home / + ST4TS title). Fills the remaining header space and right-aligns the + buttons. The shared `.btn` pill look is kept; createTabStrip flags the + active one with `.hive-tab--active`. */ .hive-stats-windows { display: flex; flex-wrap: wrap; gap: 6px; - margin: 12px 0; + flex: 1; + min-width: 0; + justify-content: flex-end; + /* Smaller than the default .btn so the pills fit comfortably in the + header without competing visually with the page title. */ + font-size: 0.82em; +} +/* Inactive buttons: slightly muted to distinguish from the active window, + but readable even on low-contrast operator colour schemes. */ +.hive-stats-windows .btn { + color: var(--subtext1, var(--muted)); + border-color: var(--border); + font-size: 1em; /* relative to the .hive-stats-windows 0.82em */ } .hive-stats-windows .btn.hive-tab--active { border-color: var(--amber); diff --git a/frontend/packages/dashboard/src/stats.html b/frontend/packages/dashboard/src/stats.html index 898e99b8..d90f66bb 100644 --- a/frontend/packages/dashboard/src/stats.html +++ b/frontend/packages/dashboard/src/stats.html @@ -18,15 +18,8 @@ - -
-

hive-wide turn statistics, aggregated across every agent over the selected window. cost is a rough estimate from approximate per-model list prices — it drifts and is a ballpark, not a bill.

- - + +
+ +
+

hive-wide turn statistics, aggregated across every agent over the selected window. cost is a rough estimate from approximate per-model list prices — it drifts and is a ballpark, not a bill.

◇ busiest agents