fix(ui-v2): use expected_start_time for dashboard flow runs filtering#21418
fix(ui-v2): use expected_start_time for dashboard flow runs filtering#21418desertaxle merged 3 commits intomainfrom
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Switch the V2 dashboard from start_time to expected_start_time and from START_TIME_DESC to EXPECTED_START_TIME_DESC sort order. This matches V1 behavior and ensures scheduled/paused flow runs (which have no actual start_time yet) appear within the dashboard time window. Files changed: - routes/dashboard.tsx: buildFlowRunsFilterFromSearch + loader prefetch - flow-runs-card/index.tsx: filter construction - flow-runs-accordion/index.tsx: base filter sort - flow-runs-accordion/flow-runs-accordion-content.tsx: pagination sort - flow-runs-accordion/flow-runs-accordion-header.tsx: last run query sort Closes #18041 Co-authored-by: Alexander Streed <alexander.streed@gmail.com> Co-Authored-By: alex.s <ajstreed1@gmail.com>
65ceeea to
42aa0f2
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 42aa0f2849
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return { | ||
| ...flowFilter, | ||
| sort: "START_TIME_DESC", | ||
| sort: "EXPECTED_START_TIME_DESC", |
There was a problem hiding this comment.
Render header timestamp from expected start when sorting by it
Sorting the header query by EXPECTED_START_TIME_DESC can now select scheduled/paused runs whose start_time is null, but the header only renders a timestamp when lastFlowRun.start_time is present. In the SCHEDULED/PAUSED tab (or any flow whose newest run has not started), this regresses the header to showing no “last run” time even though a run exists. Consider falling back to expected_start_time (or selecting the most recent run with a non-null start_time) so the header remains informative.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Good catch — addressed in a379b12. The header now falls back to expected_start_time when start_time is null, so scheduled/paused runs still show a timestamp.
…stamp When sorting by EXPECTED_START_TIME_DESC, the last run may be a scheduled/paused run with null start_time. Fall back to expected_start_time so the header still shows a timestamp. Co-authored-by: Alexander Streed <alexander.streed@prefect.io> Co-Authored-By: alex.s <ajstreed1@gmail.com>
Fix dashboard.tsx indentation from merge conflict resolution and apply biome useOptionalChain auto-fixes in unrelated files. Co-authored-by: Alexander Streed <alexander.streed@prefect.io> Co-Authored-By: alex.s <ajstreed1@gmail.com>
Closes #18041
Overview
The V2 dashboard was filtering flow runs by
start_timeand sorting bySTART_TIME_DESC. This meant scheduled and paused flow runs (which have nostart_timeyet) were invisible in the dashboard time window. The V1 dashboard correctly usesexpected_start_time/EXPECTED_START_TIME_DESC.This PR switches the V2 dashboard to use
expected_start_timefor filtering andEXPECTED_START_TIME_DESCfor sorting, matching V1 behavior.Changes
All changes are in
ui-v2/:src/routes/dashboard.tsxbuildFlowRunsFilterFromSearch: filter field + sort; loader prefetch sortsrc/components/dashboard/flow-runs-card/index.tsxexpected_start_time) + sortsrc/components/dashboard/flow-runs-accordion/index.tsxsrc/components/dashboard/flow-runs-accordion/flow-runs-accordion-content.tsxsrc/components/dashboard/flow-runs-accordion/flow-runs-accordion-header.tsxexpected_start_timeTest files updated to match new query keys/filters.
Intentionally unchanged: Task runs card and work pools card remain on
start_time(matching V1).Additional: biome lint fixes
Applied biome
useOptionalChainauto-fixes in unrelated files that were flagged by the updated biome 2.4.10 linter in CI. Also corrected indentation indashboard.tsxfrom merge conflict resolution.src/components/deployments/deployment-details-runs-tab.tsxuseOptionalChainsrc/components/events/events-line-chart/events-line-chart.tsxuseOptionalChainsrc/components/ui/flow-run-activity-bar-graph/index.tsxuseOptionalChain(×2)Human review checklist
lastFlowRun?.start_time ?? lastFlowRun?.expected_start_time. For scheduled/paused runs this will show the expected time rather than nothing, which is an improvement but changes what the timestamp represents. Theas stringcast on the inner expression is guarded by the outer truthiness check. Verify this is the desired UX.start_time.useOptionalChainchanges are mechanical but touch unrelated files. Verify no subtle behavioral change (e.g., the!data || !data[0]→!data?.[0]rewrite indeployment-details-runs-tab.tsxis safe becausedatais an array from a query).Checklist
<link to issue>"mint.json.Link to Devin session: https://app.devin.ai/sessions/5e605d2779f440d9ba197db2d2498dbd
Requested by: @desertaxle