Skip to content

Commit a379b12

Browse files
devin-ai-integration[bot]Alexander Streeddesertaxle
committed
fix(ui-v2): fall back to expected_start_time in accordion header timestamp
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>
1 parent 42aa0f2 commit a379b12

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

ui-v2/src/components/dashboard/flow-runs-accordion/flow-runs-accordion-header.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,14 @@ export function FlowRunsAccordionHeader({
6363
className="text-sm font-medium text-foreground hover:underline flex items-center gap-1"
6464
onClick={(e) => e.stopPropagation()}
6565
/>
66-
{lastFlowRun?.start_time && (
66+
{(lastFlowRun?.start_time ?? lastFlowRun?.expected_start_time) && (
6767
<FormattedDate
68-
date={new Date(lastFlowRun.start_time)}
68+
date={
69+
new Date(
70+
(lastFlowRun?.start_time ??
71+
lastFlowRun?.expected_start_time) as string,
72+
)
73+
}
6974
format="relative"
7075
className="text-xs text-muted-foreground"
7176
/>

0 commit comments

Comments
 (0)