Repository navigation
Conversation
When a task's work went out on another branch (a PR on that branch merged, say), the task's own branch has no commits and Finish had no way out: the merged PR is ignored because it is not this branch's, and the local flow only offered Close task once commits had landed. Merge stayed disabled on "No commits on this branch yet", and Push stayed on offer. A branch with no commits since the base and no uncommitted changes, on the task's branch, now counts as having nothing left to merge: the footer says Close task, Push and Create PR are hidden, and a quiet notice says why. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The empty branch's quiet notice already says nothing is left to merge, and Close task is the way out, so the warning-tinted "Nothing to merge" banner beside it repeated the notice with urgency it no longer has. It still shows when changes are only uncommitted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A task whose work went out on another branch has an empty branch of its own: no commits since the base, nothing uncommitted. Finish then offers no way to close it:
already_landedis set, which needs at least one commit whose patch is on the base. An empty branch has none.So the footer stays on a disabled "Merge into local main" with "No commits on this branch yet", and Push is still on offer. The only way out is the × in the task's title bar.
Fix
createMergeStategainsnothingToMerge(): the worktree is on the task's branch, with no committed and no uncommitted changes. Merge commits count as committed changes, so a branch carrying only a merge is not treated as empty. In local mode the Finish dialog treats this like an already-landed branch:A branch with only uncommitted changes keeps that banner and "Commit the changes to merge them.", and a worktree on another branch still blocks.
Screenshots
Finish on a freshly created task, which has an empty branch. Captured from the built app with the
scripts/showcaseharness.Tests
FinishDialog.client.test.tsx: the empty branch offers Close task without merging, and hides Push, the PR section, the "Nothing to merge" warning and the base checkout warning. The same state on another branch is not offered. The old "No commits on this branch yet" footer test is gone, since that state now closes.npm run checkandnpm testpass.🤖 Generated with Claude Code (Opus 5.5)