Skip to content

Session switch causes ~170ms blank flash and Suspense splash screen #27910

@BYK

Description

@BYK

Describe the bug

Session switching has three compounding responsiveness issues:

  1. deferRender mechanism blanks the review panel and composer for one animation frame on every session switch, and a 140ms setTimeout in session-composer-region stacks on top, causing a ~170ms gap where the composer is invisible.
  2. sessionSync createResource JSX read{sessionSync() ?? ""} is read in JSX, triggering the app-level <Suspense> boundary (splash screen) on every session switch while the sync Promise is pending. The resource returns void and contributes nothing to the DOM.
  3. messagesReady gate blocks rendering until messages have loaded from the API, even though the session exists in the session list and could be shown immediately with a loading spinner.

Steps to reproduce

  1. Open the web UI
  2. Switch between sessions rapidly
  3. Observe blank flashes, splash screen flickers, and delayed composer appearance

Expected behavior

Session switching should be instant — show the session frame immediately with cached data and load messages in the background with a spinner.

System info

  • OpenCode version: v1.15.3
  • OS: Linux

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions