From e1b3ec25fd93ba894f0b84c985ee1bcadbabd2f2 Mon Sep 17 00:00:00 2001 From: Oliver Kieselbach Date: Thu, 13 Aug 2026 14:33:35 +0200 Subject: [PATCH] web: wrap analysis-card context notes on mobile; fix NaN critical path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The confidence bar and the two fleet-context notes on an analysis finding shared a non-wrapping flex row, so on phones they squeezed into word-per-line columns — the row now wraps, each note taking its own line. Also visible in the same screenshot: "critical path NaNh NaNm" in the ESP-blocking apps block. The backend omits null fields (WhenWritingNull), so espAppsOccupancySeconds arrives as undefined and the strict !== null guard let it through to formatDuration. Loose != null check now hides the label when the value is absent. Co-Authored-By: Claude Fable 5 --- .../app/sessions/components/AnalysisResultsSection.tsx | 6 ++++-- .../app/sessions/components/TimeAttributionLane.tsx | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Web/autopilot-monitor-web/app/sessions/components/AnalysisResultsSection.tsx b/src/Web/autopilot-monitor-web/app/sessions/components/AnalysisResultsSection.tsx index b217ba0a..36766b58 100644 --- a/src/Web/autopilot-monitor-web/app/sessions/components/AnalysisResultsSection.tsx +++ b/src/Web/autopilot-monitor-web/app/sessions/components/AnalysisResultsSection.tsx @@ -244,8 +244,10 @@ function AnalysisResultCard({ {result.category}

{result.ruleTitle}

-
-
+ {/* flex-wrap: on narrow screens the fleet-context notes drop to their own + full-width lines instead of squeezing into word-per-line columns. */} +
+
Confidence:
ESP-blocking apps - {breakdown.espAppsOccupancySeconds !== null && ( + {/* Loose check: the backend omits null fields (WhenWritingNull), so the client sees undefined. */} + {breakdown.espAppsOccupancySeconds != null && ( critical path {formatDuration(breakdown.espAppsOccupancySeconds)}