From b52baceb501b1f7fbb64b7e80a1dc8acf18da1ce Mon Sep 17 00:00:00 2001 From: Hayyan Hajwani <129366924+Hayyan612@users.noreply.github.com> Date: Wed, 16 Sep 2026 13:55:24 +0530 Subject: [PATCH] fix(sites): fall back to newtVersion so the Type badge is never empty The site overview rendered an empty badge for any site whose newt has not reported the newer agent fields. The early return only bails out when both agent and newtVersion are missing, so a site with newtVersion set but agent null fell through to a badge whose label came solely from agent and whose version came solely from agentVersion, leaving both blank. Label such a site Newt and fall back to newtVersion for the version. Updating the newt populated the new fields, which is why the badge appeared to fix itself on upgrade. Closes #3766 --- src/components/SitesTable.tsx | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/components/SitesTable.tsx b/src/components/SitesTable.tsx index 61797f1ec..f9d541d3f 100644 --- a/src/components/SitesTable.tsx +++ b/src/components/SitesTable.tsx @@ -390,22 +390,21 @@ export default function SitesTable({ // it has not checked in yet return -; } + // agent and agentVersion were added after newtVersion, so a + // site still running an older Newt reports only newtVersion. + // Without these fallbacks the badge renders with no label and + // no version at all. + const agentLabel = + originalRow.agent == "cli" ? "Pangolin CLI" : "Newt"; + const agentVersion = + originalRow.agentVersion ?? originalRow.newtVersion; return (