fix(site/src/pages/AIBridgePage/SessionThreadsPage/SessionTimeline): hide "Session completed" until every thread has loaded#26955
Open
jakehwll wants to merge 1 commit into
Conversation
…: hide "Session completed" until every thread has loaded The "Session completed" marker rendered at the bottom of the timeline even while more threads were still being fetched, making it easy for users scrolling a long session to mistake it for the actual end of the session. Only render the end marker when both hasNextPage and isFetchingNextPage are false, and add a HasMoreThreadsToLoad story that exercises the between-fetches state.
dannykopping
approved these changes
Jul 2, 2026
dannykopping
left a comment
Contributor
There was a problem hiding this comment.
Thanks for this! It's a papercut I've been meaning to raise. I'll let Jeremy give the final ✅ but looks reasonable to me.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The "Session completed" marker at the bottom of an AI Gateway session timeline was rendered unconditionally, so on long sessions it appeared below still-loading threads while the user scrolled. That is misleading: users read it as the end of the session even when more threads are about to stream in.
Only render the session end marker (rows 7 and 8 of the grid: the connecting vertical line, the success dot, and the "Session completed" text) once every thread has loaded, that is, once both
hasNextPageandisFetchingNextPageare false. The dashed timeline box still closes cleanly at the bottom, and the infinite-scroll spinner keeps rendering inside row 5 while more pages fetch.Verification
Rendered each SessionTimeline story via a headless Chromium and asserted whether "Session completed" is present:
hasNextPageisFetchingNextPageAll checks pass locally:
pnpm format(no changes)pnpm lint:checkpnpm lint:typesmake pre-commitvia githooksImplementation notes
site/src/pages/AIBridgePage/SessionThreadsPage/SessionTimeline/SessionTimeline.tsx: wrap the row 7 spacer and row 8 status dot/text in!hasNextPage && !isFetchingNextPage.SessionTimeline.stories.tsx: addHasMoreThreadsToLoadto cover the between-fetches state.SessionTimelineSkeleton.tsxis untouched because the skeleton is only shown before any threads have loaded.