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.

Route FindingsPanel investigation pointer through shared helper

rcourtman0204744a88d7
diff --git a/frontend-modern/src/components/AI/FindingsPanel.tsx b/frontend-modern/src/components/AI/FindingsPanel.tsx
index c1d67103fb..46347a274c 100644
--- a/frontend-modern/src/components/AI/FindingsPanel.tsx
+++ b/frontend-modern/src/components/AI/FindingsPanel.tsx
@@ -62,6 +62,7 @@ import {
getFindingTitlePresentation,
getFindingRecencyPresentation,
hasFindingInvestigationDetails,
+ hasFindingInvestigationHandoffPointer,
getInvestigationConfidenceBadgeClasses,
getInvestigationOutcomeBadgeClasses,
getInvestigationOutcomeLabel,
@@ -470,12 +471,8 @@ export const FindingsPanel: Component<FindingsPanelProps> = (props) => {
if (finding.investigationRecord?.proposed_fix) {
return undefined;
}
- const hasInvestigationPointer = Boolean(
- finding.investigationOutcome ||
- finding.investigationSessionId ||
- finding.lastInvestigatedAt ||
- pendingApprovalBriefing?.id,
- );
+ const hasInvestigationPointer =
+ hasFindingInvestigationHandoffPointer(finding) || Boolean(pendingApprovalBriefing?.id);
if (!hasInvestigationPointer) {
return undefined;
}
diff --git a/frontend-modern/src/utils/aiFindingPresentation.ts b/frontend-modern/src/utils/aiFindingPresentation.ts
index 3a0b757012..a81637f79f 100644
--- a/frontend-modern/src/utils/aiFindingPresentation.ts
+++ b/frontend-modern/src/utils/aiFindingPresentation.ts
@@ -557,6 +557,23 @@ export const hasFindingInvestigationDetails = (
(finding.investigationAttempts ?? 0) > 0,
);
+// hasFindingInvestigationHandoffPointer is the narrower check used by the
+// proposed-fix briefing path: it asks whether any finding-side reference
+// exists that would let the assistant resume an investigation, regardless
+// of investigationStatus. Callers OR this with their own approval-side
+// pointer when one applies.
+export const hasFindingInvestigationHandoffPointer = (
+ finding: Pick<
+ UnifiedFinding,
+ 'investigationOutcome' | 'investigationSessionId' | 'lastInvestigatedAt'
+ >,
+): boolean =>
+ Boolean(
+ finding.investigationOutcome ||
+ finding.investigationSessionId ||
+ finding.lastInvestigatedAt,
+ );
+
const ATTENTION_OUTCOMES = new Set([
'fix_verification_failed',
'fix_verification_unknown',