@@ -324,6 +324,9 @@ export default function WorkflowHistory({ params }: Props) {
324324 return < SectionLoadingIndicator /> ;
325325 }
326326
327+ const showHasNoResults =
328+ filteredEventGroupsEntries . length === 0 && ! hasNextPage ;
329+
327330 return (
328331 < div className = { cls . container } >
329332 < WorkflowHistoryHeader
@@ -387,7 +390,7 @@ export default function WorkflowHistory({ params }: Props) {
387390 } }
388391 />
389392 < PageSection className = { cls . contentSection } >
390- { filteredEventGroupsEntries . length > 0 && (
393+ { ! showHasNoResults && (
391394 < >
392395 { isUngroupedHistoryViewEnabled ? (
393396 < section className = { cls . ungroupedEventsContainer } >
@@ -414,63 +417,69 @@ export default function WorkflowHistory({ params }: Props) {
414417 </ section >
415418 ) : (
416419 < div className = { cls . eventsContainer } >
417- < div role = "list" className = { cls . compactSection } >
418- < Virtuoso
419- data = { filteredEventGroupsEntries }
420- ref = { compactSectionListRef }
421- rangeChanged = { ( { startIndex, endIndex } ) =>
422- setTimelineListVisibleRange ( ( currentRanges ) => ( {
423- ...currentRanges ,
424- compactStartIndex : startIndex ,
425- compactEndIndex : endIndex ,
426- } ) )
427- }
428- { ...( initialEventGroupIndex === undefined
429- ? { }
430- : {
431- initialTopMostItemIndex : initialEventGroupIndex ,
432- } ) }
433- itemContent = { ( index , [ groupId , group ] ) => (
434- < div role = "listitem" className = { cls . compactCardContainer } >
435- < WorkflowHistoryCompactEventCard
436- key = { groupId }
437- { ...group }
438- statusReady = {
439- ! group . hasMissingEvents ||
440- reachedEndOfAvailableHistory
441- }
442- workflowCloseStatus = {
443- workflowExecutionInfo ?. closeStatus
444- }
445- workflowIsArchived = {
446- workflowExecutionInfo ?. isArchived || false
447- }
448- workflowCloseTimeMs = { workflowCloseTimeMs }
449- showLabelPlaceholder = { ! group . label }
450- selected = { group . events . some (
451- ( e ) =>
452- e . eventId === queryParams . historySelectedEventId
453- ) }
454- disabled = { ! Boolean ( group . events [ 0 ] . eventId ) }
455- onClick = { ( ) => {
456- if ( group . events [ 0 ] . eventId )
457- setQueryParams ( {
458- historySelectedEventId : group . events [ 0 ] . eventId ,
420+ { filteredEventGroupsEntries . length > 0 && (
421+ < div role = "list" className = { cls . compactSection } >
422+ < Virtuoso
423+ data = { filteredEventGroupsEntries }
424+ ref = { compactSectionListRef }
425+ rangeChanged = { ( { startIndex, endIndex } ) =>
426+ setTimelineListVisibleRange ( ( currentRanges ) => ( {
427+ ...currentRanges ,
428+ compactStartIndex : startIndex ,
429+ compactEndIndex : endIndex ,
430+ } ) )
431+ }
432+ { ...( initialEventGroupIndex === undefined
433+ ? { }
434+ : {
435+ initialTopMostItemIndex : initialEventGroupIndex ,
436+ } ) }
437+ itemContent = { ( index , [ groupId , group ] ) => (
438+ < div
439+ role = "listitem"
440+ className = { cls . compactCardContainer }
441+ >
442+ < WorkflowHistoryCompactEventCard
443+ key = { groupId }
444+ { ...group }
445+ statusReady = {
446+ ! group . hasMissingEvents ||
447+ reachedEndOfAvailableHistory
448+ }
449+ workflowCloseStatus = {
450+ workflowExecutionInfo ?. closeStatus
451+ }
452+ workflowIsArchived = {
453+ workflowExecutionInfo ?. isArchived || false
454+ }
455+ workflowCloseTimeMs = { workflowCloseTimeMs }
456+ showLabelPlaceholder = { ! group . label }
457+ selected = { group . events . some (
458+ ( e ) =>
459+ e . eventId === queryParams . historySelectedEventId
460+ ) }
461+ disabled = { ! Boolean ( group . events [ 0 ] . eventId ) }
462+ onClick = { ( ) => {
463+ if ( group . events [ 0 ] . eventId )
464+ setQueryParams ( {
465+ historySelectedEventId :
466+ group . events [ 0 ] . eventId ,
467+ } ) ;
468+ timelineSectionListRef . current ?. scrollToIndex ( {
469+ index,
470+ align : 'start' ,
471+ behavior : 'auto' ,
459472 } ) ;
460- timelineSectionListRef . current ?. scrollToIndex ( {
461- index,
462- align : 'start' ,
463- behavior : 'auto' ,
464- } ) ;
465- } }
466- />
467- </ div >
468- ) }
469- endReached = { ( ) => {
470- manualFetchNextPage ( ) ;
471- } }
472- />
473- </ div >
473+ } }
474+ />
475+ </ div >
476+ ) }
477+ endReached = { ( ) => {
478+ manualFetchNextPage ( ) ;
479+ } }
480+ />
481+ </ div >
482+ ) }
474483 < section className = { cls . timelineSection } >
475484 < Virtuoso
476485 useWindowScroll
@@ -542,7 +551,7 @@ export default function WorkflowHistory({ params }: Props) {
542551 ) }
543552 </ >
544553 ) }
545- { filteredEventGroupsEntries . length === 0 && (
554+ { showHasNoResults && (
546555 < div className = { cls . noResultsContainer } > No Results</ div >
547556 ) }
548557 { resetToDecisionEventId && (
0 commit comments