From a4dcc1bac69d8d29909b011727b5dcc59591db0e Mon Sep 17 00:00:00 2001 From: rcourtman Date: Sun, 21 Dec 2025 22:35:39 +0000 Subject: [PATCH] fix: don't show 'All healthy' when patrol run had errors When a patrol run encounters errors (e.g., LLM call failed), don't display 'All healthy' in the summary as that's misleading - the analysis didn't complete properly. Now shows 'Analysis incomplete (N errors)' instead, which correctly explains why the status badge shows red/error. --- internal/ai/patrol.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/ai/patrol.go b/internal/ai/patrol.go index db9e057..81aaa6b 100644 --- a/internal/ai/patrol.go +++ b/internal/ai/patrol.go @@ -841,6 +841,10 @@ func (p *PatrolService) runPatrol(ctx context.Context) { } if runStats.errors > 0 { status = "error" + // Don't claim "All healthy" if there were errors - the patrol didn't complete properly + if findingsSummaryStr == "All healthy" { + findingsSummaryStr = fmt.Sprintf("Analysis incomplete (%d errors)", runStats.errors) + } } // Create run record