@@ -116,7 +116,6 @@ export default function ExecutionsDashboard() {
116116 const [ searchQuery , setSearchQuery ] = useState ( '' )
117117 const [ segmentCount , setSegmentCount ] = useState < number > ( DEFAULT_SEGMENTS )
118118 const barsAreaRef = useRef < HTMLDivElement | null > ( null )
119- // Removed external sentinels; WorkflowDetails now owns its infinite scroll
120119
121120 const {
122121 workflowIds,
@@ -129,9 +128,6 @@ export default function ExecutionsDashboard() {
129128
130129 const timeFilter = getTimeFilterFromRange ( sidebarTimeRange )
131130
132- // buildSeriesFromLogs removed — now using aggregated server metrics
133-
134- // Persist view mode to the URL and restore it on refresh
135131 useEffect ( ( ) => {
136132 const urlView = searchParams . get ( 'view' )
137133 if ( urlView === 'dashboard' || urlView === 'logs' ) {
@@ -143,13 +139,11 @@ export default function ExecutionsDashboard() {
143139 useEffect ( ( ) => {
144140 if ( typeof window === 'undefined' ) return
145141 const sp = new URLSearchParams ( Array . from ( searchParams . entries ( ) ) )
146- // If no view is present on first mount, set it once to persist on refresh
147142 if ( ! sp . get ( 'view' ) ) {
148143 sp . set ( 'view' , viewMode as string )
149144 router . replace ( `${ window . location . pathname } ?${ sp . toString ( ) } ` , { scroll : false } )
150145 return
151146 }
152- // Keep view param in sync when it changes
153147 if ( sp . get ( 'view' ) !== ( viewMode as string ) ) {
154148 sp . set ( 'view' , viewMode as string )
155149 router . replace ( `${ window . location . pathname } ?${ sp . toString ( ) } ` , { scroll : false } )
@@ -306,7 +300,6 @@ export default function ExecutionsDashboard() {
306300 } )
307301 setExecutions ( sortedWorkflows )
308302
309- // Build aggregate segments across workflows from server segments
310303 const segmentsCount : number = Number ( params . get ( 'segments' ) || DEFAULT_SEGMENTS )
311304 const agg : { timestamp : string ; totalExecutions : number ; successfulExecutions : number } [ ] =
312305 Array . from ( { length : segmentsCount } , ( _ , i ) => {
@@ -374,7 +367,6 @@ export default function ExecutionsDashboard() {
374367 ? Number . parseInt ( l . duration . replace ( / [ ^ 0 - 9 ] / g, '' ) , 10 )
375368 : null
376369 let output : any = null
377- // Prefer finalOutput if present
378370 if ( l . executionData ?. finalOutput !== undefined ) {
379371 output = l . executionData . finalOutput
380372 }
@@ -491,7 +483,6 @@ export default function ExecutionsDashboard() {
491483 else if ( typeof l . duration === 'string' )
492484 durationCandidate = Number . parseInt ( String ( l . duration ) . replace ( / [ ^ 0 - 9 ] / g, '' ) , 10 )
493485
494- // Robust output extraction: prefer finalOutput, then string output, then traceSpans, then executionData.output, then blockExecutions
495486 let output : any = null
496487 if ( l . executionData ?. finalOutput !== undefined ) {
497488 output = l . executionData . finalOutput
@@ -601,7 +592,6 @@ export default function ExecutionsDashboard() {
601592 )
602593 else if ( typeof l . duration === 'string' )
603594 durationCandidate = Number . parseInt ( String ( l . duration ) . replace ( / [ ^ 0 - 9 ] / g, '' ) , 10 )
604- // Prefer finalOutput, then spans, then executionData.output, then blockExecutions
605595 let output : any = null
606596 if ( l . executionData ?. finalOutput !== undefined ) {
607597 output = l . executionData . finalOutput
@@ -652,7 +642,6 @@ export default function ExecutionsDashboard() {
652642
653643 setWorkflowDetails ( ( prev ) => {
654644 const cur = prev [ workflowId ]
655- // Deduplicate by id to avoid React key duplicates when multiple triggers fire
656645 const seen = new Set < string > ( )
657646 const dedup = [ ...( cur ?. allLogs || [ ] ) , ...more ] . filter ( ( x ) => {
658647 const id = x . id
@@ -675,7 +664,6 @@ export default function ExecutionsDashboard() {
675664 }
676665 } )
677666 } catch {
678- // ignore errors for background loads
679667 setWorkflowDetails ( ( prev ) => ( {
680668 ...prev ,
681669 [ workflowId ] : { ...( prev as any ) [ workflowId ] , __loading : false } ,
@@ -685,7 +673,6 @@ export default function ExecutionsDashboard() {
685673 [ workspaceId , endTime , getStartTime , triggers , workflowDetails ]
686674 )
687675
688- // Infinite scroll for All workflows (no expanded workflow)
689676 const loadMoreGlobalLogs = useCallback ( async ( ) => {
690677 if ( ! globalDetails || ! globalLogsMeta . hasMore ) return
691678 if ( globalLoadingMore ) return
@@ -1209,7 +1196,6 @@ export default function ExecutionsDashboard() {
12091196 )
12101197 }
12111198
1212- // Aggregate view for all workflows
12131199 if ( ! globalDetails ) return null
12141200 const totals = aggregateSegments . reduce (
12151201 ( acc , s ) => {
0 commit comments