fix(session-header): await session sync before navigation from titlebar flyout - #177
Merged
jeonghun-jj-lee merged 1 commit intoAug 10, 2026
Merged
Conversation
…ar flyout When switching sessions within the same route (params.id change from the titlebar sessions flyout), the Page component persists and the timeline re-keys immediately. If session data isn't fully cached yet, rows trickle in and the measurement burst overlaps with user interaction — the virtualizer's scroll anchoring snaps the viewport back to the bottom. The dashboard doesn't have this issue because it navigates to a different route pattern, causing a full component remount where messagesReady() naturally gates the timeline from false→true with complete data. Fix: await serverSync().session.sync(id) before calling navigate(). This ensures messages + parts are fully in cache when the timeline mounts, eliminating the trickle-in measurement burst. For already-cached sessions (tab strip pre-sync, previous visits) this resolves instantly — no perceptible delay. Also mirrors the dashboard's ctx.projects.open/touch setup to warm the workspace context. Closes #176
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.
Summary
When switching sessions from the titlebar sessions flyout, the Page component persists (same route pattern, different
params.id). If session data isn't fully cached, rows trickle in and the measurement burst overlaps with user interaction — the virtualizer's scroll anchoring snaps the viewport back to the bottom.The dashboard doesn't have this because it navigates to a different route pattern, causing a full remount where
messagesReady()gates the timeline fromfalse→truewith complete data.Fix
openSessionasync and awaitserverSync().session.sync(id)beforenavigate(). This ensures messages + parts are fully in cache when the timeline mounts, eliminating the trickle-in measurement burst. For already-cached sessions this resolves instantly.ctx.projects.open/touchsetup to warm the workspace context.Closes #176