Skip to content

Conversation

@usvimal
Copy link

@usvimal usvimal commented Jan 3, 2026

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

Previously the window was only created after the sidecar server was ready
(up to 7 seconds). Now the window is created immediately and shows a
loading screen while the server starts in the background.

Changes:
- Create window synchronously in setup() instead of async spawn
- Add serverReady flag and opencode:server-ready event
- Add DesktopServerGate component to show loading screen
- Dispatch event when server is ready to hide loading screen
@usvimal usvimal force-pushed the perf/desktop-startup-optimization branch from 080c864 to b5e95e5 Compare January 3, 2026 05:58
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.

1 participant