Skip to content

improve JobTimeline snoozed states#565

Merged
bgentry merged 6 commits into
masterfrom
bg/job-timeline-snoozed
May 8, 2026
Merged

improve JobTimeline snoozed states#565
bgentry merged 6 commits into
masterfrom
bg/job-timeline-snoozed

Conversation

@bgentry
Copy link
Copy Markdown
Contributor

@bgentry bgentry commented May 8, 2026

Snoozed jobs were displayed as ordinary scheduled jobs even though they had already run once. Because snoozes overwrite scheduled_at with the next retry time, the timeline could show a negative wait duration and leave the prior run phase looking unstarted.

This treats inferred snoozed jobs as a distinct timeline phase. The original scheduled and wait timing are shown as unavailable, the prior run is marked complete, and the next retry appears in a dedicated Snoozed step.

The branch also tightens JobTimeline status colors and icons so waiting states use amber, active running uses blue, and completed running phases no longer share the same check icon as the final completion step.

Change Before After
Snoozed scheduled jobs no longer show a negative wait duration or an unstarted running phase. 01-before-snoozed-job 01-after-snoozed-job
Completed jobs use distinct icons for the running phase and final completion. 02-before-completed-job-icons 02-after-completed-job-icons

bgentry added 5 commits May 7, 2026 21:46
Replace weak Running icon (ArrowPathRoundedSquareIcon/PlayCircleIcon)
with a custom GPU-accelerated animated ring spinner that uses only CSS
transform: rotate() for zero layout/paint cost. The spinner animates
when a job is actively running and shows a static arc otherwise.

Available/Wait icons are unchanged from their original values:
PauseCircleIcon in TaskStateIcon, QueueListIcon in JobTimeline.

Respects prefers-reduced-motion via motion-reduce:animate-none.
Change the "active" step icon background from yellow to blue,
reserved for steps where something is actively executing
(Running). Add a "waiting" status with amber coloring for
time-based wait states: scheduled-in-future, available
(waiting for a worker), and awaiting retry.
Snoozed jobs are a weird edge case as far as the timeline view. They've
already run at least once, but their `scheduled_at` reflects the _next_
time they'll run; this means we cannot back out details on how long the
job was waiting to be picked up, when it was last scheduled, etc. Until
now the `JobTimeline` component really didn't try to deal with this
aside from some apparently broken handling (see the "Scheduled Snoozed"
story prior to this commit).

To improve this, treat inferred snoozes as a distinct timeline phase so
the past run, lost wait interval, and next retry each read clearly.  Add
focused JobTimeline coverage so the snoozed heuristic, step order, and
visual states stay stable.
The timeline icons were hard to read at their rendered size,
especially on colored status circles and against the dark job detail
background. The component also mixed `gray-*` and `slate-*` neutrals,
which made it drift from the rest of the UI.

Switch the Heroicons steps to their solid variants, add per-status icon
foreground colors so each glyph keeps enough contrast without looking
harsh, and align the neutral palette with `slate-*`. The connector and
ring dark-mode colors are also adjusted so the timeline remains legible
on the actual page background.
Completed jobs used the same check icon for both the `Running` step and
the final completion step, which made the timeline visually redundant and
hid where the run phase ended.

Use the play icon for non-active running phases while keeping the spinner
for actively running jobs. Add focused coverage so the running and
complete steps remain visually distinct for completed jobs.
@bgentry bgentry force-pushed the bg/job-timeline-snoozed branch from a9b7069 to 11d611a Compare May 8, 2026 03:10
@bgentry bgentry marked this pull request as ready for review May 8, 2026 03:11
Vitest was not resolving `@test/...` imports, so affected tests failed
before running assertions.

Anchor the `@*` mapping at `baseUrl: "./src"` so Vite and Vitest map
project aliases to the source tree consistently, and opt into the
TypeScript 6 deprecation window for that setting.
@bgentry bgentry force-pushed the bg/job-timeline-snoozed branch from 11d611a to 703d9b3 Compare May 8, 2026 03:13
@bgentry bgentry requested a review from brandur May 8, 2026 03:13
@bgentry bgentry merged commit cd9846c into master May 8, 2026
21 checks passed
@bgentry bgentry deleted the bg/job-timeline-snoozed branch May 8, 2026 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants