From 523ac4137a257864039f0413811a9702348be72a Mon Sep 17 00:00:00 2001 From: Steve Cliff Date: Fri, 8 May 2026 21:47:31 +0100 Subject: [PATCH] ui: show pending-hosts panel even when fleet is otherwise empty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The dashboard's empty-state ("No hosts yet.") was gated on HostCount == 0 alone, which hid the pending-hosts panel — and the inline accept form — for the most common first-run scenario: operator just installed an agent that announced, the fleet has zero accepted hosts, and the only thing the operator needs to do is review fingerprint + click Accept. Tighten the gate so the empty state only shows when there are truly zero hosts and zero pending announces. With a pending host, fall through to the regular dashboard layout so the approval queue is visible and actionable. Caught by the e2e enrol-via-announce smoke test (now unblocked on PR #23). --- web/templates/pages/dashboard.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/templates/pages/dashboard.html b/web/templates/pages/dashboard.html index e95ff78..1788904 100644 --- a/web/templates/pages/dashboard.html +++ b/web/templates/pages/dashboard.html @@ -5,7 +5,7 @@ {{$page := .Page}} {{template "crit_banner" .Page}} - {{if eq $page.HostCount 0}} + {{if and (eq $page.HostCount 0) (eq (len $page.PendingHosts) 0)}} {{/* ---------- empty state ---------- */}}