From 352fb59e7ce73d09dcb8cfa476e360ae621b07a3 Mon Sep 17 00:00:00 2001 From: Trey T Date: Sun, 3 May 2026 20:37:19 -0500 Subject: [PATCH] feat(pipeline-progress): expandable agent rows with output and error details Click an agent row to toggle its expanded view; expanded rows surface outputSummary and any error text. Adds chevron icons, hover affordance, and a shrink-0 guard on status icons so they keep their size in flex layouts. Co-Authored-By: Claude Opus 4.7 (1M context) --- components/pipeline-progress.tsx | 97 ++++++++++++++++++++++---------- 1 file changed, 68 insertions(+), 29 deletions(-) diff --git a/components/pipeline-progress.tsx b/components/pipeline-progress.tsx index 2f54e3b..a911dfe 100644 --- a/components/pipeline-progress.tsx +++ b/components/pipeline-progress.tsx @@ -1,6 +1,7 @@ "use client"; -import { CheckCircle2, Circle, Loader2, XCircle } from "lucide-react"; +import { useState } from "react"; +import { CheckCircle2, ChevronDown, ChevronRight, Circle, Loader2, XCircle } from "lucide-react"; import type { AgentStatus } from "@/hooks/use-pipeline-progress"; const AGENT_LABELS: Record = { @@ -23,44 +24,82 @@ function formatDuration(ms?: number) { function StatusIcon({ status }: { status: AgentStatus["status"] }) { switch (status) { case "completed": - return ; + return ; case "running": - return ; + return ; case "failed": - return ; + return ; default: - return ; + return ; } } +function AgentRow({ agent }: { agent: AgentStatus }) { + const [expanded, setExpanded] = useState(false); + const hasDetails = agent.outputSummary || agent.error; + + return ( +
hasDetails && setExpanded(!expanded)} + > +
+ +
+
+ {AGENT_LABELS[agent.agentName] || agent.agentName} +
+ {!expanded && agent.outputSummary && ( +

+ {agent.outputSummary} +

+ )} + {!expanded && agent.error && ( +

{agent.error}

+ )} +
+ {agent.durationMs && ( + + {formatDuration(agent.durationMs)} + + )} + {hasDetails && ( + expanded + ? + : + )} +
+ {expanded && ( +
+ {agent.error && ( +
+
Error
+

{agent.error}

+
+ )} + {agent.outputSummary && ( +
+
Output
+

{agent.outputSummary}

+
+ )} + {agent.durationMs && ( +
+
Duration
+

{formatDuration(agent.durationMs)}

+
+ )} +
+ )} +
+ ); +} + export function PipelineProgress({ agents }: { agents: AgentStatus[] }) { return (
{agents.map((agent) => ( -
- -
-
- {AGENT_LABELS[agent.agentName] || agent.agentName} -
- {agent.outputSummary && ( -

- {agent.outputSummary} -

- )} - {agent.error && ( -

{agent.error}

- )} -
- {agent.durationMs && ( - - {formatDuration(agent.durationMs)} - - )} -
+ ))}
);