Skip to content

desktop: "from <branch>" picker in New Workspace is blank until toggling the project dropdown a few times #51072

Open

Description

@labilio

Summary

In the opencode v2 desktop app (macOS), opening New Workspace (新建工作区) from the project dropdown shows an empty / missing from <branch> base-branch picker. The picker only renders after toggling the selection in the dropdown a few times. This makes it impossible to know or change which branch a new workspace will be created from until you fiddle with the dropdown.

Environment

  • opencode version: v2.0.12 (CLI opencode --version); desktop v2 app
  • OS: Darwin 27.0.0 (arm64), macOS
  • Terminal: N/A — desktop app
  • Shell: /bin/zsh
  • Install/channel: latest (desktop)
  • Active plugins: none found in ~/.config/opencode/opencode.json

Reproduction

  1. Open the v2 desktop app on macOS.
  2. Select a normal git project (e.g. eva-evolve) from the project dropdown.
  3. Choose 新建工作区 / New Workspace.
  4. Observe the right side of the bar (<project> / + 新建工作区): the from <branch> control does not appear / is blank.
  5. Switch the selection in the dropdown (move off and back onto New Workspace) a few times.
  6. The from <branch> control eventually appears.

Expected Behavior

Selecting New Workspace should immediately render the from <branch> picker, populated with the resolved default base branch (e.g. from main), without needing repeated toggling.

Actual Behavior

On entering New Workspace from the project dropdown, the from <branch> control is missing/empty and only shows up after switching back and forth in the dropdown several times (reproducible every time on this setup). No error is surfaced in the UI.

Additional Context

  • Frequency: reproducible every time; the control appears only after a few dropdown toggles.

  • Project state: standard git repository (eva-evolve), HEAD on main, multiple local branches, remotes origin and upstream configured, and many existing worktrees under ~/.local/share/opencode/worktree/....

  • Server logs (~/.local/share/opencode/log/opencode.log) show that when the project is opened, the server runs the branch listing for the picker, e.g.:

    command=git args="[\"--no-optional-locks\", \"-c\", \"core.autocrlf=false\", ..., \"for-each-ref\", \"--ignore-case\", \"--sort=refname\", \"--sort=-committerdate\", \"--format=%(refname:short)\", \"--count=50\", \"refs/heads\", \"refs/remotes\"]" cwd=/Users/secret/Documents/GitHub/eva-evolve
    

    This suggests the branch data is fetched asynchronously and the control simply does not re-render once it arrives (or renders empty while the request is in flight).

  • Also seen in the same log, for context on how the project is resolved:

    level=WARN message="worktree discovery failed" directory=/Users/secret/Documents/GitHub strategy=git error=Worktree.DirectoryUnavailableError
    
  • The for-each-ref result for this repo includes bare origin and upstream entries alongside origin/main, main, etc.:
    origin, origin/main, main, feat/tooltip-system, ... (not sure if this is related, but it is unusual).

  • Possibly related: new workspace always branches from the current head #39778 (new workspace always branches from the current head) and V2 UI does not support workspaces #39614 (V2 UI does not support workspaces).

  • Workaround: toggle the project dropdown selection a few times until the from <branch> control appears.

Activity

  1. opencodejr commented on Oct 28, 2026

    @opencodejr
    Contributor

    Thanks for the detailed report. I wasn't able to reproduce this here: it needs the desktop app on macOS, and the sandbox I run in only has a headless Linux environment without the desktop or web UI. A maintainer with the desktop app will need to check it.

    In the meantime, it would help to know whether it still happens on the latest desktop release, since the New Session project/worktree picker has changed several times since v2.0.12.

    Related issues, for context:

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