diff --git a/src/Web/autopilot-monitor-web/app/sessions/components/SessionAnnotationsCard.tsx b/src/Web/autopilot-monitor-web/app/sessions/components/SessionAnnotationsCard.tsx index 728e58e2..93921432 100644 --- a/src/Web/autopilot-monitor-web/app/sessions/components/SessionAnnotationsCard.tsx +++ b/src/Web/autopilot-monitor-web/app/sessions/components/SessionAnnotationsCard.tsx @@ -65,6 +65,10 @@ export default function SessionAnnotationsCard({ const [annotations, setAnnotations] = useState>>({}); const [loaded, setLoaded] = useState(false); const [edit, setEdit] = useState>>({}); + // Collapsed by default: the verdict comes at the END of a diagnosis — the card must + // not take space away from the details/analysis work above it. The header summary + // (count + verdict pills) still shows at a glance whether a verdict exists. + const [expanded, setExpanded] = useState(false); const lanes = visibleLanes(user); @@ -152,12 +156,49 @@ export default function SessionAnnotationsCard({ } }; + const annotatedLanes = lanes.filter((lane) => hasContent(annotations[lane])); + return (
-
-

Annotations

+
setExpanded(!expanded)} + className="flex items-start justify-between gap-2 w-full text-left cursor-pointer" + > +
+ + + +

Annotations

+ {annotatedLanes.length > 0 && ( + <> + + ({annotatedLanes.length} {annotatedLanes.length === 1 ? "annotation" : "annotations"}) + +
+ {annotatedLanes.map((lane) => { + const verdict = annotations[lane]?.verdict; + return verdict != null ? ( + + {VERDICT_LABELS[verdict as AnnotationVerdict] ?? verdict} + + ) : null; + })} +
+ + )} +
+ + +
-

+ + {expanded && ( + <> +

Human assessment of this enrollment's analysis — confirmed root causes and corrections feed rule quality.

@@ -274,6 +315,8 @@ export default function SessionAnnotationsCard({

No annotations for this session.

)}
+ + )}
); }