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.

Reduce duplicate Patrol timing chips

rcourtmandd5cd283951d
diff --git a/docs/release-control/v6/internal/subsystems/api-contracts.md b/docs/release-control/v6/internal/subsystems/api-contracts.md
index c8f0584b09..9eb3723254 100644
--- a/docs/release-control/v6/internal/subsystems/api-contracts.md
+++ b/docs/release-control/v6/internal/subsystems/api-contracts.md
@@ -173,6 +173,7 @@ Own canonical runtime payload shapes between backend and frontend.
7. Keep Patrol summary payload consumers aligned on one assessment hierarchy: transport-driven Patrol summary surfaces may show supporting counts and outcomes, but the canonical assessment and verification states must remain singular and not be repeated as a second compact verdict strip
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
## 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 afba4667d2..8f2b5662c3 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -196,6 +196,10 @@ The same hierarchy also applies inside the Patrol summary shell: once the
primary summary card states Patrol's assessment and verification basis,
supporting metric strips under that card must stay metric-oriented and must
not repeat assessment or verification labels as a second compact verdict row.
+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.
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 84c30b919d..98d8cdb9f3 100644
--- a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
+++ b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
@@ -155,6 +155,10 @@ belong to counts and outcomes such as active findings, critical findings,
warnings, and fixes; they must not repeat Patrol assessment labels or
verification labels in a second row that competes with the primary governed
assessment and verification copy above.
+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 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 a2de3309a1..ac9e6b036d 100644
--- a/frontend-modern/src/features/patrol/PatrolIntelligenceSummary.tsx
+++ b/frontend-modern/src/features/patrol/PatrolIntelligenceSummary.tsx
@@ -162,15 +162,6 @@ export function PatrolIntelligenceSummary(props: { state: PatrolIntelligenceStat
<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>
- <Show when={recency().timestamp}>
- <span class="rounded-full border border-border-subtle bg-base px-2.5 py-1 text-xs font-medium text-base-content">
- {recency().label}{' '}
- {formatRelativeTime(recency().timestamp!, {
- compact: true,
- emptyText: 'never',
- })}
- </span>
- </Show>
</div>
<div class="mt-4 rounded-md border border-border-subtle bg-base/90 p-3">
diff --git a/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx b/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx
index 98b6048364..ec5959f9a8 100644
--- a/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx
+++ b/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx
@@ -817,7 +817,7 @@ describe('AIIntelligence entitlement gating', () => {
await waitFor(() => {
expect(screen.getAllByText('Coverage incomplete').length).toBeGreaterThan(0);
expect(screen.getByText('No recent full patrol')).toBeInTheDocument();
- expect(screen.getAllByText(/Last activity/i).length).toBeGreaterThan(0);
+ expect(screen.getAllByText(/Last activity/i)).toHaveLength(1);
expect(screen.getByText('Warnings')).toBeInTheDocument();
});