opencode icon indicating copy to clipboard operation
opencode copied to clipboard

perf: show window immediately during desktop startup

Open usvimal opened this issue 2 weeks ago • 1 comments

Summary

Previously the desktop app window was only created after the sidecar server was ready (up to 7 seconds). Users saw nothing during this time. Now the window appears immediately with a loading screen.

Changes

Rust (lib.rs)

  • Create window synchronously in setup() instead of inside async spawn
  • Add serverReady = false to initialization script
  • Dispatch opencode:server-ready event when server is ready

TypeScript (app.tsx)

  • Add DesktopServerGate component that shows loading screen
  • Listen for opencode:server-ready event to hide loading
  • Show animated logo with "Starting server..." text

Before/After

Before After
Blank screen for 0-7s Window appears instantly
No feedback Shows loading animation
Feels broken/slow Feels responsive

Testing

  • Launch desktop app
  • Should see loading screen immediately
  • Loading screen disappears when server is ready

usvimal avatar Jan 03 '26 05:01 usvimal