Skip to content

fix(schedules): resolve recent run statuses from visibility - #3799

Merged
tegan-temporal merged 5 commits into
mainfrom
fix/schedule-recent-run-statuses
Aug 10, 2026
Merged

fix(schedules): resolve recent run statuses from visibility#3799
tegan-temporal merged 5 commits into
mainfrom
fix/schedule-recent-run-statuses

Conversation

@tegan-temporal

@tegan-temporal tegan-temporal commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Recent run statuses on the schedule detail page can be wrong or significantly delayed -- paused statuses don't show as paused and status changes might not show up for minutes or more. While ultimately we are just rendering info.recentActions.startWorkflowStatus we can at least side-step the problem by relying on the visibility store for the specific workflows so our status reflects the actual status of the workflow.

  • Resolve the status from visibility instead, falling back to the recorded one whenever the query hasn't answered or a run isn't indexed yet
  • Scope the query to the runs on screen and exclude ContinuedAsNew, bounding the result to one execution per row — visibility results can't be sorted, so a page must never be able to truncate them
  • Add fetchWorkflowsForQuery, which rejects instead of raising a toast so a failed enrichment query degrades silently
  • Unit tests for the run mapping, status merge, and query construction
CleanShot.2026-08-06.at.15.37.41.mp4

info.recentActions.startWorkflowStatus is only refreshed while the
scheduler is watching the run, so a terminated run can keep showing as
Running long after the fact, and a paused run never shows as paused.

Resolve the status from visibility instead, falling back to the recorded
one. The query is scoped to the runs on screen and excludes
ContinuedAsNew so a page can never truncate it, since visibility results
cannot be sorted.
@tegan-temporal
tegan-temporal requested a review from a team as a code owner August 6, 2026 22:24
@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
holocene Ready Ready Preview Aug 7, 2026 7:44pm

Request Review

@tegan-temporal tegan-temporal self-assigned this Aug 6, 2026
Comment thread src/lib/services/schedule-service.ts Outdated
Comment thread src/lib/services/schedule-service.ts Outdated
The visibility query tokenizer treats a backslash as an escape character
inside string literals, so an unescaped one in a workflow id swallowed
the following character and matched nothing, and a trailing one escaped
the closing quote into a lex error.

Also drop the redundant empty-runs guard in the component; the service
already returns early for an empty list.
For a continue-as-new chain the badge shows the tail's status, so take
that execution's run id too rather than linking to the run the schedule
originally started. Falls back to the recorded run id when the execution
has none.
Spreading the recorded run obscured that only actualTime carries over
from the schedule action; the rest comes from the matched execution.
@tegan-temporal
tegan-temporal merged commit 04a1a50 into main Aug 10, 2026
18 checks passed
@tegan-temporal
tegan-temporal deleted the fix/schedule-recent-run-statuses branch August 10, 2026 15:45
ardiewen added a commit that referenced this pull request Aug 11, 2026
Auto-generated version bump from 2.53.1 to 2.53.2

Bump type: patch

Changes included:
- [`54a6f782`](54a6f78) refactor: split worker deployment API types (#3795)
- [`0c4b6987`](0c4b698) fix(timeline): recolor a group when a later event extends it (#3787)
- [`7a1b1288`](7a1b128) Remove task queue types from compute configs (#3801)
- [`cf68d9e8`](cf68d9e) Resync filter bar pills on browser back/forward navigation (#3796)
- [`000bddb7`](000bddb) Only pass start delay on activity update if value changes (#3798)
- [`04a1a50a`](04a1a50) fix(schedules): resolve recent run statuses from visibility (#3799)
- [`5e8bbebb`](5e8bbeb) fix(events): dedupe marker billable actions across both fetch cursors (#3807)
- [`1ed83780`](1ed8378) fix(auth): derive auth cookie Secure attribute from the OIDC callback URL (#3806)

Co-authored-by: ardiewen <39966887+ardiewen@users.noreply.github.com>
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