diff --git a/frontend/src/lib/components/copilot/chat/JobsSegment.svelte b/frontend/src/lib/components/copilot/chat/JobsSegment.svelte index fea624ad56..40c61f8a26 100644 --- a/frontend/src/lib/components/copilot/chat/JobsSegment.svelte +++ b/frontend/src/lib/components/copilot/chat/JobsSegment.svelte @@ -6,6 +6,7 @@ import SessionStatusPopover from '$lib/components/sessions/SessionStatusPopover.svelte' import { zIndexes } from '$lib/zIndexes' import JobStatusIcon from '$lib/components/runs/JobStatusIcon.svelte' + import TimeAgo from '$lib/components/TimeAgo.svelte' import { ChevronUp, Hourglass, ThumbsUp, TimerOff } from 'lucide-svelte' import { slide } from 'svelte/transition' import { JobService, type Job } from '$lib/gen' @@ -211,6 +212,16 @@ return formatElapsed(now - job.createdAt) } + // The tooltip keeps seconds: past the first minute the compact relative label reads + // runs launched seconds apart as the same "3m". + const launchedFormat = new Intl.DateTimeFormat(undefined, { + month: 'short', + day: 'numeric', + hour: 'numeric', + minute: '2-digit', + second: '2-digit' + }) + function runHref(job: ChatJob): string { return `/run/${job.jobId}?workspace=${job.workspace}` } @@ -362,6 +373,16 @@ {/if} {job.label} + + {#if isTerminal(job.status)} + + ago + + {/if} {elapsedLabel(job)} {/snippet} {#snippet actions(job)}