Skip to content

[Bug]: Diff panel loses its base selector after picking a base with no common commit, so the choice cannot be reverted #27547

Closed

Description

@n0soc

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. In a repository whose checkout is on dev, fetch an orphan branch that shares no history with it (here origin/dev-context).
  2. Open a thread on that checkout and open the diff panel.
  3. In the comparison selector, pick origin/dev-context as the branch to compare against.

Expected behavior

The panel keeps its header controls in the error state: the current branch, the base selector, and a way back to the automatic base. Alternatively, the selector refuses or flags a base with no common commit before storing it.

Actual behavior

Only the "Diff" tab stays visible. Below it, the panel shows nothing but this error:

Git command failed in GitVcsDriver.resolveReviewMergeBase (<repo path>): Could not find a common commit between 'origin/dev-context' and HEAD.

The current branch and the base selector are gone, so the choice cannot be changed or reset. Restarting the app does not help, since the choice is persisted per thread in Local Storage under t3code:diff-panel-state:v1:

{"state":{"byThreadKey":{"<environment id>:<thread id>":{"kind":"branch","baseRef":"origin/dev-context"}},"branchBaseRefByThreadKey":{"<environment id>:<thread id>":"origin/dev-context"}},"version":2}

The diff panel stays unusable for that thread until the stored entry is removed outside the app.

Impact

Major degradation or frequent failure

Version or commit

Desktop 0.1.5 (beta AppImage)

Environment

TUXEDO OS (Ubuntu 24.04 base, Linux 7.0), desktop app AppImage, Claude Code provider

Logs or stack traces

Server trace (server.trace.ndjson), paths replaced with <repo> and <appimage>:

GitCommandError: Git command failed in GitVcsDriver.resolveReviewMergeBase (<repo>): Could not find a common commit between 'origin/dev-context' and HEAD.
    at file://<appimage>/resources/app.asar/apps/server/dist/binCli-1k0PQRR7.mjs:149496:18
    at next (<anonymous>)
    at resolveReviewMergeBase (file://<appimage>/resources/app.asar/apps/server/dist/binCli-1k0PQRR7.mjs:149566:14)
    at resolveReviewMergeBase (definition) (file://<appimage>/resources/app.asar/apps/server/dist/binCli-1k0PQRR7.mjs:149467:33)
    at getReviewDiffPreview (file://<appimage>/resources/app.asar/apps/server/dist/binCli-1k0PQRR7.mjs:323325:21)
    at getReviewDiffPreview (definition) (file://<appimage>/resources/app.asar/apps/server/dist/binCli-1k0PQRR7.mjs:149552:31)
    at ReviewService.getDiffPreview (file://<appimage>/resources/app.asar/apps/server/dist/binCli-1k0PQRR7.mjs:329864:56)
    at ReviewService.getDiffPreview (definition) (file://<appimage>/resources/app.asar/apps/server/dist/binCli-1k0PQRR7.mjs:323315:25)
    at ws.rpc.review.getDiffPreview (file://<appimage>/resources/app.asar/apps/server/dist/binCli-1k0PQRR7.mjs:324045:23)
    at server.runServerCommand (file://<appimage>/resources/app.asar/apps/server/dist/binCli-1k0PQRR7.mjs:347749:16)
    at server.runServerCommand (definition) (file://<appimage>/resources/app.asar/apps/server/dist/binCli-1k0PQRR7.mjs:347728:26)
    at server.runDefaultServerCommand (file://<appimage>/resources/app.asar/apps/server/dist/binCli-1k0PQRR7.mjs:42247:82)

Evidence from the same machine and repository:

  • git merge-base HEAD origin/dev-context exits 1 on dev: the two branches share no commit, and each has its own single root commit.
  • No branch.*.t3-merge-base-ref is set in the repository's git config, so the base came only from the selection stored in the client.
  • The trace holds 55 resolveReviewMergeBase failures for origin/dev-context, all through getReviewDiffPreview, over 26 minutes. After the stored entry was removed, the trace runs on for five more minutes with none.
  • A second checkout of the same repository, a worktree on the orphan branch itself, fails the same way against its automatic base origin/main (4 failures in the trace). No selection is involved there; I did not check that panel's UI.

Workaround

With the app fully closed, remove the thread's entries from byThreadKey and branchBaseRefByThreadKey in the t3code:diff-panel-state:v1 Local Storage value (Chromium LevelDB under the app's user data directory). The panel then opens on the automatic base again.

Related

#24841 keeps the Uncommitted view working when the branch base has no common commit. The branch comparison still reports the error by design there, and it adds no way to reset the stored base. #19530 covers the thread details Changes row ignoring the base chosen in the panel.

Activity

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