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.

Replace legacy Patrol all-clear outcome with unavailable state

rcourtmanf0ec069f6e4c
diff --git a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
index 911d1fff7f..9ba145f78a 100644
--- a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
+++ b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
@@ -281,6 +281,10 @@ That same trust rule applies inside expanded run-history narratives. A legacy
run without findings snapshot ids must not render an `All clear` conclusion
just because its aggregate counters are zero; the narrative should explicitly
state that run-specific findings could not be fully verified.
+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 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/RunHistoryEntry.tsx b/frontend-modern/src/components/patrol/RunHistoryEntry.tsx
index 613a04c23b..ecd79c4aa9 100644
--- a/frontend-modern/src/components/patrol/RunHistoryEntry.tsx
+++ b/frontend-modern/src/components/patrol/RunHistoryEntry.tsx
@@ -358,7 +358,19 @@ export function RunHistoryEntry(props: RunHistoryEntryProps) {
</span>
</Show>
<Show
- when={runIsHealthy && run.new_findings === 0 && run.existing_findings === 0}
+ when={!hasFindingsSnapshot && run.new_findings === 0 && run.existing_findings === 0}
+ >
+ <span class="inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300">
+ <ActivityIcon class="w-3 h-3" /> Snapshot unavailable
+ </span>
+ </Show>
+ <Show
+ when={
+ hasFindingsSnapshot &&
+ runIsHealthy &&
+ run.new_findings === 0 &&
+ run.existing_findings === 0
+ }
>
<span class="inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-300">
<CheckCircleIcon class="w-3 h-3" /> All clear
diff --git a/frontend-modern/src/components/patrol/__tests__/RunHistoryEntry.test.tsx b/frontend-modern/src/components/patrol/__tests__/RunHistoryEntry.test.tsx
index dd25d87ee5..f6d7020d03 100644
--- a/frontend-modern/src/components/patrol/__tests__/RunHistoryEntry.test.tsx
+++ b/frontend-modern/src/components/patrol/__tests__/RunHistoryEntry.test.tsx
@@ -150,7 +150,9 @@ describe('RunHistoryEntry', () => {
'This run predates findings snapshots, so run-specific findings cannot be fully verified.',
),
).toBeInTheDocument();
+ expect(screen.getByText('Snapshot unavailable')).toBeInTheDocument();
expect(screen.queryByText('All clear — no new issues.')).not.toBeInTheDocument();
+ expect(screen.queryByText(/^All clear$/)).not.toBeInTheDocument();
});
it('uses a shared coverage summary when a scoped run checked fewer resources than its scope', () => {