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
Improve monitor-first attention states
rcourtman0fa841f66f2d
diff --git a/docs/release-control/v6/internal/subsystems/api-contracts.md b/docs/release-control/v6/internal/subsystems/api-contracts.mdindex 7eca045903..9d98c75a7c 100644--- a/docs/release-control/v6/internal/subsystems/api-contracts.md+++ b/docs/release-control/v6/internal/subsystems/api-contracts.md@@ -946,6 +946,13 @@ payload shape change when the portal presents compact client rows.may present that state as factual trigger-mode context, but it must not infertrigger enablement or queue state from settings payloads, route state, orrun-history labels.+ Patrol coverage freshness is a frontend presentation derived only from the+ canonical `runs.completed_at`, `status.last_patrol_at`,+ `status.next_patrol_at`, `status.interval_ms`, and `status.running` fields.+ The client may warn when the last completed full check is older than its+ bounded freshness window, but it must not mint a second freshness endpoint,+ rewrite the stable Patrol payload, or present old run evidence as a current+ healthy all-clear.12. `frontend-modern/src/api/rbac.ts` shared with `organization-settings`: the RBAC frontend client is both an organization settings control surface and a canonical API payload contract boundary.13. `frontend-modern/src/api/security.ts` shared with `security-privacy`: the security frontend client is both a security/privacy control surface and a canonical API payload contract boundary.14. `frontend-modern/src/api/updates.ts` shared with `deployment-installability`: the updates frontend client is both a deployment-installability control surface and a canonical API payload contract boundary.diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex fd150c97b1..9d502180b5 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -1403,6 +1403,10 @@ settings`, and candidate review when discovered sources are waiting. It mustcompact-list or badge primitives to create protection-current,verification-waiting, schedule-freshness, drift, trust, or proof strips;empty work belongs to the plain empty-state and deliberate History affordance.+ When canonical Patrol evidence is stale, that same empty-state primitive may+ become warning-toned and direct the operator to run Patrol. The stale label+ may appear in the compact work-group row only alongside real current work;+ a calm queue must not repeat the same stale condition in both places.Monitor-context Patrol coverage posture must not use the shared compact listand badge primitives as a generic Proxmox overview or monitor-firstlaunch-page proof strip. A future scoped@@ -3138,6 +3142,11 @@ divide frame locally. Platform table consumers must preserve the owner split:frontend-primitives owns the repeated `PlatformTableShell` frame and guardrailregistry, while platform and unified-resource consumers own the source-specificrow fields, drawers, and resource semantics.+Standalone Pulse Agent and Availability consumers may compose one compact+status summary directly above that shared table frame. The consumer owns the+already-loaded resource counts, freshness-aware attention ordering, and+settings action; the shared primitive boundary still forbids a second fetch,+detached proof strip, decorative chart, or locally recreated table frame.Platform table empty states follow the same registry-backed ownership.`PlatformTableEmptyState` owns the repeated table-card empty-state shell forDocker, Kubernetes, Proxmox, Standalone, TrueNAS, vSphere, and future platformdiff --git a/docs/release-control/v6/internal/subsystems/monitoring.md b/docs/release-control/v6/internal/subsystems/monitoring.mdindex 53a068de17..5ab14d2128 100644--- a/docs/release-control/v6/internal/subsystems/monitoring.md+++ b/docs/release-control/v6/internal/subsystems/monitoring.md@@ -110,6 +110,7 @@ resource health.33. `internal/monitoring/docker_detection.go`34. `internal/monitoring/monitor_polling_containers.go`35. `internal/mock/fixture_graph.go`+35a. `internal/mock/availability_fixtures.go`36. `internal/dockeragent/docker_client.go`37. `pkg/agents/docker/report.go`38. `internal/models/models.go`diff --git a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md b/docs/release-control/v6/internal/subsystems/patrol-intelligence.mdindex b1378150e8..49c3b2d2e5 100644--- a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md+++ b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md@@ -99,6 +99,14 @@ or historical proof/counting for resolved-only work.may point to History for past outcomes, but the workspace must not render acalm-day protection-posture, verification-waiting, schedule-freshness, drift,trust, or proof strip just to restate that no current work exists.+ A calm-looking queue is not an all-clear when its checking evidence is+ stale. `patrolControlPresentation.ts` owns freshness derivation from the+ latest completed check, the server-authored Patrol interval, and the next+ scheduled check. Alongside current work, stale coverage may appear as the+ existing compact cross-source work-group row. On a calm queue, the+ current-findings empty state alone must become warning-toned so the same+ stale condition is not repeated; neither case may add a second protection,+ schedule, or proof strip.Monitor-context coverage posture is a separate presentation boundary, but itmust not render as a generic proof strip on Proxmox overview or othermonitor-first launch pages. A future monitor-specific Patrol affordance must@@ -536,6 +544,11 @@ clear`, `Found N new issues`, `Fixed N issues`, `N issues still open`, orHistorical Patrol trust regressions must also suppress a green all-clear inthe current findings empty state: `0 active findings` means no current Patrolwork, while prior regressions remain Patrol history review context.+ Stale Patrol coverage must suppress the same green all-clear even when the+ last completed check found no issues. Freshness uses at least a 24-hour+ tolerance and otherwise allows two configured Patrol intervals before+ warning, so deliberately slower schedules are not mislabeled while an old+ default-schedule result cannot remain green indefinitely.Assessment coverage caveats must also reconcile against current run-historyproof: a stale coverage factor or prediction must not claim recent coverageis incomplete when the latest completed full Patrol run successfully checkeddiff --git a/docs/release-control/v6/internal/subsystems/registry.json b/docs/release-control/v6/internal/subsystems/registry.jsonindex 8002b151d4..104c878887 100644--- a/docs/release-control/v6/internal/subsystems/registry.json+++ b/docs/release-control/v6/internal/subsystems/registry.json@@ -4349,6 +4349,7 @@"internal/dockeragent/docker_client.go","internal/dockeragent/swarm.go","internal/kubernetesagent/agent.go",+ "internal/mock/availability_fixtures.go","internal/mock/demo_scenarios.go","internal/mock/fixture_graph.go","internal/mock/generator.go",@@ -4628,6 +4629,7 @@"label": "monitoring mock runtime fixture proof","match_prefixes": [],"match_files": [+ "internal/mock/availability_fixtures.go","internal/mock/demo_scenarios.go","internal/mock/fixture_graph.go","internal/mock/generator.go",@@ -5933,6 +5935,8 @@"frontend-modern/src/features/proxmox/ProxmoxReplicationTable.tsx","frontend-modern/src/features/standalone/AgentsMachinesTable.tsx","frontend-modern/src/features/standalone/AvailabilityChecksTable.tsx",+ "frontend-modern/src/features/standalone/standalonePageModel.ts",+ "frontend-modern/src/features/standalone/StandalonePageSurface.tsx","frontend-modern/src/features/truenas/TrueNASAlertsTable.tsx","frontend-modern/src/features/truenas/TrueNASAppsTable.tsx","frontend-modern/src/features/truenas/TrueNASNetworkSharesTable.tsx",@@ -6104,6 +6108,8 @@"frontend-modern/src/features/proxmox/ProxmoxReplicationTable.tsx","frontend-modern/src/features/standalone/AgentsMachinesTable.tsx","frontend-modern/src/features/standalone/AvailabilityChecksTable.tsx",+ "frontend-modern/src/features/standalone/standalonePageModel.ts",+ "frontend-modern/src/features/standalone/StandalonePageSurface.tsx","frontend-modern/src/features/truenas/TrueNASAlertsTable.tsx","frontend-modern/src/features/truenas/TrueNASAppsTable.tsx","frontend-modern/src/features/truenas/TrueNASNetworkSharesTable.tsx",@@ -6165,6 +6171,8 @@"frontend-modern/src/features/proxmox/__tests__/ProxmoxPageSurface.contract.test.tsx","frontend-modern/src/features/standalone/__tests__/AgentsMachinesTable.test.tsx","frontend-modern/src/features/standalone/__tests__/AvailabilityChecksTable.test.tsx",+ "frontend-modern/src/features/standalone/__tests__/standalonePageModel.test.ts",+ "frontend-modern/src/features/standalone/__tests__/StandalonePageSurface.test.tsx","frontend-modern/src/features/truenas/__tests__/TrueNASAlertsTable.test.tsx","frontend-modern/src/features/truenas/__tests__/TrueNASPageSurface.contract.test.tsx","frontend-modern/src/features/truenas/__tests__/TrueNASProtectionTable.test.tsx",diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.mdindex ce1cc57678..66c40848eb 100644--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md@@ -1306,7 +1306,10 @@ recovery scope, or a storage/recovery-owned secret source.agentless monitoring. Storage and recovery must not treat that availabilityfacet as protection status, backup health, or recovery readiness; anunreachable probe on a storage resource is monitoring evidence, not a- backup or recovery failure.+ backup or recovery failure. Unknown `LastChecked` and `LastSuccess` values+ remain absent optional timestamps on that shared facet; storage and recovery+ must not reinterpret absence or a year-one zero-time serialization as+ recovery age, missed backup cadence, or restore freshness.## Forbidden Pathsdiff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.mdindex 9cc302b388..dada776f1a 100644--- a/docs/release-control/v6/internal/subsystems/unified-resources.md+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md@@ -241,6 +241,21 @@ filter semantics, drawer handoffs, and resource projections, whileFuture platform tables must keep that split: row data and platform semanticsstay in the unified-resource consumer, and the repeated table shell stays in theshared frontend primitive.+The standalone Pulse Agent and Availability monitor may add one compact status+summary immediately above its canonical table. That summary must be derived+from the same already-loaded unified-resource slice, use canonical resource+status and `lastSeen` fields, keep the machine row indicator on that same+freshness-aware presentation so an old agent cannot stay visually green while+the summary warns, keep failed or degraded checks ahead of healthy+checks, and route management back to the canonical infrastructure or+availability settings paths. It must not introduce a page-local fetch, generic+Home dashboard, decorative chart, shadow health model, or proof strip detached+from the table it summarizes.+Availability timestamps must preserve absence as absence. Monitoring and mock+adapters must project zero `LastChecked` or `LastSuccess` values as nil+canonical facet pointers so REST and WebSocket consumers render `Not checked`+or `Never`, never a year-one timestamp expressed as hundreds of thousands of+days ago.Shared text-cell fallback behavior follows the same boundary:unified-resource consumers own which source field is displayed, but platformtables must use the frontend-primitives-owned `formatPlatformTableTextValue`diff --git a/frontend-modern/src/components/AI/FindingsPanel.tsx b/frontend-modern/src/components/AI/FindingsPanel.tsxindex a7e118a5fd..464efc1fa0 100644--- a/frontend-modern/src/components/AI/FindingsPanel.tsx+++ b/frontend-modern/src/components/AI/FindingsPanel.tsx@@ -129,6 +129,7 @@ interface FindingsPanelProps {blockedReason?: string;overallHealth?: IntelligenceHealthScore;historicalRegressionCount?: number;+ coverageStale?: boolean;patrolRuns?: PatrolRunRecord[];findingsSource?: 'unified' | 'patrol';onAssistantHandoff?: (finding: UnifiedFinding) => void;@@ -504,6 +505,7 @@ export const FindingsPanel: Component<FindingsPanelProps> = (props) => {runtimeState: props.runtimeState,blockedReason: props.blockedReason,historicalRegressionCount: props.historicalRegressionCount,+ coverageStale: props.coverageStale,runs: props.patrolRuns,runSnapshot: props.runSnapshot,});diff --git a/frontend-modern/src/components/AI/__tests__/FindingsPanel.test.ts b/frontend-modern/src/components/AI/__tests__/FindingsPanel.test.tsindex 8b6d4fdd2c..db610e7293 100644--- a/frontend-modern/src/components/AI/__tests__/FindingsPanel.test.ts+++ b/frontend-modern/src/components/AI/__tests__/FindingsPanel.test.ts@@ -64,6 +64,12 @@ const aiFindingPresentationSource = readFileSync();describe('FindingsPanel assistant handoff', () => {+ it('passes stale Patrol coverage into the current-work empty-state presenter', () => {+ expect(findingsPanelSource).toContain('coverageStale?: boolean');+ expect(findingsPanelSource).toContain('coverageStale: props.coverageStale');+ expect(patrolWorkspaceSource).toContain('coverageStale={coverageStale()}');+ });+it('routes finding loading indicators through the shared LoadingSpinner primitive', () => {expect(findingsPanelSource).toContain("from '@/components/shared/LoadingSpinner'");expect(findingsPanelSource).toContain('<LoadingSpinner size="xs" />');diff --git a/frontend-modern/src/features/patrol/PatrolIntelligenceWorkspace.tsx b/frontend-modern/src/features/patrol/PatrolIntelligenceWorkspace.tsxindex 6d0c8808a2..1e5de33b5e 100644--- a/frontend-modern/src/features/patrol/PatrolIntelligenceWorkspace.tsx+++ b/frontend-modern/src/features/patrol/PatrolIntelligenceWorkspace.tsx@@ -26,6 +26,7 @@ import {getPatrolQueueBadgeLabel,getPatrolQueueWorkspaceDescription,getPatrolWorkspaceWorkGroups,+ isPatrolCoverageStale,getPatrolSetupIssueReason,PATROL_WORKSPACE_HISTORY_DESCRIPTION,PATROL_WORKSPACE_QUEUE_TITLE,@@ -128,8 +129,17 @@ export function PatrolIntelligenceWorkspace(props: { state: PatrolIntelligenceStworkTypeComposition: workTypeComposition(),}),);+ const coverageStale = createMemo(() =>+ isPatrolCoverageStale({+ latestRun: latestCompletedRun(),+ patrolStatus: state.patrolStatus(),+ }),+ );+ const hasVisibleWorkGroups = () =>+ queueIssueCount() > 0 ||+ workGroupSummaries().some((group) => group.id !== 'stale-protection');const shouldShowWorkGroups = () =>- !isHistoryOpen() && !isSetupOnly() && !state.selectedRun() && workGroupSummaries().length > 0;+ !isHistoryOpen() && !isSetupOnly() && !state.selectedRun() && hasVisibleWorkGroups();return (<>@@ -280,6 +290,7 @@ export function PatrolIntelligenceWorkspace(props: { state: PatrolIntelligenceStblockedReason={state.blockedReason()}overallHealth={state.intelligenceSummary()?.overall_health}historicalRegressionCount={state.historicalRegressionCount()}+ coverageStale={coverageStale()}patrolRuns={state.patrolRunHistory.value() ?? []}findingsSource="patrol"runSnapshot={state.selectedRun() ?? undefined}diff --git a/frontend-modern/src/features/patrol/__tests__/PatrolIntelligenceWorkspace.test.ts b/frontend-modern/src/features/patrol/__tests__/PatrolIntelligenceWorkspace.test.tsindex 62a8da4a3f..53d9a77796 100644--- a/frontend-modern/src/features/patrol/__tests__/PatrolIntelligenceWorkspace.test.ts+++ b/frontend-modern/src/features/patrol/__tests__/PatrolIntelligenceWorkspace.test.ts@@ -52,6 +52,8 @@ describe('PatrolIntelligenceWorkspace trust strip', () => {expect(workspaceSource).toContain('getPatrolQueueWorkspaceDescription');expect(workspaceSource).toContain('getPatrolWorkspaceWorkGroups');expect(workspaceSource).toContain('Patrol work groups');+ expect(workspaceSource).toContain("group.id !== 'stale-protection'");+ expect(workspaceSource).toContain('queueIssueCount() > 0');expect(workspaceSource).not.toContain('getPatrolWorkspaceProtectionPosture');expect(workspaceSource).not.toContain('Patrol protection posture');expect(workspaceSource).not.toContain('protectionPostureSummaries');diff --git a/frontend-modern/src/features/patrol/__tests__/patrolControlPresentation.test.ts b/frontend-modern/src/features/patrol/__tests__/patrolControlPresentation.test.tsindex 4d6d7f857d..69e6d401be 100644--- a/frontend-modern/src/features/patrol/__tests__/patrolControlPresentation.test.ts+++ b/frontend-modern/src/features/patrol/__tests__/patrolControlPresentation.test.ts@@ -9,6 +9,7 @@ import {getPatrolReadyWorkDetail,getPatrolSetupIssueReason,getPatrolWorkspaceWorkGroups,+ isPatrolCoverageStale,PATROL_AUTONOMY_POLICY_PRESENTATION,PATROL_WORKSPACE_QUEUE_TITLE,} from '../patrolControlPresentation';@@ -239,14 +240,40 @@ describe('patrolControlPresentation', () => {tone: 'warning',},{- detail: 'The next scheduled Patrol check is overdue; run Patrol when the system is ready.',+ detail:+ 'Patrol has not completed a fresh full check; run Patrol to refresh current coverage.',id: 'stale-protection',- label: 'Check overdue',+ label: 'Coverage stale',tone: 'warning',},]);});+ it('treats old Patrol evidence as stale relative to the configured interval', () => {+ const nowMs = Date.parse('2026-06-30T15:00:00Z');++ expect(+ isPatrolCoverageStale({+ latestRun: { completed_at: '2026-06-28T12:00:00Z' },+ nowMs,+ patrolStatus: {+ interval_ms: 6 * 60 * 60 * 1000,+ running: false,+ },+ }),+ ).toBe(true);+ expect(+ isPatrolCoverageStale({+ latestRun: { completed_at: '2026-06-30T12:00:00Z' },+ nowMs,+ patrolStatus: {+ interval_ms: 6 * 60 * 60 * 1000,+ running: false,+ },+ }),+ ).toBe(false);+ });+it('does not call future or running scheduled checks stale protection', () => {expect(getPatrolWorkspaceWorkGroups({diff --git a/frontend-modern/src/features/patrol/patrolControlPresentation.ts b/frontend-modern/src/features/patrol/patrolControlPresentation.tsindex e4ea9788b3..42fb22cb72 100644--- a/frontend-modern/src/features/patrol/patrolControlPresentation.ts+++ b/frontend-modern/src/features/patrol/patrolControlPresentation.ts@@ -74,9 +74,15 @@ export interface MonitorContextPatrolPostureSummary {}interface PatrolWorkspaceWorkGroupsInput {- latestRun?: Pick<PatrolRunRecord, 'error_count' | 'resources_checked' | 'status'> | null;+ latestRun?:+ | (Pick<PatrolRunRecord, 'error_count' | 'resources_checked' | 'status'> &+ Partial<Pick<PatrolRunRecord, 'completed_at'>>)+ | null;nowMs?: number;- patrolStatus?: Pick<PatrolStatus, 'error_count' | 'next_patrol_at' | 'running'> | null;+ patrolStatus?:+ | (Pick<PatrolStatus, 'error_count' | 'next_patrol_at' | 'running'> &+ Partial<Pick<PatrolStatus, 'interval_ms' | 'last_patrol_at'>>)+ | null;pendingApprovalCount?: number;workTypeComposition?: PatrolWorkTypeComposition;}@@ -153,6 +159,33 @@ function isScheduledPatrolOverdue(return Number.isFinite(nextPatrolAt) && nextPatrolAt < nowMs;}+const PATROL_MINIMUM_FRESHNESS_WINDOW_MS = 24 * 60 * 60 * 1000;++export function isPatrolCoverageStale(input: {+ latestRun?: Partial<Pick<PatrolRunRecord, 'completed_at'>> | null;+ nowMs?: number;+ patrolStatus?:+ | (Pick<PatrolStatus, 'running'> &+ Partial<Pick<PatrolStatus, 'interval_ms' | 'last_patrol_at' | 'next_patrol_at'>>)+ | null;+}): boolean {+ const nowMs = input.nowMs ?? Date.now();+ if (input.patrolStatus?.running) return false;+ if (isScheduledPatrolOverdue(input.patrolStatus, nowMs)) return true;++ const lastCheckAt = input.latestRun?.completed_at || input.patrolStatus?.last_patrol_at;+ if (!lastCheckAt) return false;+ const lastCheckMs = Date.parse(lastCheckAt);+ if (!Number.isFinite(lastCheckMs) || lastCheckMs > nowMs) return false;++ const configuredIntervalMs = normalizeCount(input.patrolStatus?.interval_ms);+ const freshnessWindowMs = Math.max(+ PATROL_MINIMUM_FRESHNESS_WINDOW_MS,+ configuredIntervalMs > 0 ? configuredIntervalMs * 2 : 0,+ );+ return nowMs - lastCheckMs > freshnessWindowMs;+}+function isActivePatrolRuntime(status: Pick<PatrolStatus, 'runtime_state'> | null | undefined,): boolean {@@ -335,11 +368,18 @@ export function getPatrolWorkspaceWorkGroups(});}- if (isScheduledPatrolOverdue(input.patrolStatus, input.nowMs ?? Date.now())) {+ if (+ isPatrolCoverageStale({+ latestRun,+ nowMs: input.nowMs,+ patrolStatus: input.patrolStatus,+ })+ ) {groups.push({id: 'stale-protection',- label: 'Check overdue',- detail: 'The next scheduled Patrol check is overdue; run Patrol when the system is ready.',+ label: 'Coverage stale',+ detail:+ 'Patrol has not completed a fresh full check; run Patrol to refresh current coverage.',tone: 'warning',});}@@ -347,7 +387,9 @@ export function getPatrolWorkspaceWorkGroups(return groups;}-function shouldSuppressMonitorContextPatrolPosture(input: MonitorContextPatrolPostureInput): boolean {+function shouldSuppressMonitorContextPatrolPosture(+ input: MonitorContextPatrolPostureInput,+): boolean {const composition = input.workTypeComposition;const pendingApprovalCount = normalizeCount(input.pendingApprovalCount);const findingCount = normalizeCount(input.findingCount);diff --git a/frontend-modern/src/features/standalone/AgentsMachinesTable.tsx b/frontend-modern/src/features/standalone/AgentsMachinesTable.tsxindex d20646c447..9ad5071868 100644--- a/frontend-modern/src/features/standalone/AgentsMachinesTable.tsx+++ b/frontend-modern/src/features/standalone/AgentsMachinesTable.tsx@@ -68,7 +68,6 @@ import {getRaidStateTextClass,getRaidStateVariant,} from '@/utils/raidPresentation';-import { getSimpleStatusIndicator } from '@/utils/status';import { asTrimmedString } from '@/utils/stringUtils';import {RESOURCE_METADATA_CHANGED_EVENT,@@ -104,6 +103,7 @@ import {type AgentMachineTemperatureDetailSection,type AgentMachineTemperatureMetric,} from './agentMachineTableModel';+import { getStandaloneResourceStatusIndicator } from './standalonePageModel';type MetricFallbackReason = {label: string;@@ -1436,7 +1436,7 @@ export const AgentsMachinesTable: Component<{: '';return `Agent has stopped reporting.${when} Re-run the install command from the Pulse UI to refresh its token.`;};- const indicator = () => getSimpleStatusIndicator(machine.status);+ const indicator = () => getStandaloneResourceStatusIndicator(machine);const canRenderMetrics = () => indicator().variant !== 'danger';const telemetryFallback = () =>canRenderMetrics()diff --git a/frontend-modern/src/features/standalone/AvailabilityChecksTable.tsx b/frontend-modern/src/features/standalone/AvailabilityChecksTable.tsxindex bec89436cf..d8fcd6e4ca 100644--- a/frontend-modern/src/features/standalone/AvailabilityChecksTable.tsx+++ b/frontend-modern/src/features/standalone/AvailabilityChecksTable.tsx@@ -1,5 +1,5 @@import { A } from '@solidjs/router';-import { For, Show, type Component, type JSX } from 'solid-js';+import { For, Show, createMemo, type Component, type JSX } from 'solid-js';import PlusIcon from 'lucide-solid/icons/plus';import SettingsIcon from 'lucide-solid/icons/settings';import { StatusDot } from '@/components/shared/StatusDot';@@ -24,6 +24,7 @@ import {buildAvailabilitySettingsPath,buildAvailabilityTargetAddPath,} from '@/components/Settings/availabilitySettingsModel';+import { sortStandaloneResourcesByAttention } from './standalonePageModel';const settingsLinkClass ='inline-flex min-h-8 items-center justify-center gap-1.5 rounded-md border border-border bg-surface px-2.5 py-1 text-xs font-medium text-base-content transition-colors hover:bg-surface-hover';@@ -69,6 +70,7 @@ export const AvailabilityChecksTable: Component<{initialStatus: 'all' as PlatformResourceStatusFilter,filter: filterPlatformResources,});+ const orderedChecks = createMemo(() => sortStandaloneResourcesByAttention(tableState.filtered()));return (<Show@@ -127,7 +129,7 @@ export const AvailabilityChecksTable: Component<{tableClass="min-w-full table-fixed text-xs md:min-w-[900px]"header={<>- <TableHead class={`${getPlatformTableHeadClassForKind('name')} w-[42%] md:w-[22%]`}>+ <TableHead class={`${getPlatformTableHeadClassForKind('name')} w-[42%] md:w-[20%]`}>Check</TableHead><TableHead@@ -136,7 +138,7 @@ export const AvailabilityChecksTable: Component<{Method</TableHead><TableHead- class={`${getPlatformTableHeadClassForKind('text')} hidden md:table-cell md:w-[28%]`}+ class={`${getPlatformTableHeadClassForKind('text')} hidden md:table-cell md:w-[22%]`}>Target</TableHead>@@ -150,6 +152,11 @@ export const AvailabilityChecksTable: Component<{>Checked</TableHead>+ <TableHead+ class={`${getPlatformTableHeadClassForKind('numeric-value')} hidden lg:table-cell lg:w-[10%]`}+ >+ Last healthy+ </TableHead><TableHeadclass={`${getPlatformTableHeadClassForKind('numeric-value')} hidden lg:table-cell lg:w-[8%]`}>@@ -164,7 +171,7 @@ export const AvailabilityChecksTable: Component<{}body={<>- <For each={tableState.filtered()}>+ <For each={orderedChecks()}>{(check) => {const availability = () => availabilityFor(check);const probe = () => getAvailabilityProbePresentation(check);@@ -215,7 +222,9 @@ export const AvailabilityChecksTable: Component<{<TableCellclass={`${getPlatformTableCellClassForKind('numeric-value')} w-[28%] text-base-content md:w-auto`}>- <span class={probe()?.toneClassName ?? ''}>{result()}</span>+ <span class={probe()?.toneClassName ?? ''} title={probe()?.detailLabel}>+ {result()}+ </span></TableCell><TableCellclass={`${getPlatformTableCellClassForKind('numeric-value')} hidden text-base-content md:table-cell`}@@ -225,6 +234,14 @@ export const AvailabilityChecksTable: Component<{emptyText="Not checked"/></TableCell>+ <TableCell+ class={`${getPlatformTableCellClassForKind('numeric-value')} hidden text-base-content lg:table-cell`}+ >+ <PlatformTableRelativeTimeValue+ value={availability()?.lastSuccess}+ emptyText="Never"+ />+ </TableCell><TableCellclass={`${getPlatformTableCellClassForKind('numeric-value')} hidden text-base-content lg:table-cell`}>diff --git a/frontend-modern/src/features/standalone/StandalonePageSurface.tsx b/frontend-modern/src/features/standalone/StandalonePageSurface.tsxindex 47cd51cc88..03e1508f4f 100644--- a/frontend-modern/src/features/standalone/StandalonePageSurface.tsx+++ b/frontend-modern/src/features/standalone/StandalonePageSurface.tsx@@ -1,13 +1,16 @@-import { Show, createEffect, createMemo, createSignal } from 'solid-js';+import { Show, createEffect, createMemo, createSignal, type Component, type JSX } from 'solid-js';import { useLocation, useNavigate } from '@solidjs/router';import ActivityIcon from 'lucide-solid/icons/activity';+import CircleAlertIcon from 'lucide-solid/icons/circle-alert';import ServerIcon from 'lucide-solid/icons/server';import SettingsIcon from 'lucide-solid/icons/settings';import { Button, ButtonLink } from '@/components/shared/Button';+import { MetadataBadge, type MetadataBadgeTone } from '@/components/shared/MetadataBadge';import {buildInfrastructureAgentUpdatesPath,buildInfrastructureOnboardingPath,} from '@/components/Settings/infrastructureWorkspaceModel';+import { buildAvailabilitySettingsPath } from '@/components/Settings/availabilitySettingsModel';import { PlatformOutdatedAgentNotice } from '@/features/platformPage/PlatformOutdatedAgentNotice';import {collectOutdatedAgentHosts,@@ -22,9 +25,14 @@ import {import { useUnifiedResources } from '@/hooks/useUnifiedResources';import { STANDALONE_PATH, buildStandalonePath } from '@/routing/resourceLinks';import { updateStore } from '@/stores/updates';+import { formatRelativeTime } from '@/utils/format';import { AvailabilityChecksTable } from './AvailabilityChecksTable';import { AgentsMachinesTable } from './AgentsMachinesTable';-import { buildStandalonePageModel } from './standalonePageModel';+import {+ buildStandalonePageModel,+ buildStandalonePostureSummary,+ type StandalonePostureSummary,+} from './standalonePageModel';const STANDALONE_RESOURCE_QUERY = 'type=agent,network-endpoint';const STANDALONE_TAB_SPECS = [@@ -36,6 +44,72 @@ type StandaloneTabId = (typeof STANDALONE_TAB_SPECS)[number]['id'];const machineIcon = () => <ServerIcon class="h-6 w-6 text-slate-400" />;const availabilityIcon = () => <ActivityIcon class="h-6 w-6 text-slate-400" />;+const StandalonePostureCard: Component<{+ actions?: JSX.Element;+ label: string;+ noun: string;+ summary: StandalonePostureSummary;+}> = (props) => {+ const headline = () => {+ if (props.summary.critical > 0) {+ return `${props.summary.critical} ${props.noun}${props.summary.critical === 1 ? '' : 's'} offline`;+ }+ if (props.summary.warning > 0) {+ return `${props.summary.warning} ${props.noun}${props.summary.warning === 1 ? ' needs' : 's need'} attention`;+ }+ if (props.summary.unknown > 0) {+ return `${props.summary.unknown} ${props.noun}${props.summary.unknown === 1 ? '' : 's'} awaiting status`;+ }+ return `All ${props.summary.total} ${props.noun}${props.summary.total === 1 ? '' : 's'} reporting normally`;+ };+ const tone = (): MetadataBadgeTone => {+ if (props.summary.critical > 0) return 'danger';+ if (props.summary.warning > 0) return 'warning';+ if (props.summary.unknown > 0) return 'info';+ return 'success';+ };+ const latestUpdate = () =>+ props.summary.latestUpdateAt+ ? formatRelativeTime(props.summary.latestUpdateAt, { compact: true, emptyText: 'unknown' })+ : 'unknown';++ return (+ <section+ aria-label={`${props.label} status`}+ data-testid="standalone-posture-summary"+ class="flex flex-col gap-3 rounded-md border border-border bg-surface-alt/50 px-3 py-3 sm:flex-row sm:items-center sm:justify-between"+ >+ <div class="min-w-0">+ <div class="flex flex-wrap items-center gap-2">+ <span class="text-xs font-semibold uppercase tracking-wider text-muted">+ {props.label}+ </span>+ <MetadataBadge tone={tone()} size="xs" shape="rounded">+ {headline()}+ </MetadataBadge>+ </div>+ <div class="mt-1.5 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted">+ <span>{props.summary.total} total</span>+ <span>{props.summary.normal} healthy</span>+ <Show when={props.summary.attention > 0}>+ <span class="inline-flex items-center gap-1 text-amber-700 dark:text-amber-300">+ <CircleAlertIcon class="h-3.5 w-3.5" aria-hidden="true" />+ {props.summary.attention} need attention+ </span>+ </Show>+ <Show when={props.summary.unknown > 0}>+ <span>{props.summary.unknown} unknown</span>+ </Show>+ <span>latest data {latestUpdate()}</span>+ </div>+ </div>+ <Show when={props.actions}>+ <div class="flex shrink-0 flex-wrap items-center gap-2">{props.actions}</div>+ </Show>+ </section>+ );+};+const resolveStandaloneTab = (pathname: string): StandaloneTabId =>pathname.replace(/\/+$/, '') === buildStandalonePath('availability')? 'availability'@@ -54,6 +128,10 @@ export function StandalonePageSurface() {const model = createMemo(() => buildStandalonePageModel(resources()));const activeTab = createMemo(() => resolveStandaloneTab(location.pathname));+ const machinePosture = createMemo(() => buildStandalonePostureSummary(model().machines));+ const availabilityPosture = createMemo(() =>+ buildStandalonePostureSummary(model().availabilityChecks),+ );const showLoading = createMemo(() =>loading() &&@@ -122,12 +200,32 @@ export function StandalonePageSurface() {}><Show when={activeTab() === 'availability'}>- <AvailabilityChecksTable- resources={model().availabilityChecks}- emptyIcon={availabilityIcon()}- emptyTitle="No availability checks"- emptyDescription="Add ping, TCP, MQTT, ESPHome, or HTTP checks for devices and services that cannot run Pulse Agent."- />+ <div class="space-y-3">+ <Show when={model().availabilityChecks.length > 0}>+ <StandalonePostureCard+ label="Availability"+ noun="check"+ summary={availabilityPosture()}+ actions={+ <ButtonLink+ href={buildAvailabilitySettingsPath()}+ variant="secondary"+ size="sm"+ class="gap-2"+ >+ <SettingsIcon class="h-3.5 w-3.5" />+ Manage checks+ </ButtonLink>+ }+ />+ </Show>+ <AvailabilityChecksTable+ resources={model().availabilityChecks}+ emptyIcon={availabilityIcon()}+ emptyTitle="No availability checks"+ emptyDescription="Add ping, TCP, MQTT, ESPHome, or HTTP checks for devices and services that cannot run Pulse Agent."+ />+ </div></Show><Show when={activeTab() === 'machines'}>@@ -165,6 +263,25 @@ export function StandalonePageSurface() {}><div class="space-y-4">+ <Show when={model().machines.length > 0}>+ <StandalonePostureCard+ label="Pulse Agents"+ noun="machine"+ summary={machinePosture()}+ actions={+ <Button+ type="button"+ variant="secondary"+ size="sm"+ class="gap-2"+ onClick={() => navigate(buildInfrastructureOnboardingPath('pick'))}+ >+ <SettingsIcon class="h-3.5 w-3.5" />+ Add agent+ </Button>+ }+ />+ </Show><PlatformOutdatedAgentNoticehosts={outdatedAgentHosts()}targetVersion={serverVersionDisplay()}diff --git a/frontend-modern/src/features/standalone/__tests__/AvailabilityChecksTable.test.tsx b/frontend-modern/src/features/standalone/__tests__/AvailabilityChecksTable.test.tsxindex ff414dff91..e8a033f8d2 100644--- a/frontend-modern/src/features/standalone/__tests__/AvailabilityChecksTable.test.tsx+++ b/frontend-modern/src/features/standalone/__tests__/AvailabilityChecksTable.test.tsx@@ -25,6 +25,7 @@ const availabilityResource = (overrides: Partial<Resource> = {}): Resource =>available: true,latencyMillis: 7,lastChecked: 1_700_000_300_000,+ lastSuccess: 1_700_000_000_000,pollIntervalSeconds: 90,failureThreshold: 2,},@@ -64,10 +65,40 @@ describe('AvailabilityChecksTable', () => {expect(screen.getByText('TCP 1883')).toBeInTheDocument();expect(screen.getByText('power-meter-01.lab.local:1883')).toBeInTheDocument();expect(screen.getByText('5m ago')).toBeInTheDocument();+ expect(screen.getByText('10m ago')).toBeInTheDocument();expect(screen.getByText('1m 30s')).toBeInTheDocument();expect(screen.getByText('7 ms')).toBeInTheDocument();});+ it('places failing checks before healthy checks by default', () => {+ const view = renderTable([+ availabilityResource({ id: 'healthy', name: 'Healthy', displayName: 'Healthy' }),+ availabilityResource({+ id: 'offline',+ name: 'Offline',+ displayName: 'Offline',+ status: 'offline',+ availability: {+ targetId: 'offline',+ protocol: 'icmp',+ address: 'offline.lab.local',+ enabled: true,+ available: false,+ lastChecked: '2023-11-14T22:18:20.000Z',+ lastSuccess: '2023-11-14T21:56:40.000Z',+ consecutiveFailures: 4,+ failureThreshold: 2,+ },+ }),+ ]);++ const rows = [...view.container.querySelectorAll('[data-availability-check-row]')];+ expect(rows.map((row) => row.getAttribute('data-availability-check-row'))).toEqual([+ 'offline',+ 'healthy',+ ]);+ });+it('links the empty state back to the availability check add flow', () => {renderTable([]);diff --git a/frontend-modern/src/features/standalone/__tests__/StandalonePageSurface.test.tsx b/frontend-modern/src/features/standalone/__tests__/StandalonePageSurface.test.tsxindex dbc57b3f87..b1c4d71036 100644--- a/frontend-modern/src/features/standalone/__tests__/StandalonePageSurface.test.tsx+++ b/frontend-modern/src/features/standalone/__tests__/StandalonePageSurface.test.tsx@@ -82,7 +82,7 @@ const resource = (overrides: Partial<Resource>): Resource =>platformType: overrides.platformType ?? 'agent',sourceType: overrides.sourceType ?? 'agent',status: overrides.status ?? 'online',- lastSeen: overrides.lastSeen ?? 1_700_000_000_000,+ lastSeen: overrides.lastSeen ?? Date.now(),...overrides,}) as Resource;@@ -133,6 +133,9 @@ describe('StandalonePageSurface', () => {'machines,availability',);expect(screen.getByTestId('agents-machines-table')).toHaveAttribute('data-resource-count', '1');+ expect(screen.getByTestId('standalone-posture-summary')).toHaveTextContent(+ 'All 1 machine reporting normally',+ );expect(screen.queryByTestId('availability-checks-table')).not.toBeInTheDocument();});@@ -196,6 +199,46 @@ describe('StandalonePageSurface', () => {'data-resource-count','2',);+ expect(screen.getByTestId('standalone-posture-summary')).toHaveTextContent(+ 'All 2 checks reporting normally',+ );+ expect(screen.getByRole('link', { name: 'Manage checks' })).toHaveAttribute(+ 'href',+ '/settings/monitoring/availability',+ );+ });++ it('makes failed availability posture visible before the table', () => {+ mocks.pathname = '/standalone/availability';+ mocks.useUnifiedResources.mockReturnValue({+ resources: () => [+ resource({+ id: 'failed-check',+ type: 'network-endpoint',+ platformType: 'availability',+ sources: ['availability'],+ status: 'offline',+ availability: { targetKind: 'service', available: false },+ }),+ resource({+ id: 'healthy-check',+ type: 'network-endpoint',+ platformType: 'availability',+ sources: ['availability'],+ status: 'online',+ availability: { targetKind: 'service', available: true },+ }),+ ],+ loading: () => false,+ error: () => null,+ refetch: vi.fn(),+ });++ render(() => <StandalonePageSurface />);++ const summary = screen.getByTestId('standalone-posture-summary');+ expect(summary).toHaveTextContent('1 check offline');+ expect(summary).toHaveTextContent('1 need attention');});it('uses an overview handoff when only agentless availability checks are present', () => {diff --git a/frontend-modern/src/features/standalone/__tests__/standalonePageModel.test.ts b/frontend-modern/src/features/standalone/__tests__/standalonePageModel.test.tsindex 15f0ff1554..3df4c76067 100644--- a/frontend-modern/src/features/standalone/__tests__/standalonePageModel.test.ts+++ b/frontend-modern/src/features/standalone/__tests__/standalonePageModel.test.ts@@ -1,6 +1,10 @@import { describe, expect, it } from 'vitest';import type { Resource } from '@/types/resource';-import { buildStandalonePageModel } from '../standalonePageModel';+import {+ buildStandalonePageModel,+ buildStandalonePostureSummary,+ sortStandaloneResourcesByAttention,+} from '../standalonePageModel';const resource = (overrides: Partial<Resource>): Resource =>({@@ -17,6 +21,60 @@ const resource = (overrides: Partial<Resource>): Resource =>}) as Resource;describe('standalonePageModel', () => {+ it('summarizes normal, attention, unknown, and freshness posture from canonical status', () => {+ const summary = buildStandalonePostureSummary(+ [+ resource({ id: 'online', status: 'online', lastSeen: 1_700_000_000_000 }),+ resource({ id: 'warning', status: 'degraded', lastSeen: 1_700_000_010_000 }),+ resource({ id: 'offline', status: 'offline', lastSeen: 1_700_000_020_000 }),+ resource({ id: 'unknown', status: 'unknown', lastSeen: 1_700_000_005_000 }),+ ],+ 1_700_000_030_000,+ );++ expect(summary).toEqual({+ attention: 3,+ critical: 1,+ latestUpdateAt: 1_700_000_020_000,+ normal: 1,+ total: 4,+ unknown: 0,+ warning: 2,+ });+ });++ it('treats an online agent that stopped reporting as attention', () => {+ const summary = buildStandalonePostureSummary(+ [resource({ id: 'stale-agent', status: 'online', lastSeen: 1_700_000_000_000 })],+ 1_700_000_600_001,+ );++ expect(summary.attention).toBe(1);+ expect(summary.warning).toBe(1);+ expect(summary.normal).toBe(0);+ });++ it('orders attention before unknown and healthy resources', () => {+ const ordered = sortStandaloneResourcesByAttention(+ [+ resource({ id: 'healthy', displayName: 'Healthy', status: 'online' }),+ resource({ id: 'unknown-b', displayName: 'Unknown B', status: 'unknown' }),+ resource({ id: 'warning', displayName: 'Warning', status: 'degraded' }),+ resource({ id: 'offline', displayName: 'Offline', status: 'offline' }),+ resource({ id: 'unknown-a', displayName: 'Unknown A', status: 'unknown' }),+ ],+ 1_700_000_030_000,+ );++ expect(ordered.map((item) => item.id)).toEqual([+ 'offline',+ 'unknown-a',+ 'unknown-b',+ 'warning',+ 'healthy',+ ]);+ });+it('projects standalone agent machine resources without admitting provider-owned host rows', () => {const model = buildStandalonePageModel([resource({ id: 'mac-mini', platformType: 'agent', type: 'agent', sources: ['agent'] }),diff --git a/frontend-modern/src/features/standalone/standalonePageModel.ts b/frontend-modern/src/features/standalone/standalonePageModel.tsindex 4df4f4fcd7..cb006d6ea9 100644--- a/frontend-modern/src/features/standalone/standalonePageModel.ts+++ b/frontend-modern/src/features/standalone/standalonePageModel.ts@@ -1,5 +1,6 @@import type { Resource } from '@/types/resource';import { isPulseAgentPlatformResource } from '@/utils/agentResources';+import { getSimpleStatusIndicator } from '@/utils/status';export interface StandalonePageModel {machines: Resource[];@@ -7,6 +8,16 @@ export interface StandalonePageModel {resources: Resource[];}+export interface StandalonePostureSummary {+ attention: number;+ critical: number;+ latestUpdateAt?: number;+ normal: number;+ total: number;+ unknown: number;+ warning: number;+}+export const isStandaloneMachineResource = (resource: Resource): boolean =>isPulseAgentPlatformResource(resource);@@ -15,6 +26,84 @@ export const isAgentlessAvailabilityResource = (resource: Resource): boolean =>resource.platformType === 'availability' ||resource.sources?.includes('availability') === true;+const AGENT_REPORT_STALE_AFTER_MS = 5 * 60 * 1000;++export const getStandaloneResourceStatusIndicator = (resource: Resource, nowMs = Date.now()) => {+ const indicator = getSimpleStatusIndicator(resource.status);+ if (indicator.variant === 'danger') return indicator;+ if (+ resource.type === 'agent' &&+ (resource.agent?.stale === true ||+ (Number.isFinite(resource.lastSeen) &&+ resource.lastSeen > 0 &&+ nowMs - resource.lastSeen > AGENT_REPORT_STALE_AFTER_MS))+ ) {+ return { variant: 'warning' as const, label: 'Stale' };+ }+ return indicator;+};++export function buildStandalonePostureSummary(+ resources: readonly Resource[],+ nowMs = Date.now(),+): StandalonePostureSummary {+ const summary: StandalonePostureSummary = {+ attention: 0,+ critical: 0,+ normal: 0,+ total: resources.length,+ unknown: 0,+ warning: 0,+ };++ for (const resource of resources) {+ const variant = getStandaloneResourceStatusIndicator(resource, nowMs).variant;+ if (variant === 'success') {+ summary.normal += 1;+ } else if (variant === 'danger') {+ summary.critical += 1;+ summary.attention += 1;+ } else if (variant === 'warning') {+ summary.warning += 1;+ summary.attention += 1;+ } else {+ summary.unknown += 1;+ }++ if (+ Number.isFinite(resource.lastSeen) &&+ resource.lastSeen > 0 &&+ (!summary.latestUpdateAt || resource.lastSeen > summary.latestUpdateAt)+ ) {+ summary.latestUpdateAt = resource.lastSeen;+ }+ }++ return summary;+}++const ATTENTION_SORT_PRIORITY = {+ danger: 0,+ warning: 1,+ muted: 2,+ info: 2,+ success: 3,+} as const;++export function sortStandaloneResourcesByAttention(+ resources: readonly Resource[],+ nowMs = Date.now(),+): Resource[] {+ return [...resources].sort((left, right) => {+ const leftPriority =+ ATTENTION_SORT_PRIORITY[getStandaloneResourceStatusIndicator(left, nowMs).variant];+ const rightPriority =+ ATTENTION_SORT_PRIORITY[getStandaloneResourceStatusIndicator(right, nowMs).variant];+ if (leftPriority !== rightPriority) return leftPriority - rightPriority;+ return left.displayName.localeCompare(right.displayName, undefined, { numeric: true });+ });+}+export function buildStandalonePageModel(resources: readonly Resource[]): StandalonePageModel {const machines = resources.filter(isStandaloneMachineResource);const availabilityChecks = resources.filter(isAgentlessAvailabilityResource);diff --git a/frontend-modern/src/utils/__tests__/patrolEmptyStatePresentation.test.ts b/frontend-modern/src/utils/__tests__/patrolEmptyStatePresentation.test.tsindex 7971c41dd6..4ca28f8c33 100644--- a/frontend-modern/src/utils/__tests__/patrolEmptyStatePresentation.test.ts+++ b/frontend-modern/src/utils/__tests__/patrolEmptyStatePresentation.test.ts@@ -180,6 +180,27 @@ describe('patrolEmptyStatePresentation', () => {});});+ it('does not present stale Patrol evidence as a healthy clear state', () => {+ expect(+ getPatrolFindingsEmptyState({+ filter: 'active',+ coverageStale: true,+ overallHealth: {+ score: 100,+ grade: 'A',+ trend: 'stable',+ factors: [],+ prediction: 'Infrastructure is healthy with no significant issues detected.',+ },+ runtimeState: 'active',+ }),+ ).toEqual({+ title: 'Check needed',+ body: 'Patrol coverage is stale. Run Patrol to check current infrastructure state.',+ tone: 'warning',+ });+ });+it('keeps past regressions informational when there are no current issues', () => {expect(getPatrolFindingsEmptyState({diff --git a/frontend-modern/src/utils/patrolEmptyStatePresentation.ts b/frontend-modern/src/utils/patrolEmptyStatePresentation.tsindex 13994e0cfb..a9a3ae17a6 100644--- a/frontend-modern/src/utils/patrolEmptyStatePresentation.ts+++ b/frontend-modern/src/utils/patrolEmptyStatePresentation.ts@@ -189,6 +189,7 @@ export function getPatrolFindingsEmptyState(args: {runtimeState?: PatrolRuntimeState;blockedReason?: string;historicalRegressionCount?: number;+ coverageStale?: boolean;runs?: PatrolRunRecord[];runSnapshot?: PatrolRunSnapshotEmptyStateArgs;}): PatrolFindingsEmptyStateCopy {@@ -233,6 +234,14 @@ export function getPatrolFindingsEmptyState(args: {};}+ if (args.coverageStale) {+ return {+ title: PATROL_QUEUE_RECHECK_TITLE,+ body: 'Patrol coverage is stale. Run Patrol to check current infrastructure state.',+ tone: 'warning',+ };+ }+if (shouldSuppressHealthyEmptyState(args.overallHealth, args.runs)) {return {title: getDegradedPatrolEmptyStateTitle(args.overallHealth, args.runs),diff --git a/internal/mock/availability_fixtures.go b/internal/mock/availability_fixtures.goindex b13e27be27..a498e917b0 100644--- a/internal/mock/availability_fixtures.go+++ b/internal/mock/availability_fixtures.go@@ -337,8 +337,8 @@ func availabilityFixtureRecord(fixture AvailabilityFixture, now time.Time) (unifPath: target.Path,Enabled: target.Enabled,Available: fixture.Available,- LastChecked: fixture.LastChecked,- LastSuccess: fixture.LastSuccess,+ LastChecked: availabilityFixtureTimePointer(fixture.LastChecked),+ LastSuccess: availabilityFixtureTimePointer(fixture.LastSuccess),LatencyMillis: fixture.LatencyMillis,ConsecutiveFailures: fixture.ConsecutiveFailures,LastError: fixture.LastError,@@ -368,6 +368,14 @@ func availabilityFixtureRecord(fixture AvailabilityFixture, now time.Time) (unif}, true}+func availabilityFixtureTimePointer(value time.Time) *time.Time {+ if value.IsZero() {+ return nil+ }+ copied := value+ return &copied+}+func availabilityFixtureResourceStatus(target AvailabilityTargetFixture, fixture AvailabilityFixture) unifiedresources.ResourceStatus {if !target.Enabled {return unifiedresources.StatusUnknowndiff --git a/internal/mock/platform_fixtures_test.go b/internal/mock/platform_fixtures_test.goindex f83700a922..5b90e432d6 100644--- a/internal/mock/platform_fixtures_test.go+++ b/internal/mock/platform_fixtures_test.go@@ -226,6 +226,28 @@ func TestFixtureGraphProjectsAvailabilityFixturesAsNetworkEndpoints(t *testing.T}}+func TestAvailabilityFixtureRecordOmitsUnknownProbeTimes(t *testing.T) {+ now := time.Date(2026, time.May, 6, 12, 0, 0, 0, time.UTC)+ record, ok := availabilityFixtureRecord(AvailabilityFixture{+ Target: AvailabilityTargetFixture{+ ID: "not-checked",+ Name: "Not checked",+ Address: "not-checked.example",+ Protocol: mockAvailabilityProbeICMP,+ Enabled: true,+ },+ }, now)+ if !ok || record.Resource.Availability == nil {+ t.Fatalf("availabilityFixtureRecord() = (%+v, %t), want availability record", record, ok)+ }+ if record.Resource.Availability.LastChecked != nil {+ t.Fatalf("last checked = %v, want nil before the first probe", record.Resource.Availability.LastChecked)+ }+ if record.Resource.Availability.LastSuccess != nil {+ t.Fatalf("last success = %v, want nil before the first successful probe", record.Resource.Availability.LastSuccess)+ }+}+func TestFixtureGraphAttachesServiceAvailabilityFixturesToServiceResources(t *testing.T) {now := time.Date(2026, time.May, 6, 12, 0, 0, 0, time.UTC)diff --git a/internal/monitoring/availability_poller.go b/internal/monitoring/availability_poller.goindex 29a7303123..6189c2d686 100644--- a/internal/monitoring/availability_poller.go+++ b/internal/monitoring/availability_poller.go@@ -517,8 +517,8 @@ func availabilityResourceFromTarget(target config.AvailabilityTarget, status AvaPath: target.Path,Enabled: target.Enabled,Available: status.Available,- LastChecked: status.LastChecked,- LastSuccess: status.LastSuccess,+ LastChecked: timePointerIfSet(status.LastChecked),+ LastSuccess: timePointerIfSet(status.LastSuccess),LatencyMillis: status.LatencyMillis,ConsecutiveFailures: status.ConsecutiveFailures,LastError: status.LastError,diff --git a/internal/monitoring/availability_poller_test.go b/internal/monitoring/availability_poller_test.goindex e05e5a9e6b..2413678217 100644--- a/internal/monitoring/availability_poller_test.go+++ b/internal/monitoring/availability_poller_test.go@@ -158,3 +158,51 @@ func TestAvailabilityPollProviderListsOnlyEnabledTargets(t *testing.T) {t.Fatalf("ListInstances() = %+v, want [enabled]", got)}}++func TestAvailabilityResourceFromTargetOmitsUnsetProbeTimes(t *testing.T) {+ target := config.NormalizeAvailabilityTarget(config.AvailabilityTarget{+ ID: "router",+ Name: "Router",+ Address: "192.0.2.1",+ Protocol: config.AvailabilityProbeICMP,+ Enabled: true,+ })+ now := time.Date(2026, 7, 9, 12, 0, 0, 0, time.UTC)++ resource, _ := availabilityResourceFromTarget(target, availabilityStatusFromTarget(target), "org-a", now)+ if resource.Availability == nil {+ t.Fatal("availability payload = nil")+ }+ if resource.Availability.LastChecked != nil {+ t.Fatalf("last checked = %v, want nil before the first probe", resource.Availability.LastChecked)+ }+ if resource.Availability.LastSuccess != nil {+ t.Fatalf("last success = %v, want nil before the first successful probe", resource.Availability.LastSuccess)+ }+}++func TestAvailabilityResourceFromTargetPreservesProbeTimes(t *testing.T) {+ target := config.NormalizeAvailabilityTarget(config.AvailabilityTarget{+ ID: "router",+ Name: "Router",+ Address: "192.0.2.1",+ Protocol: config.AvailabilityProbeICMP,+ Enabled: true,+ })+ checkedAt := time.Date(2026, 7, 9, 11, 59, 55, 0, time.UTC)+ succeededAt := checkedAt.Add(-time.Minute)+ status := availabilityStatusFromTarget(target)+ status.LastChecked = checkedAt+ status.LastSuccess = succeededAt++ resource, _ := availabilityResourceFromTarget(target, status, "org-a", checkedAt.Add(time.Second))+ if resource.Availability == nil {+ t.Fatal("availability payload = nil")+ }+ if resource.Availability.LastChecked == nil || !resource.Availability.LastChecked.Equal(checkedAt) {+ t.Fatalf("last checked = %v, want %v", resource.Availability.LastChecked, checkedAt)+ }+ if resource.Availability.LastSuccess == nil || !resource.Availability.LastSuccess.Equal(succeededAt) {+ t.Fatalf("last success = %v, want %v", resource.Availability.LastSuccess, succeededAt)+ }+}diff --git a/internal/unifiedresources/availability_data_test.go b/internal/unifiedresources/availability_data_test.gonew file mode 100644index 0000000000..fbc68ddb96--- /dev/null+++ b/internal/unifiedresources/availability_data_test.go@@ -0,0 +1,35 @@+package unifiedresources++import (+ "encoding/json"+ "strings"+ "testing"+ "time"+)++func TestAvailabilityDataJSONOmitsUnknownProbeTimes(t *testing.T) {+ payload, err := json.Marshal(AvailabilityData{TargetID: "router"})+ if err != nil {+ t.Fatalf("json.Marshal() error = %v", err)+ }+ wire := string(payload)+ if strings.Contains(wire, "lastChecked") || strings.Contains(wire, "lastSuccess") {+ t.Fatalf("unknown probe times must be absent from JSON, got %s", wire)+ }+}++func TestAvailabilityDataJSONIncludesKnownProbeTimes(t *testing.T) {+ checkedAt := time.Date(2026, time.July, 9, 12, 0, 0, 0, time.UTC)+ payload, err := json.Marshal(AvailabilityData{+ TargetID: "router",+ LastChecked: &checkedAt,+ LastSuccess: &checkedAt,+ })+ if err != nil {+ t.Fatalf("json.Marshal() error = %v", err)+ }+ wire := string(payload)+ if !strings.Contains(wire, "lastChecked") || !strings.Contains(wire, "lastSuccess") {+ t.Fatalf("known probe times must be present in JSON, got %s", wire)+ }+}diff --git a/internal/unifiedresources/clone.go b/internal/unifiedresources/clone.goindex b62ee3ab72..5511b88a64 100644--- a/internal/unifiedresources/clone.go+++ b/internal/unifiedresources/clone.go@@ -304,6 +304,8 @@ func cloneAvailabilityData(in *AvailabilityData) *AvailabilityData {return nil}out := *in+ out.LastChecked = cloneTimePtr(in.LastChecked)+ out.LastSuccess = cloneTimePtr(in.LastSuccess)return &out}diff --git a/internal/unifiedresources/clone_test.go b/internal/unifiedresources/clone_test.goindex 3bcd0e2d5f..72c9bf97b7 100644--- a/internal/unifiedresources/clone_test.go+++ b/internal/unifiedresources/clone_test.go@@ -149,6 +149,28 @@ func TestCloneResource_MutateParentBySource(t *testing.T) {}}+func TestCloneResource_MutateAvailabilityTimes(t *testing.T) {+ checkedAt := time.Date(2026, time.July, 9, 12, 0, 0, 0, time.UTC)+ succeededAt := checkedAt.Add(-time.Minute)+ original := &Resource{+ ID: "availability-router",+ Availability: &AvailabilityData{+ LastChecked: &checkedAt,+ LastSuccess: &succeededAt,+ },+ }+ cloned := cloneResource(original)++ *cloned.Availability.LastChecked = checkedAt.Add(time.Hour)+ *cloned.Availability.LastSuccess = succeededAt.Add(time.Hour)+ if !original.Availability.LastChecked.Equal(checkedAt) {+ t.Error("mutating cloned availability LastChecked should not affect original")+ }+ if !original.Availability.LastSuccess.Equal(succeededAt) {+ t.Error("mutating cloned availability LastSuccess should not affect original")+ }+}+func TestCloneResource_MutateVMwareDetailSlices(t *testing.T) {createdAt := time.Date(2026, time.March, 30, 18, 15, 0, 0, time.UTC)pciSlot := int64(160)diff --git a/internal/unifiedresources/code_standards_test.go b/internal/unifiedresources/code_standards_test.goindex f0ea38d421..55e14a7fec 100644--- a/internal/unifiedresources/code_standards_test.go+++ b/internal/unifiedresources/code_standards_test.go@@ -401,8 +401,10 @@ func TestAgentlessAvailabilityTargetKindStaysCanonical(t *testing.T) {},"types.go": {"Availability *AvailabilityData `json:\"availability,omitempty\"`",- "TargetKind string `json:\"targetKind,omitempty\"`",- "LinkedResourceID string `json:\"linkedResourceId,omitempty\"`",+ "TargetKind string `json:\"targetKind,omitempty\"`",+ "LinkedResourceID string `json:\"linkedResourceId,omitempty\"`",+ "LastChecked *time.Time `json:\"lastChecked,omitempty\"`",+ "LastSuccess *time.Time `json:\"lastSuccess,omitempty\"`",},filepath.Join("..", "..", "frontend-modern", "src", "api", "availabilityTargets.ts"): {"export type AvailabilityTargetKind = 'machine' | 'service' | 'device';",diff --git a/internal/unifiedresources/types.go b/internal/unifiedresources/types.goindex 7366e9d4a6..650ceea5fb 100644--- a/internal/unifiedresources/types.go+++ b/internal/unifiedresources/types.go@@ -1546,24 +1546,24 @@ type TrueNASShare struct {// AvailabilityData contains agentless endpoint probe metadata for a resource.type AvailabilityData struct {- TargetID string `json:"targetId,omitempty"`- LinkedResourceID string `json:"linkedResourceId,omitempty"`- Name string `json:"name,omitempty"`- TargetKind string `json:"targetKind,omitempty"`- Address string `json:"address,omitempty"`- Protocol string `json:"protocol,omitempty"`- Port int `json:"port,omitempty"`- Path string `json:"path,omitempty"`- Enabled bool `json:"enabled"`- Available bool `json:"available"`- LastChecked time.Time `json:"lastChecked,omitempty"`- LastSuccess time.Time `json:"lastSuccess,omitempty"`- LatencyMillis int64 `json:"latencyMillis,omitempty"`- ConsecutiveFailures int `json:"consecutiveFailures,omitempty"`- LastError string `json:"lastError,omitempty"`- FailureThreshold int `json:"failureThreshold,omitempty"`- PollIntervalSeconds int `json:"pollIntervalSeconds,omitempty"`- TimeoutMillis int `json:"timeoutMillis,omitempty"`+ TargetID string `json:"targetId,omitempty"`+ LinkedResourceID string `json:"linkedResourceId,omitempty"`+ Name string `json:"name,omitempty"`+ TargetKind string `json:"targetKind,omitempty"`+ Address string `json:"address,omitempty"`+ Protocol string `json:"protocol,omitempty"`+ Port int `json:"port,omitempty"`+ Path string `json:"path,omitempty"`+ Enabled bool `json:"enabled"`+ Available bool `json:"available"`+ LastChecked *time.Time `json:"lastChecked,omitempty"`+ LastSuccess *time.Time `json:"lastSuccess,omitempty"`+ LatencyMillis int64 `json:"latencyMillis,omitempty"`+ ConsecutiveFailures int `json:"consecutiveFailures,omitempty"`+ LastError string `json:"lastError,omitempty"`+ FailureThreshold int `json:"failureThreshold,omitempty"`+ PollIntervalSeconds int `json:"pollIntervalSeconds,omitempty"`+ TimeoutMillis int `json:"timeoutMillis,omitempty"`}// K8sMetricCapabilities describes which Kubernetes metric families are availablediff --git a/scripts/release_control/subsystem_lookup_test.py b/scripts/release_control/subsystem_lookup_test.pyindex 02d0160fc5..ace01278bc 100644--- a/scripts/release_control/subsystem_lookup_test.py+++ b/scripts/release_control/subsystem_lookup_test.py@@ -2917,7 +2917,7 @@ class SubsystemLookupTest(unittest.TestCase):{"heading": "## Shared Boundaries","path": "internal/api/access_control_handlers.go",- "line": 1189,+ "line": 1196,"heading_line": 140,}],