Show in-progress git op in detached worktree label - #63
Merged
Conversation
Replace the bare "(detached)" sidebar label with a richer description when the worktree is mid-rebase, mid-bisect, or mid-cherry-pick. Labels read like "rebasing 5/20 onto origin/release", "bisecting (3 steps, ~5 commits left)", or "cherry-picking 2/7". Detection reads marker files from the worktree's gitdir (rebase-merge/, BISECT_LOG, sequencer/, CHERRY_PICK_HEAD) and resolves the rebase onto-ref to a friendly name via for-each-ref. Falls back to shorter labels when sub-fields are unreadable. Introduces isOnRealBranch so callers like the PR poller can skip both "(detached)" and in-progress-op labels without replicating the prefix list. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds a small warning triangle next to the branch label in the sidebar when the worktree is detached or showing an in-progress git operation (rebase, bisect, cherry-pick). Hovering reveals a tooltip with the full label. Co-Authored-By: Claude Opus 4.7 (1M context) <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.
Summary
(detached)branch label with what git is actually doing:rebasing 5/20 onto origin/release,bisecting (3 steps, ~5 commits left),cherry-picking 2/7, etc. Detection reads marker files under the worktree's git dir (rebase-merge/,rebase-apply/,BISECT_LOG,sequencer/,CHERRY_PICK_HEAD).TriangleAlerticon to the left of the branch label whenever a worktree is in any of these detached-like states, with a tooltip explaining what's in progress.isOnRealBranch()helper and use it inpr-poller.tsso the PR-skip check still fires correctly for the new in-progress labels (previously it only matched(detached)exactly).Test plan
npx vitest run— newgit-ops-state.test.tsdrives real git in temp repos for rebase / bisect / cherry-pick (including degraded paths)npm run typechecknpx electron-vite build🤖 Generated with Claude Code