From 14f550c21baa8561898a866c7aa8a7840d4e505e Mon Sep 17 00:00:00 2001 From: Stephen Schuresko Date: Thu, 24 Sep 2026 10:59:27 -0400 Subject: [PATCH] feat(dashboard): add zero-scale explanation banner and trigger status refresh on Open App & tab switch --- cmd/zero-scale-dashboard/dashboard.html | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/cmd/zero-scale-dashboard/dashboard.html b/cmd/zero-scale-dashboard/dashboard.html index 3336b00..361b301 100644 --- a/cmd/zero-scale-dashboard/dashboard.html +++ b/cmd/zero-scale-dashboard/dashboard.html @@ -475,7 +475,13 @@ ⚡ Zero-Scale Deployed Services 0 -
Consolidated systemd runner compute runtime
+
Consolidated systemd runner compute runtime • 10s idle scale-down
+ +
+ ⚡ +
+ On-Demand Serverless Compute: Services remain "Scaled to Zero" when inactive to conserve cluster resources. Opening a service instantly boots it in under 200ms. If you click Open App on an idle service and switch tabs back to this dashboard within 10 seconds, the badge will show 🟢 Active before scaling down automatically after 10 seconds of idle! +
Querying zero-scale runner runtime...
@@ -806,7 +812,7 @@ function renderDashboard(data) {
${app.description || 'Zero-scale dynamic service'}
- 🌐 Open App + 🌐 Open App 🔐 Logs
`; @@ -849,6 +855,18 @@ function renderDashboard(data) { }); } +function handleOpenApp() { + setTimeout(loadStatus, 400); + setTimeout(loadStatus, 1500); +} + +// Automatically refresh status whenever the user switches back to this tab +document.addEventListener('visibilitychange', () => { + if (document.visibilityState === 'visible') { + loadStatus(); + } +}); + // Initial load & 10s auto-refresh loadStatus(); setInterval(loadStatus, 10000);