Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Show the age of the last update check on the updates panel
rcourtman49b40911a40a
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex 38f62f227c..e662d68a77 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -4540,6 +4540,19 @@ update-surface wording inline. `CopyCommandBlock` must use the sharedClipboard API fallback path and only report copied state after the shared copypath succeeds.+The update verdict is honest about its age. The frontend serves the update+verdict from a 24-hour localStorage cache, so the panel's "Up to date" state+must render the age of the check it came from rather than reading as a live+comparison (#1601). `frontend-modern/src/stores/updates.ts` exposes+`lastCheckedAt`, the epoch milliseconds of the check backing the currently+displayed verdict, set on fresh checks, on cached-verdict reuse, and on the+cached fallback after a failed check.+`frontend-modern/src/utils/updatesPresentation.ts` owns the customer-facing+wording through `getUpdateCheckedLabel` ("Checked 3 hours ago", "Not checked+yet"); the panel shell must not inline that copy and hides the line for+source builds, where update checks are disabled. Regression boundary:+`frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts`.+The reporting operations surface now follows the same shell-state-model rule.`frontend-modern/src/components/Settings/ReportingPanel.tsx` stays theoperations-panel shell, whilediff --git a/frontend-modern/browser-verification.json b/frontend-modern/browser-verification.jsonindex 322ee14c78..40c17880db 100644--- a/frontend-modern/browser-verification.json+++ b/frontend-modern/browser-verification.json@@ -1,50 +1,40 @@{"version": 1,- "base_sha": "a7849c9ef04ababee688135394c81adca61c0ea2",- "verified_at": "2026-08-09T22:58:23Z",+ "base_sha": "8bde827941f6c2a0c89da2e1a424e04c175edb5d",+ "verified_at": "2026-08-10T05:40:00Z","result": "passed","changed_paths": [- "frontend-modern/src/components/SetupWizard/SetupCompletionPanel.tsx",- "frontend-modern/src/components/SetupWizard/SetupCompletionPreview.tsx",- "frontend-modern/src/components/SetupWizard/setupCompletionModel.ts",- "frontend-modern/src/components/SetupWizard/setupCompletionPreviewScenarios.ts",- "frontend-modern/src/i18n/messages.de.ts",- "frontend-modern/src/i18n/messages.es.ts",- "frontend-modern/src/i18n/messages.ts"+ "frontend-modern/src/components/Settings/UpdatesSettingsPanel.tsx",+ "frontend-modern/src/stores/updates.ts",+ "frontend-modern/src/utils/updatesPresentation.ts"],"content_sha256": {- "frontend-modern/src/components/SetupWizard/SetupCompletionPanel.tsx": "c349eb0a08633a2f331b2c79c4aa5f74f27d62c1342d2dd1d3a69558d05c6ac3",- "frontend-modern/src/components/SetupWizard/SetupCompletionPreview.tsx": "15d130f8b6cad7079db2215e4df5ab9d282bdb03f0e644578e515086e47e24c8",- "frontend-modern/src/components/SetupWizard/setupCompletionModel.ts": "0111a04873eff8c028ffdeb8a9616e60ce54e72177c83445631413144eb13355",- "frontend-modern/src/components/SetupWizard/setupCompletionPreviewScenarios.ts": "224c4424ac0934c42275adc2f7dad0c536adf06b245120cfcf7cf2b83592bdf3",- "frontend-modern/src/i18n/messages.de.ts": "8f1131c143c64e207460a32a9b78a20289084c3a1ada0ea3f7581c1ef63c7abd",- "frontend-modern/src/i18n/messages.es.ts": "5595cc905c70d2a4bfc8f7541edc733896449dac8ee9af518d6824bb613295b0",- "frontend-modern/src/i18n/messages.ts": "467ceeefc62f6f65f33db541de98e830168fa195863cac3cb5afd9c0495f7142"+ "frontend-modern/src/components/Settings/UpdatesSettingsPanel.tsx": "67dfd5413739e71afff3a8930e5de14a5401f0446ae6a346e2e6354a189715b8",+ "frontend-modern/src/stores/updates.ts": "367fc3dcbdedce632209c578b0ba38ecc6aca66800652cf13d6f1a2fb9d0bb83",+ "frontend-modern/src/utils/updatesPresentation.ts": "91043539d8b46795d0ded6ead89d11a42d050d86b9662641aa37c8554c0adc6d"},"routes": [- "/preview/setup-complete?scenario=pro-unlicensed",- "/preview/setup-complete",- "/settings/pulse-intelligence/billing/plan"+ "/settings (System > Pulse server updates panel)"],"viewports": [{- "width": 1440,- "height": 1600+ "width": 1280,+ "height": 720},{"width": 390,- "height": 1500+ "height": 844}],"states": [- "The pro-unlicensed preview scenario rendered the Activate Pulse Pro card between the credentials card and the next-step card, with the factual license description and the Enter activation key button, in dark desktop and light 390px mobile viewports.",- "The default preview scenario rendered the completion panel with no Activate Pulse Pro text anywhere in the document, confirming the pointer is absent for community sessions.",- "The live dev backend (Pro binary, unlicensed Community tier) served /settings/pulse-intelligence/billing/plan as the full Plans & Billing panel including the License recovery section with the Paste your license key input, confirming the pointer's destination renders the activation form rather than blanking.",- "Console showed only WebSocket sync-reconnect noise from the ad-hoc Vite proxy; no errors from the new panel code."+ "Up to date status with no prior check in this browser rendered 'Not checked yet' directly under the status label.",+ "Up to date status backed by a three-hour-old cached check (seeded pulse-updates localStorage entry with matching currentVersion, page reloaded) rendered 'Checked 3 hours ago' under the status label.",+ "The freshness line rendered on desktop 1280px and mobile 390px viewports without layout breakage next to the existing check-mode footer.",+ "Console showed no errors after exercising both states."],"interactions": [- "Clicked Enter activation key on the pro-unlicensed preview scenario and confirmed client-side navigation landed on /settings/pulse-intelligence/billing/plan.",- "Logged into the live dev backend through the sidecar Vite proxy and loaded /settings/pulse-intelligence/billing/plan to inspect the rendered license recovery form.",- "Reloaded the preview route across dark 1440px and light 390px viewports to confirm layout and theming of the activation card."+ "Logged into the live dev frontend, reached the Pulse server updates panel via settings search.",+ "Seeded the pulse-updates localStorage entry with lastCheck three hours in the past and reloaded to exercise the cached-verdict path.",+ "Removed the seeded localStorage entry after verification."]}diff --git a/frontend-modern/src/components/Settings/UpdatesSettingsPanel.tsx b/frontend-modern/src/components/Settings/UpdatesSettingsPanel.tsxindex e684aa3927..5b10a1dd8b 100644--- a/frontend-modern/src/components/Settings/UpdatesSettingsPanel.tsx+++ b/frontend-modern/src/components/Settings/UpdatesSettingsPanel.tsx@@ -23,10 +23,12 @@ import {getUpdateCheckActionLabel,getUpdateAvailabilityHeading,getUpdateBuildBadges,+ getUpdateCheckedLabel,getUpdateCheckModeLabel,getUpdatePrimaryStatusLabel,UPDATES_PANEL_COPY,} from '@/utils/updatesPresentation';+import { updateStore } from '@/stores/updates';export interface UpdatesSettingsPanelProps {versionInfo: Accessor<VersionInfo | null>;@@ -166,9 +168,16 @@ export const UpdatesSettingsPanel: Component<UpdatesSettingsPanelProps> = (props<Showwhen={props.updateInfo()?.available}fallback={- <p class="mt-1 text-lg font-bold text-base-content">- {getUpdatePrimaryStatusLabel(false)}- </p>+ <>+ <p class="mt-1 text-lg font-bold text-base-content">+ {getUpdatePrimaryStatusLabel(false)}+ </p>+ <Show when={!props.versionInfo()?.isSourceBuild}>+ <p class="mt-0.5 text-xs text-muted">+ {getUpdateCheckedLabel(updateStore.lastCheckedAt())}+ </p>+ </Show>+ </>}><p class="mt-1 text-lg font-bold text-green-700 dark:text-green-300">diff --git a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.tsindex ad1bfacf89..3654630896 100644--- a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts+++ b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts@@ -42,6 +42,7 @@ import systemLogsPanelSource from '../SystemLogsPanel.tsx?raw';import updatesSettingsPanelSource from '../UpdatesSettingsPanel.tsx?raw';import updateHistorySectionSource from '../UpdateHistorySection.tsx?raw';import updateInstallGuideSource from '../UpdateInstallGuide.tsx?raw';+import updatesPresentationSource from '../../../utils/updatesPresentation.ts?raw';import agentProfilesPanelSource from '../AgentProfilesPanel.tsx?raw';import infrastructureWorkspaceSource from '../InfrastructureWorkspace.tsx?raw';import infrastructureInstallerSectionSource from '../InfrastructureInstallerSection.tsx?raw';@@ -1371,6 +1372,20 @@ describe('settings architecture guardrails', () => {);});+ it('keeps the update verdict honest about the age of the check behind it', () => {+ // The displayed verdict can come from the 24h localStorage cache, so the+ // Up to date state must carry the age of the check it came from through+ // the shared presentation helper, or a stale verdict reads as a live+ // comparison (#1601). The copy stays in the presentation owner, never+ // inline in the panel shell.+ expect(updatesSettingsPanelSource).toContain(+ 'getUpdateCheckedLabel(updateStore.lastCheckedAt())',+ );+ expect(updatesSettingsPanelSource).toContain('!props.versionInfo()?.isSourceBuild');+ expect(updatesPresentationSource).toContain("return 'Not checked yet'");+ expect(updatesPresentationSource).toContain('`Checked ${relative}`');+ });+it('keeps infrastructure on a source-manager landing with route-backed dialogs', () => {expect(infrastructureWorkspaceSource).toContain("import { ConnectionEditor } from './ConnectionEditor/ConnectionEditor';",diff --git a/frontend-modern/src/stores/updates.ts b/frontend-modern/src/stores/updates.tsindex add4cf855c..1827c62b41 100644--- a/frontend-modern/src/stores/updates.ts+++ b/frontend-modern/src/stores/updates.ts@@ -154,6 +154,11 @@ const [versionInfo, setVersionInfo] = createSignal<VersionInfo | null>(null);const [isChecking, setIsChecking] = createSignal(false);const [isDismissed, setIsDismissed] = createSignal(false);const [lastError, setLastError] = createSignal<string | null>(null);+// Epoch ms of the check that produced the currently displayed verdict. The+// verdict can be served from the 24h localStorage cache, so the panel pairs+// its no-update status with this timestamp to avoid reading as a live+// comparison (#1601).+const [lastCheckedAt, setLastCheckedAt] = createSignal<number | null>(null);const sleep = (ms: number): Promise<void> =>new Promise((resolve) => {@@ -315,6 +320,7 @@ const checkForUpdates = async (force = false): Promise<void> => {setVersionInfo(currentVersion);setUpdateInfo(state.updateInfo);setUpdateAvailable(state.updateInfo.available);+ setLastCheckedAt(state.lastCheck || null);setLastError(null);// Check if this version was dismissed@@ -381,6 +387,7 @@ const checkForUpdates = async (force = false): Promise<void> => {}// Save to cache+ setLastCheckedAt(now);saveState({...state,lastCheck: now,@@ -394,6 +401,7 @@ const checkForUpdates = async (force = false): Promise<void> => {logger.warn('Using cached update info after update check failure');setUpdateInfo(fallbackInfo);setUpdateAvailable(fallbackInfo.available);+ setLastCheckedAt(state.lastCheck || null);setIsDismissed(state.dismissedVersion === fallbackInfo.latestVersion);} else {setUpdateAvailable(false);@@ -438,6 +446,7 @@ export const updateStore = {isChecking,isDismissed,lastError,+ lastCheckedAt,isUpdateVisible,// Actionsdiff --git a/frontend-modern/src/utils/__tests__/updatesPresentation.test.ts b/frontend-modern/src/utils/__tests__/updatesPresentation.test.tsindex e89dc887c1..db0f884675 100644--- a/frontend-modern/src/utils/__tests__/updatesPresentation.test.ts+++ b/frontend-modern/src/utils/__tests__/updatesPresentation.test.ts@@ -1,8 +1,9 @@-import { describe, expect, it } from 'vitest';+import { afterEach, describe, expect, it, vi } from 'vitest';import {getUpdateCheckActionLabel,getUpdateAvailabilityHeading,getUpdateBuildBadges,+ getUpdateCheckedLabel,getUpdateCheckModeLabel,getUpdatePrimaryStatusLabel,UPDATES_PANEL_COPY,@@ -49,4 +50,30 @@ describe('updatesPresentation', () => {expect(getUpdateCheckActionLabel(true)).toBe('Checking...');expect(getUpdateCheckActionLabel(false)).toBe('Check Now');});++ describe('getUpdateCheckedLabel', () => {+ afterEach(() => {+ vi.useRealTimers();+ });++ it('labels a missing or unset check as not checked', () => {+ expect(getUpdateCheckedLabel(null)).toBe('Not checked yet');+ expect(getUpdateCheckedLabel(undefined)).toBe('Not checked yet');+ expect(getUpdateCheckedLabel(0)).toBe('Not checked yet');+ });++ it('states the age of the check the verdict came from', () => {+ vi.useFakeTimers();+ vi.setSystemTime(new Date('2026-08-10T12:00:00Z'));+ expect(getUpdateCheckedLabel(new Date('2026-08-10T09:00:00Z').getTime())).toBe(+ 'Checked 3 hours ago',+ );+ expect(getUpdateCheckedLabel(new Date('2026-08-10T11:59:30Z').getTime())).toBe(+ 'Checked 30s ago',+ );+ expect(getUpdateCheckedLabel(new Date('2026-08-09T11:00:00Z').getTime())).toBe(+ 'Checked 1 day ago',+ );+ });+ });});diff --git a/frontend-modern/src/utils/updatesPresentation.ts b/frontend-modern/src/utils/updatesPresentation.tsindex df431e2a51..dd9a6d34a1 100644--- a/frontend-modern/src/utils/updatesPresentation.ts+++ b/frontend-modern/src/utils/updatesPresentation.ts@@ -1,4 +1,5 @@import type { VersionInfo } from '@/api/updates';+import { formatRelativeTime } from '@/utils/format';export interface UpdateBuildBadge {label: string;@@ -73,6 +74,15 @@ export function getUpdateCheckModeLabel(enabled: boolean): string {return enabled ? 'Auto-check enabled' : 'Manual checks only';}+// The displayed verdict can come from a day-old cached check, so "Up to date"+// must carry the age of the check it is based on or it reads as a live+// comparison (#1601).+export function getUpdateCheckedLabel(lastCheckedMs: number | null | undefined): string {+ if (!lastCheckedMs || lastCheckedMs <= 0) return 'Not checked yet';+ const relative = formatRelativeTime(lastCheckedMs);+ return relative ? `Checked ${relative}` : 'Not checked yet';+}+export function getUpdateCheckActionLabel(checking: boolean): string {return checking ? UPDATES_PANEL_COPY.checkingLabel : UPDATES_PANEL_COPY.checkNowLabel;}