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.

Make Patrol summary counts singular

rcourtman80bf3f1c886b
diff --git a/docs/release-control/v6/internal/subsystems/api-contracts.md b/docs/release-control/v6/internal/subsystems/api-contracts.md
index 9eb3723254..47d29d0255 100644
--- a/docs/release-control/v6/internal/subsystems/api-contracts.md
+++ b/docs/release-control/v6/internal/subsystems/api-contracts.md
@@ -174,6 +174,7 @@ Own canonical runtime payload shapes between backend and frontend.
8. Treat Patrol summary supporting metrics as readouts, not reinterpretations: when frontend consumers derive cards such as active findings, criticals, warnings, or fixes from the canonical payloads, those cards must stay numeric and must not synthesize new assessment labels like `Issues detected` or verification labels like `Partial verification` beneath the primary summary contract
9. Treat active Patrol runtime transport as compatible with factual activity surfaces: when the runtime is currently running, frontend consumers may surface in-progress activity context, but they must not replace the activity strip with a second assessment verdict derived from runtime state alone
10. Treat Patrol recency as a singular transport-driven fact: once header metadata, verification copy, or the findings footer already present the governed Patrol timing context, frontend summary consumers must not derive an extra timing pill from the same payloads inside the primary summary card
+11. Treat Patrol findings counts as a singular supporting surface as well: when the summary shell already exposes count cards for active findings, warnings, criticals, and fixes, the primary assessment card must not repeat those same payload-derived counts as secondary badges
## Current State
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 8f2b5662c3..9c38217b3a 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -200,6 +200,10 @@ That same summary-shell rule also applies to timing metadata: if the header,
verification card, or findings footer already presents the governed Patrol
activity timestamp, the summary chip row must not add another recency badge
that competes with those owned timing surfaces.
+The same ownership split applies to supporting counts: if the Patrol summary
+surface renders the metric strip for active findings, warnings, criticals, and
+fixes, the primary summary card should not repeat those same counts in badge
+form beside the assessment and verification copy.
Those supporting cards must also keep their content factual and count-based:
active findings, critical findings, warnings, and fixes are valid secondary
readouts, while labels such as `Issues detected` or `Partial verification`
diff --git a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
index 98d8cdb9f3..1eababecb4 100644
--- a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
+++ b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
@@ -159,6 +159,10 @@ The same supporting-chip rule applies to timing: the primary summary card may
show health and active-finding support, but it should not add another recency
pill once header metadata, verification, and findings footer already carry the
governed activity/verification timestamps.
+That summary-card/metrics-strip split also applies to findings counts. The
+primary assessment card may keep health as supporting context, but active
+findings, warning counts, and critical counts belong to the supporting metric
+strip rather than being repeated as duplicate badges inside the primary card.
That same summary surface must also explain what Patrol actually verified.
Recent run history should drive a visible verification summary that tells the
operator whether Patrol recently completed a successful full patrol, only ran
diff --git a/frontend-modern/src/features/patrol/PatrolIntelligenceSummary.tsx b/frontend-modern/src/features/patrol/PatrolIntelligenceSummary.tsx
index ac9e6b036d..688445a2f2 100644
--- a/frontend-modern/src/features/patrol/PatrolIntelligenceSummary.tsx
+++ b/frontend-modern/src/features/patrol/PatrolIntelligenceSummary.tsx
@@ -159,9 +159,6 @@ export function PatrolIntelligenceSummary(props: { state: PatrolIntelligenceStat
Health {summary().overall_health.grade} ·{' '}
{Math.round(summary().overall_health.score)}/100
</span>
- <span class="rounded-full border border-border-subtle bg-base px-2.5 py-1 text-xs font-medium text-base-content">
- Active findings {summaryStats().totalActive}
- </span>
</div>
<div class="mt-4 rounded-md border border-border-subtle bg-base/90 p-3">
@@ -186,14 +183,6 @@ export function PatrolIntelligenceSummary(props: { state: PatrolIntelligenceStat
</div>
</div>
- <div class="flex flex-wrap items-center gap-2">
- <span class="rounded-full border border-border-subtle bg-base px-2.5 py-1 text-xs font-medium text-base-content">
- Critical {summary().findings_count.critical}
- </span>
- <span class="rounded-full border border-border-subtle bg-base px-2.5 py-1 text-xs font-medium text-base-content">
- Warning {summary().findings_count.warning}
- </span>
- </div>
</div>
<Show when={state.hasInvestigationContext()}>
diff --git a/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx b/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx
index ec5959f9a8..44ca4897d5 100644
--- a/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx
+++ b/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx
@@ -818,7 +818,9 @@ describe('AIIntelligence entitlement gating', () => {
expect(screen.getAllByText('Coverage incomplete').length).toBeGreaterThan(0);
expect(screen.getByText('No recent full patrol')).toBeInTheDocument();
expect(screen.getAllByText(/Last activity/i)).toHaveLength(1);
- expect(screen.getByText('Warnings')).toBeInTheDocument();
+ expect(screen.getAllByText('Active findings')).toHaveLength(1);
+ expect(screen.getAllByText('Warnings')).toHaveLength(1);
+ expect(screen.getAllByText('Critical')).toHaveLength(1);
});
expect(screen.queryByText('No issues found')).not.toBeInTheDocument();