Skip to content

Events list timing (2/2): relative "time ago"#2636

Draft
mitul-s wants to merge 1 commit into
mainfrom
c+ms/events-relative-time-ee1e
Draft

Events list timing (2/2): relative "time ago"#2636
mitul-s wants to merge 1 commit into
mainfrom
c+ms/events-relative-time-ee1e

Conversation

@mitul-s

@mitul-s mitul-s commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Description

The sidebar Events list currently shows each event's absolute wall-clock time (e.g. 3:47:18 PM). With no date, that's ambiguous for runs that span midnight or sleep for a day, and it doesn't convey recency at a glance.

This PR (the relative-time approach, "Idea C") replaces the per-row clock time with an auto-updating relative label, keeping the exact timestamp on hover:

Events
step_created      2 minutes ago     ← hover for full UTC + local date/time
step_started      2 minutes ago
step_completed    Just now
  • Reuses the existing useShortTimeAgo hook for the label ("Just now" / "N minutes ago" / "N hours ago" / "N days ago") and wraps it in the existing TimestampTooltip, whose hover card shows the detailed "x ago" plus full UTC and local date/time — so the exact instant is never lost and the cross-day ambiguity is resolved.
  • Very small change: no new utilities, just swaps the formatting and adds the hover wrapper.

Known trade-off versus the sibling PR: tightly-spaced events can all read "2 minutes ago," so this view favors "is it recent / is it stuck?" over "how long did each phase take?".

This is 2 of 2 sibling PRs exploring how to display event timing. The other (c+ms/events-delta-timing-ee1e, #2634) shows the gap from the previous event. They are independent branches off main so they can be compared and chosen between.

Scope is limited to the sidebar EventsList (the component in the screenshot); the full Events tab table is unchanged.

How did you test your changes?

  • pnpm --filter @workflow/web-shared typecheck — passes.
  • pnpm --filter @workflow/web-shared build (incl. workspace deps via turbo) — passes.
  • Full pnpm --filter @workflow/web-shared test — all pass except the 2 pre-existing failures in test/zstd-decoder.test.ts (zlib.zstdCompressSync is not a function), which fail identically on a clean main in this Node 22.14 environment and are unrelated to this change.
  • biome check on the changed component — no diagnostics.
  • No new unit test: the change reuses the already-tested useShortTimeAgo hook and TimestampTooltip and adds no new logic. Visual confirmation in a preview/dev run is recommended (the list renders when selecting a span in the trace viewer sidebar) — not performed in this environment.

PR Checklist - Required to merge

  • 📦 pnpm changeset was run to create a changelog for this PR (@workflow/web-shared patch)
  • 🔒 DCO sign-off passes (run git commit --signoff on your commits)
  • 📝 Ping @vercel/workflow in a comment once the PR is ready, and the above checklist is complete
Open in Web Open in Cursor 

Replace the bare wall-clock time on each row of the sidebar Events list
with an auto-updating relative time (e.g. "2 minutes ago"), and move the
exact date/time into the existing TimestampTooltip hover card so it is
still available on demand.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>
@vercel

vercel Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview, Comment Jun 25, 2026 8:16pm
example-nextjs-workflow-webpack Ready Ready Preview, Comment Jun 25, 2026 8:16pm
example-workflow Ready Ready Preview, Comment Jun 25, 2026 8:16pm
workbench-astro-workflow Ready Ready Preview, Comment Jun 25, 2026 8:16pm
workbench-express-workflow Ready Ready Preview, Comment Jun 25, 2026 8:16pm
workbench-fastify-workflow Ready Ready Preview, Comment Jun 25, 2026 8:16pm
workbench-hono-workflow Ready Ready Preview, Comment Jun 25, 2026 8:16pm
workbench-nitro-workflow Ready Ready Preview, Comment Jun 25, 2026 8:16pm
workbench-nuxt-workflow Ready Ready Preview, Comment Jun 25, 2026 8:16pm
workbench-sveltekit-workflow Ready Ready Preview, Comment Jun 25, 2026 8:16pm
workbench-tanstack-start-workflow Ready Ready Preview, Comment Jun 25, 2026 8:16pm
workbench-vite-workflow Ready Ready Preview, Comment Jun 25, 2026 8:16pm
workflow-docs Ready Ready Preview, Comment, Open in v0 Jun 25, 2026 8:16pm
workflow-swc-playground Ready Ready Preview, Comment Jun 25, 2026 8:16pm
workflow-tarballs Ready Ready Preview, Comment Jun 25, 2026 8:16pm
workflow-web Ready Ready Preview, Comment Jun 25, 2026 8:16pm

@changeset-bot

changeset-bot Bot commented Jun 25, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4f1ee6d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
@workflow/web-shared Patch
@workflow/web Patch
@workflow/cli Patch
@workflow/nitro Patch
workflow Patch
@workflow/world-testing Patch
@workflow/nuxt Patch
@workflow/core Patch
@workflow/builders Patch
@workflow/next Patch
@workflow/vitest Patch
@workflow/astro Patch
@workflow/nest Patch
@workflow/rollup Patch
@workflow/sveltekit Patch
@workflow/vite Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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