From a8ee943c92b0043d2b9d05bc80cc1a3021bb8e70 Mon Sep 17 00:00:00 2001 From: Theo Browne Date: Thu, 2 Jul 2026 12:47:23 -0700 Subject: [PATCH] Two-line agent rows: wrapping labels, meta line beneath MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Long agent labels were shrink-0 and pushed the model/stats readout off the clipped right edge. Rows now stack: the label owns the first line and wraps freely, and model · stats · badges · error text sit on a muted meta line under it — nothing competes for horizontal space, so nothing clips regardless of label length. The chevron and status dot center against the first text line via fixed line-height boxes. Co-Authored-By: Claude Fable 5 --- .../src/components/workflow/workflowUi.tsx | 59 ++++++++++--------- 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/apps/web/src/components/workflow/workflowUi.tsx b/apps/web/src/components/workflow/workflowUi.tsx index 5fcb25b77b..92ebf9a764 100644 --- a/apps/web/src/components/workflow/workflowUi.tsx +++ b/apps/web/src/components/workflow/workflowUi.tsx @@ -140,9 +140,12 @@ export function agentStatsLabel(agent: WorkflowRunAgent): string | undefined { return parts.length > 0 ? parts.join(" · ") : undefined; } -/** The shared inner content of an agent row: dot, label, badges, - * right-aligned model + stats. Error text is the only inline content — - * routine previews live in the expandable transcript, not the row. */ +/** + * The shared inner content of an agent row. Two-line layout: the label owns + * the first line and wraps freely (long workflow labels are common), and + * model / stats / badges / error text sit on a muted meta line beneath — + * nothing competes for horizontal space, so nothing clips. + */ export function AgentRowContent({ agent, leading, @@ -152,32 +155,34 @@ export function AgentRowContent({ }): ReactElement { const stats = agentStatsLabel(agent); const errorText = agent.status === "error" ? agent.error : undefined; + const metaLabel = [agent.model, stats].filter((part) => part !== undefined).join(" · "); + const hasBadges = agent.cached === true || (agent.attempt !== undefined && agent.attempt > 1); return ( -
- {leading} - - - {agentDisplayLabel(agent)} +
+ {/* Fixed line-height boxes center the affordances on the first text line. */} + {leading !== undefined && {leading}} + + - - {errorText !== undefined ? ( - {errorText} - ) : ( - - )} - {agent.model !== undefined && ( - - {agent.model} - - )} - {stats !== undefined && ( - {stats} - )} +
+
+ {agentDisplayLabel(agent)} +
+ {(metaLabel.length > 0 || hasBadges || errorText !== undefined) && ( +
+ {metaLabel.length > 0 && {metaLabel}} + + {errorText !== undefined && ( + {errorText} + )} +
+ )} +
); }