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.

Add explicit Patrol text separators

rcourtman55bff408b3c0
diff --git a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
index 56952f56c6..0fe73315b1 100644
--- a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
+++ b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
@@ -187,10 +187,9 @@ explain the absence of active findings without repeating `Last activity`,
`Next run`, or interval schedule details that already belong to the header and
verification hierarchy above.
That same findings surface should keep its section chrome functional rather
-than promotional. Inside the Patrol findings tab, the card header should use a
-direct label such as `Patrol findings` and should not add extra product
-restatement or marketing subtitles that compete with the page-level Patrol
-header above.
+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
+header or marketing subtitle that simply repeats the tab-level context.
That same control bar should also stay proportional to the current findings
set. Sort controls belong only when there are multiple Patrol findings to
order; the empty state or single-finding state should not spend header space
@@ -199,6 +198,11 @@ The same proportionality rule applies to the findings filter bar itself. When
there are no Patrol findings and no special approval or attention queues to
navigate, the findings surface should not render filter pills that lead only
to the same empty state.
+Tab badges and finding metadata in that same surface also need explicit textual
+separators rather than CSS-only spacing. Badge counts should preserve readable
+plain-text output such as `Findings 1` and `Runs 30`, and metadata trails
+should use textual separators like `· acknowledged 22d ago` so copied or
+extracted Patrol output does not collapse words together.
When Patrol is currently running, that strip should still stay factual rather
than switching to another verdict label: the runtime may add an explicit
in-progress indicator, but the primary activity label remains recent activity
diff --git a/frontend-modern/src/components/AI/FindingsPanel.tsx b/frontend-modern/src/components/AI/FindingsPanel.tsx
index 0a7b2fe15f..729dcce13e 100644
--- a/frontend-modern/src/components/AI/FindingsPanel.tsx
+++ b/frontend-modern/src/components/AI/FindingsPanel.tsx
@@ -538,27 +538,28 @@ export const FindingsPanel: Component<FindingsPanelProps> = (props) => {
{finding.resourceName} ({finding.resourceType}) - {formatTime(finding.detectedAt)}
<Show when={finding.status === 'resolved' && finding.resolvedAt}>
<span class="ml-2 text-green-600 dark:text-green-400">
+ {' · '}
{getResolutionReason(finding)}
</span>
</Show>
<Show when={finding.dismissedReason}>
<span class="ml-2 text-muted">
- ({formatIdentifierLabel(finding.dismissedReason)})
+ {' · '}({formatIdentifierLabel(finding.dismissedReason)})
</span>
</Show>
<Show when={finding.status === 'snoozed' && finding.snoozedUntil}>
<span class="ml-2 text-blue-500 dark:text-blue-400">
- snoozed until {formatTime(finding.snoozedUntil!)}
+ {' · '}snoozed until {formatTime(finding.snoozedUntil!)}
</span>
</Show>
<Show when={finding.acknowledgedAt && finding.status === 'active'}>
<span class="ml-2 text-muted">
- acknowledged {formatTime(finding.acknowledgedAt!)}
+ {' · '}acknowledged {formatTime(finding.acknowledgedAt!)}
</span>
</Show>
<Show when={finding.status === 'active' && finding.lastInvestigatedAt}>
<span class="ml-2 text-muted">
- last investigated {formatTime(finding.lastInvestigatedAt!)}
+ {' · '}last investigated {formatTime(finding.lastInvestigatedAt!)}
</span>
</Show>
</div>
diff --git a/frontend-modern/src/components/AI/__tests__/FindingsPanel.test.ts b/frontend-modern/src/components/AI/__tests__/FindingsPanel.test.ts
index 5fd5c49c46..9008885df4 100644
--- a/frontend-modern/src/components/AI/__tests__/FindingsPanel.test.ts
+++ b/frontend-modern/src/components/AI/__tests__/FindingsPanel.test.ts
@@ -31,6 +31,10 @@ const findingsPanelSource = readFileSync(
resolve(__dirname, '..', 'FindingsPanel.tsx'),
'utf-8',
);
+const patrolWorkspaceSource = readFileSync(
+ resolve(__dirname, '..', '..', '..', 'features', 'patrol', 'PatrolIntelligenceWorkspace.tsx'),
+ 'utf-8',
+);
describe('aiFindingPresentation', () => {
describe('severity presentation', () => {
@@ -186,6 +190,19 @@ describe('aiFindingPresentation', () => {
expect(findingsPanelSource).toContain('aiIntelligenceStore.pendingApprovalCount > 0');
expect(findingsPanelSource).toContain('<Show when={showFilterControls()}>');
});
+
+ it('uses explicit textual separators in finding metadata instead of relying on visual spacing', () => {
+ expect(findingsPanelSource).toContain("{' · '}acknowledged");
+ expect(findingsPanelSource).toContain("{' · '}last investigated");
+ expect(findingsPanelSource).toContain("{' · '}snoozed until");
+ });
+
+ it('uses explicit textual separators for patrol tab badges instead of css-only spacing', () => {
+ expect(patrolWorkspaceSource).toContain("aria-hidden=\"true\"");
+ expect(patrolWorkspaceSource).toContain("{' '}");
+ expect(patrolWorkspaceSource).toContain('{state.summaryStats().totalActive}');
+ expect(patrolWorkspaceSource).toContain('{state.displayRunHistory().length}');
+ });
});
describe('sourceColors', () => {
diff --git a/frontend-modern/src/features/patrol/PatrolIntelligenceWorkspace.tsx b/frontend-modern/src/features/patrol/PatrolIntelligenceWorkspace.tsx
index eb63c13abd..1a85f61998 100644
--- a/frontend-modern/src/features/patrol/PatrolIntelligenceWorkspace.tsx
+++ b/frontend-modern/src/features/patrol/PatrolIntelligenceWorkspace.tsx
@@ -47,8 +47,10 @@ export function PatrolIntelligenceWorkspace(props: { state: PatrolIntelligenceSt
Findings
<Show when={state.summaryStats().totalActive > 0}>
<span
+ aria-hidden="true"
class={`ml-1.5 px-1.5 py-0.5 text-xs rounded-full ${getFindingSeverityToneClasses(state.summaryStats().criticalFindings > 0 ? 'critical' : 'warning')}`}
>
+ {' '}
{state.summaryStats().totalActive}
</span>
</Show>
@@ -67,7 +69,11 @@ export function PatrolIntelligenceWorkspace(props: { state: PatrolIntelligenceSt
>
Runs
<Show when={state.displayRunHistory().length > 0}>
- <span class="ml-1.5 px-1.5 py-0.5 text-xs rounded-full bg-surface-alt text-muted">
+ <span
+ aria-hidden="true"
+ class="ml-1.5 px-1.5 py-0.5 text-xs rounded-full bg-surface-alt text-muted"
+ >
+ {' '}
{state.displayRunHistory().length}
</span>
</Show>
diff --git a/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx b/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx
index d56df78f3b..c5b1f04724 100644
--- a/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx
+++ b/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx
@@ -946,6 +946,8 @@ describe('AIIntelligence entitlement gating', () => {
).toBeInTheDocument();
});
+ expect(screen.getByRole('button', { name: 'Findings' }).textContent).toBe('Findings 1');
+
expect(
screen.queryByText(
'Patrol coverage is incomplete: recent activity was limited to scoped runs and ended with errors, so overall health is not fully verified.',