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.

Render finding evidence as 'What Pulse checked' in expanded Patrol finding card

rcourtman4d9972f49a01
diff --git a/frontend-modern/src/components/AI/FindingsPanel.tsx b/frontend-modern/src/components/AI/FindingsPanel.tsx
index a3f3da986d..9da6fe3f8c 100644
--- a/frontend-modern/src/components/AI/FindingsPanel.tsx
+++ b/frontend-modern/src/components/AI/FindingsPanel.tsx
@@ -1301,6 +1301,12 @@ export const FindingsPanel: Component<FindingsPanelProps> = (props) => {
<span class="font-medium">Impact:</span> {finding.impact}
</p>
</Show>
+ <Show when={finding.evidence}>
+ <p class="text-sm text-base-content mt-2">
+ <span class="font-medium">What Pulse checked:</span>{' '}
+ {finding.evidence}
+ </p>
+ </Show>
<Show when={finding.recommendation}>
<p class="text-sm text-base-content mt-2">
<span class="font-medium">Recommended next step:</span>{' '}
diff --git a/frontend-modern/src/components/AI/__tests__/FindingsPanel.links.test.tsx b/frontend-modern/src/components/AI/__tests__/FindingsPanel.links.test.tsx
index 953258cfa7..f8d2137511 100644
--- a/frontend-modern/src/components/AI/__tests__/FindingsPanel.links.test.tsx
+++ b/frontend-modern/src/components/AI/__tests__/FindingsPanel.links.test.tsx
@@ -467,6 +467,8 @@ describe('FindingsPanel resource links', () => {
impact: 'A disk failure before parity is rebuilt could cause unrecoverable data loss.',
recommendation:
'Verify the parity check is progressing and let it complete before making array changes.',
+ evidence:
+ 'Checked array status via Unraid API: parity_status=check, capacity=85.9%, disk2=95.8%.',
detectedAt: '2026-03-30T11:00:00Z',
lastSeenAt: '2026-03-30T11:05:00Z',
status: 'active',
@@ -539,6 +541,12 @@ describe('FindingsPanel resource links', () => {
),
).toBeInTheDocument();
expect(screen.getByText('Recommended next step:')).toBeInTheDocument();
+ expect(screen.getByText('What Pulse checked:')).toBeInTheDocument();
+ expect(
+ screen.getByText(
+ 'Checked array status via Unraid API: parity_status=check, capacity=85.9%, disk2=95.8%.',
+ ),
+ ).toBeInTheDocument();
});
it('can render Patrol findings from the direct Patrol source', async () => {
diff --git a/frontend-modern/src/components/AI/__tests__/FindingsPanel.test.ts b/frontend-modern/src/components/AI/__tests__/FindingsPanel.test.ts
index f6160e0502..250065ff16 100644
--- a/frontend-modern/src/components/AI/__tests__/FindingsPanel.test.ts
+++ b/frontend-modern/src/components/AI/__tests__/FindingsPanel.test.ts
@@ -367,6 +367,16 @@ describe('FindingsPanel assistant handoff', () => {
expect(findingsPanelSource).not.toContain('>Recommendation:</span>');
});
+ it('renders the What Pulse checked line from finding.evidence in the expanded card', () => {
+ // The expanded finding card must surface Finding.Evidence so the
+ // operator can see what data or checks led to this finding — not just
+ // the conclusion. This is trust scaffolding: the user can verify that
+ // Pulse actually checked something relevant before acting.
+ expect(findingsPanelSource).toContain('Show when={finding.evidence}');
+ expect(findingsPanelSource).toContain('>What Pulse checked:</span>');
+ expect(findingsPanelSource).toContain('{finding.evidence}');
+ });
+
it('keeps active Patrol lifecycle history out of the default issue expansion', () => {
// Current issues should answer "what needs doing" first. Raw lifecycle
// history is still available when the operator chooses all/resolved history
diff --git a/frontend-modern/src/stores/aiIntelligence.ts b/frontend-modern/src/stores/aiIntelligence.ts
index aeb1e6c56f..6650fb3fb5 100644
--- a/frontend-modern/src/stores/aiIntelligence.ts
+++ b/frontend-modern/src/stores/aiIntelligence.ts
@@ -146,6 +146,7 @@ export interface UnifiedFinding {
impact?: string;
previousResolvedFixSummary?: string;
recommendation?: string;
+ evidence?: string;
detectedAt: string;
lastSeenAt?: string;
resolvedAt?: string;
@@ -230,6 +231,7 @@ function normalizeUnifiedFindingRecord(item: UnifiedFindingRecord, now: number):
impact: item.impact,
previousResolvedFixSummary: item.previous_resolved_fix_summary,
recommendation: item.recommendation,
+ evidence: item.evidence,
detectedAt: item.detected_at,
lastSeenAt: item.last_seen_at || item.detected_at,
resolvedAt: item.resolved_at,
@@ -272,6 +274,7 @@ function normalizePatrolFindingRecord(item: PatrolFinding, now: number): Unified
impact: item.impact,
previousResolvedFixSummary: item.previous_resolved_fix_summary,
recommendation: item.recommendation,
+ evidence: item.evidence,
detectedAt: item.detected_at,
lastSeenAt: item.last_seen_at || item.detected_at,
resolvedAt: item.resolved_at,