From 78bfad0ec6ae97f6178112268eb4430d7ab644ae Mon Sep 17 00:00:00 2001 From: Oliver Kieselbach Date: Tue, 8 Sep 2026 22:37:29 +0200 Subject: [PATCH] web: the portal What's new panel names the currently published agent version A quiet third line in the panel header ("Latest agent version 2.0.1452", faint, the number monospaced) reads from the existing config/latest-versions endpoint. The monospaced string is the same one the session list shows in its "Agent Version" column, so a reader can tell at a glance whether their fleet runs the latest agent. Portal and signed-in only: the endpoint is AuthenticatedUser, and the public site has no session list to compare against. The gate sits on the mount of the small component, so the landing page never even issues the request; a missing version renders nothing. --- .../components/WhatsNewPanel.tsx | 28 +++++++++++++++++-- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/src/Web/autopilot-monitor-web/components/WhatsNewPanel.tsx b/src/Web/autopilot-monitor-web/components/WhatsNewPanel.tsx index 9d0cf350..d5d77e4b 100644 --- a/src/Web/autopilot-monitor-web/components/WhatsNewPanel.tsx +++ b/src/Web/autopilot-monitor-web/components/WhatsNewPanel.tsx @@ -6,6 +6,7 @@ import { usePathname } from "next/navigation"; import { ModalPortal } from "./ModalPortal"; import { useAuth } from "@/contexts/AuthContext"; import { useWhatsNew } from "@/hooks/useWhatsNew"; +import { useLatestVersions } from "@/lib/useLatestVersions"; import { closeWhatsNew } from "@/lib/whatsNewStore"; import { formatInlineMarkdown } from "@/lib/formatInlineMarkdown"; import { isPublicPath } from "@/lib/hostRouting"; @@ -107,6 +108,24 @@ function EntryRow({ entry, isNew }: { entry: WhatsNewEntry; isNew: boolean }) { ); } +/** + * The currently published agent version, quiet under the header line. Rendered only for + * signed-in portal users (the endpoint is AuthenticatedUser, and the public site has no + * session list to compare against), so the mount itself is the fetch gate. Same plain, + * monospaced string as the "Agent Version" column of the session list — that match is the + * whole point: the reader sees at a glance whether their fleet runs the latest agent. + */ +function LatestAgentVersionLine() { + const { getAccessToken } = useAuth(); + const { latestAgentVersion } = useLatestVersions(getAccessToken); + if (!latestAgentVersion) return null; + return ( +

+ Latest agent version {latestAgentVersion} +

+ ); +} + function SkeletonRows() { return (