fix(ui): stabilize infinite-stream callbacks + suppress empty-state flash
- useInfiniteStream: wrap fetchNextPage and refresh in useCallback so InfiniteScrollArea's IntersectionObserver does not re-subscribe on every parent render. - InfiniteScrollArea: do not render 'End of stream' until at least one item has loaded and the initial query has settled (was flashing on mount before first fetch). - AgentHealth: pass isLoading + hasItems to both InfiniteScrollArea wrappers.
This commit is contained in:
@@ -957,6 +957,8 @@ export default function AgentHealth() {
|
||||
onTopVisibilityChange={setIsLogAtTop}
|
||||
isFetchingNextPage={logStream.isFetchingNextPage}
|
||||
hasNextPage={logStream.hasNextPage}
|
||||
isLoading={logStream.isLoading}
|
||||
hasItems={logStream.items.length > 0}
|
||||
maxHeight={360}
|
||||
>
|
||||
{filteredLogs.length > 0 ? (
|
||||
@@ -993,6 +995,8 @@ export default function AgentHealth() {
|
||||
onTopVisibilityChange={setIsTimelineAtTop}
|
||||
isFetchingNextPage={eventStream.isFetchingNextPage}
|
||||
hasNextPage={eventStream.hasNextPage}
|
||||
isLoading={eventStream.isLoading}
|
||||
hasItems={eventStream.items.length > 0}
|
||||
maxHeight={360}
|
||||
>
|
||||
{feedEvents.length > 0 ? (
|
||||
|
||||
Reference in New Issue
Block a user