Skip to content

desktop: home screen renders without projects or New session action on first launch after V1 migration #57858

Open

Description

@764minutes

Summary

On the first launch of OpenCode Desktop 2.1.2 after upgrading from Desktop 1.19.3, the home screen renders without any project and without the "New session" action. Clicking the + button in the tab bar only re-renders the home screen, so the user cannot create a session at all. After opening an existing session once and returning to the home screen, the project and the "New session" action appear and session creation works normally.

Environment

  • opencode version: 2.1.2 (Desktop, Electron 44.9.1)
  • OS: Windows 10 (10.0.19044) x64
  • Terminal: Desktop app (no terminal env vars set)
  • Shell: C:\Windows\system32\cmd.exe for spawned tools
  • Install/channel: latest, official Windows x64 installer (%LOCALAPPDATA%\Programs\@opencodedesktop), upgraded in place from Desktop 1.19.3
  • Active plugins: none configured in ~/.config/opencode (only service.json exists)

Reproduction

  1. Have OpenCode Desktop 1.19.3 installed and used once (legacy stores present).
  2. Install/upgrade to Desktop 2.1.2 and launch it.
  3. Wait for the background service to be ready, then look at the home screen.
  4. Click the + button in the tab bar.

Expected Behavior

The home screen shows the existing projects and a working "New session" action on first render. Clicking + creates a new session (or at least opens a launcher that contains the "New session" action).

Actual Behavior

  • On first render the "Projects" sidebar contains only "Add project"; no project is listed, although the session list already shows sessions that belong to existing projects.
  • The "New session" action in the home header is missing entirely.
  • The only visible affordance is the + button in the tab bar, which opens/reuses the home tab instead of starting a session. When the home tab is already active, + has no visible effect at all, so there is no way to start a session from the UI. No POST /api/session request reaches the service.
  • Opening a session and returning to the home view makes the project appear and the "New session" action render; from then on, creating a session works.
  • No error is written to main.log, renderer.log, window.log, or crash.log, and the renderer stays connected to the service.

Additional Context

  • The V2 service itself is healthy: opencode service status returns http://127.0.0.1:45278, and POST /api/session by hand creates a session immediately, so this is a client-side rendering/state issue.
  • Startup log shows the legacy store import happening right before the first render:
[2026-10-21 23:09:50.652] (main) imported legacy store files {
  imported: 21,
  files: [
    'default.dat',
    'opencode.global.dat',
    'opencode.window.a1da9042-d01d-46b0-b2b2-8b994ff77b74.dat',
    'opencode.workspace.-.bo0mse.dat',
    'opencode.workspace.C--Users-GOP.mvp9d1.dat',
    'opencode.workspace.QzpcVXNlcnNc.jaysnc.dat'
  ]
}
  • Note the malformed legacy workspace keys (-, C--Users-GOP, and a base64-looking key), which may be what leaves the project store empty until a session is opened.
  • The V2 database was created fresh on first launch (~/.local/share/opencode/opencode.db, schema bootstrap completed at startup); V1 sessions were not imported.
  • Workaround used to recover: open any session from the session list, return to home, then create a session normally. After a full app restart the project list and the "New session" action render correctly on the first frame, so the bad state is specific to the first launch after the V1 -> V2 migration.
  • Frequency: happened on the first launch after the upgrade; could not reproduce once the project list had rendered and the state was persisted.
  • Publishing note: gh CLI is not installed on the reporting machine, so this issue was drafted but not submitted automatically.

Activity

  1. opencode-agent commented on Oct 21, 2026

    @opencode-agent
    Contributor

    Thanks for the detailed report. I couldn't reproduce this here because it needs the Windows Desktop app upgraded in place from Desktop 1.19.3, with real 1.19.3 data, and our automated sandbox can only run the CLI/TUI on Linux. A maintainer with a Windows Desktop setup will need to look into it.

    If you still have them, two things would help:

    • A copy of the imported legacy workspace store contents, with anything sensitive removed. These are the opencode.workspace.*.dat files from before the upgrade, if you have a backup.
    • Whether the sessions shown on the home screen on that first launch came from projects in Git repositories or from plain folders such as your home directory.

    Closely related issues, most likely first:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions