mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-11-17 00:20:51 +00:00
feat: show when each job started in the ai session jobs popover (#12301)
* feat: show when each job started in the ai session jobs popover Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: show launch time only on finished rows, with cached formatters Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat: show job launch time as compact time ago with exact time on hover Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
188b6ccf15
commit
8b404164e3
@@ -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 @@
|
||||
<JobStatusIcon job={job.job} />
|
||||
{/if}
|
||||
<span class="min-w-0 grow truncate text-primary">{job.label}</span>
|
||||
<!-- Live rows are pinned on top with a ticking elapsed time and their Cancel/Approve
|
||||
buttons; a launch time there would leave the label no room in the popover. -->
|
||||
{#if isTerminal(job.status)}
|
||||
<span
|
||||
class="shrink-0 tabular-nums text-tertiary"
|
||||
title={`Launched ${launchedFormat.format(job.createdAt)}`}
|
||||
>
|
||||
<TimeAgo date={new Date(job.createdAt).toISOString()} compact /> ago
|
||||
</span>
|
||||
{/if}
|
||||
<span class="shrink-0 tabular-nums text-tertiary">{elapsedLabel(job)}</span>
|
||||
{/snippet}
|
||||
{#snippet actions(job)}
|
||||
|
||||
Reference in New Issue
Block a user