Summary
Switching between sessions in the left sidebar briefly blanks or flashes the conversation timeline before the target session messages appear.
Reproduction
- Open the desktop app.
- Open a project with multiple existing sessions.
- Click one session name in the left sidebar.
- Click another session name, especially a longer session.
- Observe the main conversation timeline area during the switch.
Expected Behavior
The session header, selected sidebar item, and conversation timeline should switch together without showing an empty timeline frame.
Actual Behavior
The route and selected sidebar item switch first, while the main conversation timeline briefly appears blank or incomplete, then re-populates with the target session messages.
This looks like the conversation stream is being fully reloaded or momentarily lost.
Impact
P1. Session switching is a high-frequency interaction. The blank timeline frame is visually jarring and can make users worry that conversation data disappeared or the app navigated incorrectly.
Initial Diagnosis
Observed in the desktop app with Computer Use. This appears to be a frontend render-state issue, not a route or data-loss issue.
Current code path:
packages/app/src/pages/session.tsx computes messagesReady() from sync.data.message[id] !== undefined.
- The session panel renders
MessageTimeline inside <Show when={messagesReady()}>.
- When
params.id changes and the target session messages are not ready yet, messagesReady() becomes false.
- That unmounts the entire
MessageTimeline, creating a transient 0-message blank frame.
- Once
sync.data.message[id] arrives, MessageTimeline mounts again and the target messages appear.
Related note: PR #286 added session timeline scroll stabilization coverage, but its session-switch test only excludes partial counts between 1 and the initial window size. It does not catch a 0-message blank frame after the URL has switched.
Suggested Verification
Add an E2E regression test for session switching that samples the timeline after navigation reaches the target session URL and asserts there is no 0-message blank frame.
The fix should keep this scoped to session switching and not mix it with the separate send-scroll issue.
Summary
Switching between sessions in the left sidebar briefly blanks or flashes the conversation timeline before the target session messages appear.
Reproduction
Expected Behavior
The session header, selected sidebar item, and conversation timeline should switch together without showing an empty timeline frame.
Actual Behavior
The route and selected sidebar item switch first, while the main conversation timeline briefly appears blank or incomplete, then re-populates with the target session messages.
This looks like the conversation stream is being fully reloaded or momentarily lost.
Impact
P1. Session switching is a high-frequency interaction. The blank timeline frame is visually jarring and can make users worry that conversation data disappeared or the app navigated incorrectly.
Initial Diagnosis
Observed in the desktop app with Computer Use. This appears to be a frontend render-state issue, not a route or data-loss issue.
Current code path:
packages/app/src/pages/session.tsxcomputesmessagesReady()fromsync.data.message[id] !== undefined.MessageTimelineinside<Show when={messagesReady()}>.params.idchanges and the target session messages are not ready yet,messagesReady()becomes false.MessageTimeline, creating a transient 0-message blank frame.sync.data.message[id]arrives,MessageTimelinemounts again and the target messages appear.Related note: PR #286 added session timeline scroll stabilization coverage, but its session-switch test only excludes partial counts between 1 and the initial window size. It does not catch a 0-message blank frame after the URL has switched.
Suggested Verification
Add an E2E regression test for session switching that samples the timeline after navigation reaches the target session URL and asserts there is no 0-message blank frame.
The fix should keep this scoped to session switching and not mix it with the separate send-scroll issue.