Skip to content

armgit / Pulse

Public Imported from GitHub
0

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.

Flag legacy Patrol snapshots in latest-run status

rcourtman2730f45def00
diff --git a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
index 9ba145f78a..a85ac9ce20 100644
--- a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
+++ b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
@@ -285,6 +285,10 @@ That same truthfulness rule applies to the expanded run outcomes strip. Legacy
runs without findings snapshot ids must not render a green `All clear` outcome
badge from zero aggregate counters; they should show an explicit snapshot
unavailable state instead.
+That same caveat belongs in compact latest-run summaries too. When the most
+recent Patrol run predates findings snapshots, the status bar's latest-run
+segment should say that findings snapshot data is unavailable instead of
+flattening the run into a plain healthy-looking summary.
That same findings surface should keep its section chrome functional rather
than promotional. Inside the Patrol findings tab, the selected tab already
names the surface, so the findings card should not add another in-card product
diff --git a/frontend-modern/src/components/patrol/PatrolStatusBar.tsx b/frontend-modern/src/components/patrol/PatrolStatusBar.tsx
index 5cde018a65..2de948b98c 100644
--- a/frontend-modern/src/components/patrol/PatrolStatusBar.tsx
+++ b/frontend-modern/src/components/patrol/PatrolStatusBar.tsx
@@ -61,6 +61,7 @@ export const PatrolStatusBar: Component<PatrolStatusBarProps> = (props) => {
lastRunTrigger: formatTriggerReason(lastRun?.trigger_reason),
lastRunTypeLabel: getPatrolRunKindLabel(lastRun?.type),
lastRunStatus,
+ lastRunHasFindingsSnapshot: lastRun?.finding_ids !== undefined,
};
});
@@ -166,6 +167,13 @@ export const PatrolStatusBar: Component<PatrolStatusBarProps> = (props) => {
<span class={`px-1.5 py-0.5 rounded ${s().lastRunStatus.badgeClass}`}>
{s().lastRunStatus.label}
</span>
+ <Show when={s().lastRunHasFindingsSnapshot === false}>
+ {' '}
+ <span class="text-muted">·</span>{' '}
+ <span class="text-blue-600 dark:text-blue-400">
+ Findings snapshot unavailable
+ </span>
+ </Show>
</span>
</Show>
diff --git a/frontend-modern/src/components/patrol/__tests__/PatrolStatusBar.test.tsx b/frontend-modern/src/components/patrol/__tests__/PatrolStatusBar.test.tsx
index 9ae3d9dda7..ea5fd3c005 100644
--- a/frontend-modern/src/components/patrol/__tests__/PatrolStatusBar.test.tsx
+++ b/frontend-modern/src/components/patrol/__tests__/PatrolStatusBar.test.tsx
@@ -65,6 +65,50 @@ describe('PatrolStatusBar', () => {
expect(screen.getByText('healthy')).toBeInTheDocument();
});
+ it('flags latest runs whose findings snapshot is unavailable', async () => {
+ getPatrolRunHistoryMock.mockResolvedValue([
+ {
+ id: 'run-legacy-healthy',
+ started_at: '2026-03-12T10:00:00Z',
+ completed_at: '2026-03-12T10:01:00Z',
+ duration_ms: 60000,
+ type: 'patrol',
+ resources_checked: 1,
+ nodes_checked: 0,
+ guests_checked: 0,
+ docker_checked: 0,
+ storage_checked: 0,
+ hosts_checked: 0,
+ pbs_checked: 0,
+ pmg_checked: 0,
+ kubernetes_checked: 0,
+ new_findings: 0,
+ existing_findings: 0,
+ rejected_findings: 0,
+ resolved_findings: 0,
+ auto_fix_count: 0,
+ findings_summary: 'All clear',
+ finding_ids: undefined,
+ error_count: 0,
+ status: 'healthy',
+ triage_flags: 0,
+ tool_call_count: 0,
+ },
+ ]);
+
+ render(() => <PatrolStatusBar refreshTrigger={1} />);
+
+ await waitFor(() => {
+ expect(screen.getByText('Recent activity')).toBeInTheDocument();
+ });
+
+ const latestRunSection = screen.getByText('Latest: Full patrol').closest('span');
+ expect(latestRunSection).not.toBeNull();
+ expect(latestRunSection).toHaveTextContent(
+ 'Latest: Full patrol · healthy · Findings snapshot unavailable',
+ );
+ });
+
it('shows patrol paused when the runtime is blocked even if the last run was healthy', async () => {
getPatrolRunHistoryMock.mockResolvedValue([
{