From 5c03fb2e41beb235050e3ee04c18e73e5c7c30fa Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Wed, 15 Apr 2026 12:04:14 -0400 Subject: [PATCH] fix(web): truncate run goal to first line, max 100 chars with ellipsis Co-Authored-By: Claude Opus 4.6 (1M context) --- apps/fabro-web/app/data/runs.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/fabro-web/app/data/runs.ts b/apps/fabro-web/app/data/runs.ts index 8fc2bc09b..3ba45cb44 100644 --- a/apps/fabro-web/app/data/runs.ts +++ b/apps/fabro-web/app/data/runs.ts @@ -47,11 +47,16 @@ export interface RunWithStatus extends RunItem { statusLabel: string; } +function truncateGoal(goal: string): string { + const firstLine = goal.split("\n")[0]; + return firstLine.length > 100 ? firstLine.slice(0, 100) + "…" : firstLine; +} + export function mapRunListItem(item: RunListItem): RunItem { return { id: item.id, repo: item.repository.name, - title: item.title, + title: truncateGoal(item.title), workflow: item.workflow.slug, number: item.pull_request?.number, additions: item.pull_request?.additions, @@ -91,7 +96,7 @@ export function mapRunSummaryToRunItem(summary: RunSummaryResponse): RunItem { return { id: summary.run_id, repo: repoName, - title: summary.goal ?? "Untitled run", + title: summary.goal ? truncateGoal(summary.goal) : "Untitled run", workflow: summary.workflow_slug ?? "unknown", elapsed: summary.duration_ms != null