Skip to content

fix(session-header): await session sync before navigation from titlebar flyout - #177

Merged
jeonghun-jj-lee merged 1 commit into
local/amicodefrom
jj/176-presync-session-on-flyout-open
Aug 10, 2026
Merged

fix(session-header): await session sync before navigation from titlebar flyout#177
jeonghun-jj-lee merged 1 commit into
local/amicodefrom
jj/176-presync-session-on-flyout-open

Conversation

@jeonghun-jj-lee

Copy link
Copy Markdown
Contributor

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 from false→true with complete data.

Fix

  • Make openSession async and await serverSync().session.sync(id) before navigate(). 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.
  • Mirror the dashboard's ctx.projects.open/touch setup to warm the workspace context.

Closes #176

…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
@jeonghun-jj-lee
jeonghun-jj-lee merged commit 1030064 into local/amicode Aug 10, 2026
1 of 4 checks passed
@jeonghun-jj-lee
jeonghun-jj-lee deleted the jj/176-presync-session-on-flyout-open branch August 10, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Timeline scroll yanks user back to bottom on first session open

1 participant