[PR #12665] feat: show startup progress instead of blank screen #14316

Open
opened 2026-02-16 18:19:07 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/12665

State: open
Merged: No


Fixes #12666

Summary

When plugins (especially oh-my-opencode) are configured, startup can take several seconds with no visual feedback — a blank black screen that makes users think the app is frozen.

This PR adds a two-phase startup progress display:

  1. Splash phase (pre-render): A plain-text splash screen with the opencode logo is shown immediately. Worker progress events (plugin install, LSP init, etc.) stream to stdout in real-time. The worker bootstrap is triggered early via a warmup RPC call, running in parallel with terminal background color detection.

  2. BootLog phase (in-render): Once opentui takes over the alternate screen buffer, a SolidJS BootLog component shows any remaining progress from the TUI-side bootstrap (provider loading, config sync).

Changes

  • util/rpc.ts: Add Rpc.progress() helper for emitting progress events from worker context
  • context/progress.tsx (new): SolidJS context that bridges worker progress events into the component tree
  • thread.ts: Splash screen with logo + streaming progress logs; warmup worker bootstrap before tui() starts; run getTerminalBackgroundColor() in parallel with warmup
  • app.tsx: Accept mode parameter; add ProgressProvider + BootLog component for in-TUI progress
  • context/sync.tsx: Emit TUI-side progress logs during bootstrap
  • bootstrap.ts / plugin/index.ts / config.ts: Emit progress events at each initialization step

Bug fix

  • Fix scoped npm package display name: @scope/pkg was rendered as empty string due to incorrect regex in plugin/index.ts (now uses Config.getPluginName())

Test plan

  • Start opencode with multiple plugins configured (e.g. oh-my-opencode) — should see splash with streaming progress logs instead of black screen
  • Verify splash clears cleanly when TUI takes over (no bleed-through into alternate buffer)
  • Verify no splash remnants after exiting opencode
  • opencode attach <url> still works (attach.ts updated)
  • Start without plugins — splash should appear briefly then transition to TUI

🤖 Generated with Claude Code

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/12665 **State:** open **Merged:** No --- Fixes #12666 ## Summary When plugins (especially oh-my-opencode) are configured, startup can take several seconds with no visual feedback — a blank black screen that makes users think the app is frozen. This PR adds a two-phase startup progress display: 1. **Splash phase** (pre-render): A plain-text splash screen with the opencode logo is shown immediately. Worker progress events (plugin install, LSP init, etc.) stream to stdout in real-time. The worker bootstrap is triggered early via a warmup RPC call, running in parallel with terminal background color detection. 2. **BootLog phase** (in-render): Once opentui takes over the alternate screen buffer, a SolidJS `BootLog` component shows any remaining progress from the TUI-side bootstrap (provider loading, config sync). ### Changes - **`util/rpc.ts`**: Add `Rpc.progress()` helper for emitting progress events from worker context - **`context/progress.tsx`** (new): SolidJS context that bridges worker progress events into the component tree - **`thread.ts`**: Splash screen with logo + streaming progress logs; warmup worker bootstrap before `tui()` starts; run `getTerminalBackgroundColor()` in parallel with warmup - **`app.tsx`**: Accept `mode` parameter; add `ProgressProvider` + `BootLog` component for in-TUI progress - **`context/sync.tsx`**: Emit TUI-side progress logs during bootstrap - **`bootstrap.ts`** / **`plugin/index.ts`** / **`config.ts`**: Emit progress events at each initialization step ### Bug fix - Fix scoped npm package display name: `@scope/pkg` was rendered as empty string due to incorrect regex in `plugin/index.ts` (now uses `Config.getPluginName()`) ## Test plan - [ ] Start opencode with multiple plugins configured (e.g. oh-my-opencode) — should see splash with streaming progress logs instead of black screen - [ ] Verify splash clears cleanly when TUI takes over (no bleed-through into alternate buffer) - [ ] Verify no splash remnants after exiting opencode - [ ] `opencode attach <url>` still works (attach.ts updated) - [ ] Start without plugins — splash should appear briefly then transition to TUI 🤖 Generated with [Claude Code](https://claude.com/claude-code)
yindo added the pull-request label 2026-02-16 18:19:07 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14316