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.

Keep zero-coverage Patrol narratives explicit

rcourtmanbff50989cdc5
diff --git a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
index 1cc1ebd5b5..714e60b104 100644
--- a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
+++ b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
@@ -428,6 +428,10 @@ Zero-coverage scoped runs must also fail closed as `Checked 0 of N scoped
resources` rather than drifting back to a scope-only headline.
run card. Once the run presenter is already carrying canonical coverage copy,
secondary chips must not reintroduce a raw `Scoped to N resources` variant that
+That same zero-coverage rule also applies to the expanded narrative sentence.
+When Patrol checked none of a known scoped set, the run summary must still say
+`Checked 0 of N scoped resources` rather than reverting to a generic `Patrol
+completed` sentence that hides the failed coverage.
re-opens the same ambiguity.
The Patrol page's run-history tab label is now also tightened to `Runs`, while
the underlying run-history panel remains canonical for snapshot filtering and
diff --git a/frontend-modern/src/components/patrol/RunHistoryEntry.tsx b/frontend-modern/src/components/patrol/RunHistoryEntry.tsx
index 38611aab12..28ba5bfb22 100644
--- a/frontend-modern/src/components/patrol/RunHistoryEntry.tsx
+++ b/frontend-modern/src/components/patrol/RunHistoryEntry.tsx
@@ -197,7 +197,7 @@ export function RunHistoryEntry(props: RunHistoryEntryProps) {
<div class="mt-3 flex items-start gap-2 text-sm text-base-content">
<SparklesIcon class="w-4 h-4 text-blue-500 dark:text-blue-400 mt-0.5 flex-shrink-0" />
<p>
- {run.resources_checked > 0 ? (
+ {coverageSummary ? (
<>
{coverageSummary}{' '}
{formatDurationMs(run.duration_ms) ? (
diff --git a/frontend-modern/src/components/patrol/__tests__/RunHistoryEntry.test.tsx b/frontend-modern/src/components/patrol/__tests__/RunHistoryEntry.test.tsx
index c3558e6ca0..796bbede53 100644
--- a/frontend-modern/src/components/patrol/__tests__/RunHistoryEntry.test.tsx
+++ b/frontend-modern/src/components/patrol/__tests__/RunHistoryEntry.test.tsx
@@ -149,6 +149,34 @@ describe('RunHistoryEntry', () => {
(element.textContent?.includes('Patrol completed with issues requiring review.') ??
false),
),
+
+ it('keeps zero-coverage scoped runs on the shared coverage narrative', () => {
+ render(() => (
+ <RunHistoryEntry
+ run={{
+ ...run,
+ id: 'run-zero-coverage-scope',
+ duration_ms: 453,
+ effective_scope_resource_ids: ['expanded-a', 'expanded-b'],
+ resources_checked: 0,
+ error_count: 1,
+ status: 'error',
+ }}
+ isLive={false}
+ patrolStream={patrolStream}
+ selected={true}
+ onSelect={vi.fn()}
+ />
+ ));
+
+ expect(screen.getByText('• Checked 0 of 2 scoped resources')).toBeInTheDocument();
+ expect(screen.queryByText('Scoped to 2 resources')).not.toBeInTheDocument();
+ expect(
+ screen.getByText((_, element) =>
+ element?.tagName === 'P' &&
+ (element.textContent?.includes('Checked 0 of 2 scoped resources') ?? false) &&
+ (element.textContent?.includes('453ms') ?? false) &&
+ (element.textContent?.includes('Patrol completed with issues requiring review.') ?? false),
).toBeInTheDocument();
});