From f72af430516ce505eae65c3700b764a4b02dced8 Mon Sep 17 00:00:00 2001 From: Inferencebot Date: Fri, 13 Nov 2026 21:17:59 +0000 Subject: [PATCH] dashboard: build the shared metric row at boot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit buildMetricButtons() was defined but never called — a one-shot replace had slipped the call into loadGuests()'s 401 branch, and removing that left no call at all. So the dashboard rendered its data with an empty metric row: no way to switch between the shared metrics. Called at boot now, anchored on the closing script tag, and the harnesses plus the served-page browser check confirm the row exists with all six data-metric buttons. --- app/main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/main.py b/app/main.py index b936f7e..fb46ee9 100644 --- a/app/main.py +++ b/app/main.py @@ -1718,6 +1718,10 @@ async function revokeKey(name) { } catch (e) { flash(e.message, false); } } +// The shared metric row (CHART_METRICS) is built here, at boot. It used to +// be missing entirely: a one-shot replace had put this call inside +// loadGuests()'s 401 branch, where it never ran. +buildMetricButtons(); load();