Skip to content

Regression since v1.4.8: startup can enter a blank/partially empty TUI state before real data is ready #23281

@CissiBot

Description

@CissiBot

Description

Since v1.4.8, OpenCode can start into a blank or partially empty TUI state before the real UI elements appear.

Observed behavior:

  • startup enters a mostly empty UI state
  • models/providers/session/history elements appear later
  • the effect is still reproducible in v1.4.11
  • v1.4.7 does not show this behavior

Expected behavior:

  • the startup UI should not enter a blank or partially empty intermediate state before real session/provider/workspace data is ready

Code analysis:

  1. app.tsx changed startup routing so the app can enter a dummy session route early.

In v1.4.7, --session navigation was handled directly after mount:

if (args.sessionID && !args.fork) {
  route.navigate({
    type: "session",
    sessionID: args.sessionID,
  })
}

In v1.4.8, startup can instead enter an initial session route with sessionID: "dummy":

initialRoute={
  (input.args.sessionID || input.args.continue) && !input.args.fork
    ? {
        type: "session",
        sessionID: "dummy",
      }
    : undefined
}

This means the TUI can enter a session route before the real session data is ready.

  1. sync.tsx changed ready() so the old loading gate is effectively disabled.

In v1.4.7:

get ready() {
  return store.status !== "loading"
}

In v1.4.8:

get ready() {
  return true
  if (process.env.OPENCODE_FAST_BOOT) return true
  return store.status !== "loading"
}

The unconditional return true makes the rest of the loading gate unreachable, so the UI can be considered ready before sync/bootstrap state is actually ready.

  1. Together, these changes make it possible for the TUI to enter a session-like route too early, render while the real session/provider/workspace state is still not ready, and show a blank or partially empty intermediate state before the real elements appear.

Plugins

local plugin environment present

OpenCode version

1.4.11

Steps to reproduce

  1. Start OpenCode
  2. Wait for the UI to become usable
  3. Observe that the UI first appears blank or partially empty, then fills in later

Screenshot and/or share link

Not provided

Operating System

Ubuntu 24.04.4

Terminal

Windows Terminal via WSL2

Metadata

Metadata

Assignees

Labels

opentuiThis relates to changes in v1.0, now that opencode uses opentui

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