@@ -481,7 +481,7 @@ export default function Page() {
481481 const environment = useEnvironment ( ) ;
482482 const isConnected = useCrossEngineIsConnected ( {
483483 logCount : trace ?. events . length ?? 0 ,
484- isCompleted : run . completedAt !== null ,
484+ isCompleted : run . finishedAt !== null ,
485485 } ) ;
486486 const { value } = useSearchParams ( ) ;
487487 const tableState = decodeURIComponent ( value ( "tableState" ) ?? "" ) ;
@@ -711,17 +711,17 @@ const INSPECTOR_REFRESH_MS = 5_000;
711711// final rows that become visible late still land, but not long after completion.
712712const LIVE_TAIL_UNRESOLVED_ROOT_MS = 5 * 60_000 ;
713713
714- function msSinceCompleted ( run : { completedAt : string | null } ) : number | null {
715- return run . completedAt ? Date . now ( ) - new Date ( run . completedAt ) . getTime ( ) : null ;
714+ function msSinceFinished ( run : { finishedAt : string | null } ) : number | null {
715+ return run . finishedAt ? Date . now ( ) - new Date ( run . finishedAt ) . getTime ( ) : null ;
716716}
717717
718718function shouldLiveReload (
719- run : { completedAt : string | null } ,
719+ run : { finishedAt : string | null } ,
720720 rootSpanStatus : "executing" | "completed" | "failed"
721721) : boolean {
722- const sinceCompleted = msSinceCompleted ( run ) ;
723- if ( sinceCompleted === null || sinceCompleted < 30_000 ) return true ;
724- return rootSpanStatus === "executing" && sinceCompleted < LIVE_TAIL_UNRESOLVED_ROOT_MS ;
722+ const sinceFinished = msSinceFinished ( run ) ;
723+ if ( sinceFinished === null || sinceFinished < 30_000 ) return true ;
724+ return rootSpanStatus === "executing" && sinceFinished < LIVE_TAIL_UNRESOLVED_ROOT_MS ;
725725}
726726
727727// Legacy path (live tail off): revalidate on ping, with the old size cap.
@@ -732,10 +732,10 @@ function shouldLiveReloadLegacy({
732732} : {
733733 events : TraceEvent [ ] ;
734734 maximumLiveReloadingSetting : number ;
735- run : { completedAt : string | null } ;
735+ run : { finishedAt : string | null } ;
736736} ) : boolean {
737737 if ( events . length > maximumLiveReloadingSetting ) return false ;
738- if ( run . completedAt && new Date ( run . completedAt ) . getTime ( ) < Date . now ( ) - 30_000 ) return false ;
738+ if ( run . finishedAt && new Date ( run . finishedAt ) . getTime ( ) < Date . now ( ) - 30_000 ) return false ;
739739 return true ;
740740}
741741
@@ -785,7 +785,7 @@ function TraceView({
785785 const traceIsTruncated = isTruncated || progressiveIsTruncated ;
786786
787787 // The page data still shows the run unfinished, so a finish reload is useful.
788- const runDataUnfinished = ! run . isFinished && run . completedAt === null ;
788+ const runDataUnfinished = ! run . isFinished && run . finishedAt === null ;
789789
790790 // Display only: live reload and finish detection keep using the unsettled root.
791791 const settled = useMemo (
@@ -794,9 +794,9 @@ function TraceView({
794794 events,
795795 duration,
796796 rootSpanStatus,
797- run : { status : run . status , completedAt : run . completedAt } ,
797+ run : { status : run . status , finishedAt : run . finishedAt } ,
798798 } ) ,
799- [ events , duration , rootSpanStatus , run . status , run . completedAt ]
799+ [ events , duration , rootSpanStatus , run . status , run . finishedAt ]
800800 ) ;
801801
802802 const changeToSpan = useDebounce ( ( selectedSpan : string ) => {
@@ -814,8 +814,8 @@ function TraceView({
814814 } ) ;
815815
816816 const traceStatus = getTraceStatus ( {
817- // Same rule as live reload: only an end time means the run is done.
818- runFinished : run . completedAt !== null ,
817+ // Same rule as live reload: only a finished time means the run is done.
818+ runFinished : run . finishedAt !== null ,
819819 rootSpanStatus,
820820 isComplete,
821821 isTruncated : traceIsTruncated ,
@@ -888,8 +888,8 @@ function TraceView({
888888
889889 // SSE is off during the background load, so pick up rows written meanwhile. Runs
890890 // even if live reload already stopped, as long as the run finished recently.
891- const sinceCompleted = msSinceCompleted ( run ) ;
892- const recentlyActive = sinceCompleted === null || sinceCompleted < LIVE_TAIL_UNRESOLVED_ROOT_MS ;
891+ const sinceFinished = msSinceFinished ( run ) ;
892+ const recentlyActive = sinceFinished === null || sinceFinished < LIVE_TAIL_UNRESOLVED_ROOT_MS ;
893893 const prevIsCompleteRef = useRef ( isComplete ) ;
894894 useEffect ( ( ) => {
895895 const wasComplete = prevIsCompleteRef . current ;
@@ -969,7 +969,7 @@ function TraceView({
969969 environmentType = { run . environment . type }
970970 rootRun = { run . rootTaskRun }
971971 parentRun = { run . parentTaskRun }
972- isCompleted = { run . completedAt !== null }
972+ isCompleted = { run . finishedAt !== null }
973973 treeSnapshot = { resizable . tree as ResizableSnapshot }
974974 errorsOnly = { errorsOnly }
975975 filterText = { filterText }
@@ -1061,11 +1061,11 @@ function NoLogsView({
10611061
10621062 const logRetention = plan ?. v3Subscription ?. plan ?. limits . logRetentionDays . number ?? 30 ;
10631063
1064- const completedAt = run . completedAt ? new Date ( run . completedAt ) : undefined ;
1064+ const finishedAt = run . finishedAt ? new Date ( run . finishedAt ) : undefined ;
10651065 const now = new Date ( ) ;
10661066
1067- const daysSinceCompleted = completedAt
1068- ? Math . floor ( ( now . getTime ( ) - completedAt . getTime ( ) ) / ( 1000 * 60 * 60 * 24 ) )
1067+ const daysSinceCompleted = finishedAt
1068+ ? Math . floor ( ( now . getTime ( ) - finishedAt . getTime ( ) ) / ( 1000 * 60 * 60 * 24 ) )
10691069 : undefined ;
10701070
10711071 const isWithinLogRetention =
@@ -1089,7 +1089,7 @@ function NoLogsView({
10891089 // Buffered runs always carry a synthetic trace (see
10901090 // buildSyntheticTraceForBufferedRun) so they never reach
10911091 // this branch — the message here is the pre-mollifier
1092- // copy for runs with no completedAt and no logs.
1092+ // copy for runs with no finished time and no logs.
10931093 < InfoPanel variant = "info" icon = { InformationCircleIcon } title = "We delete old logs" >
10941094 < Paragraph variant = "small" >
10951095 We tidy up older logs to keep things running smoothly.
0 commit comments