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 (