diff --git a/apps/desktop/src/ui/JobCard.tsx b/apps/desktop/src/ui/JobCard.tsx index 812629307..ef0fb0614 100644 --- a/apps/desktop/src/ui/JobCard.tsx +++ b/apps/desktop/src/ui/JobCard.tsx @@ -321,7 +321,7 @@ export function JobCard({ {loop.runs.length} {loop.runs.length === 1 ? "run" : "runs"} )} - + Run history diff --git a/apps/desktop/src/ui/JobRuns.tsx b/apps/desktop/src/ui/JobRuns.tsx index e3beab397..425647dc8 100644 --- a/apps/desktop/src/ui/JobRuns.tsx +++ b/apps/desktop/src/ui/JobRuns.tsx @@ -44,20 +44,33 @@ export function runText(run: LoopRun): string { const HISTORY_DOTS = 5; /** The last few runs as dots, oldest first. */ -export function RunHistory({ runs }: { runs: readonly LoopRun[] }) { +export function RunHistory({ runs, onOpen }: { runs: readonly LoopRun[]; onOpen?: () => void }) { const recent = runs.slice(0, HISTORY_DOTS).reverse(); if (!recent.length) return No runs yet; const failed = recent.filter(isFailedRun).length; const label = failed ? `${failed} of the last ${recent.length} runs failed` : `The last ${recent.length} runs, oldest first`; + const dots = recent.map((run) => ( + + )); return ( - - {recent.map((run) => ( - - ))} - + {onOpen ? ( + + ) : ( + + {dots} + + )} ); }