Skip to content

Show in-progress git op in detached worktree label - #63

Merged
frenchie4111 merged 2 commits into
ness-dev:mainfrom
big-guy:detached-state-detail
May 23, 2026
Merged

Show in-progress git op in detached worktree label#63
frenchie4111 merged 2 commits into
ness-dev:mainfrom
big-guy:detached-state-detail

Conversation

@big-guy

@big-guy big-guy commented May 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Replace generic (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).
  • Add a small amber TriangleAlert icon 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.
  • Introduce isOnRealBranch() helper and use it in pr-poller.ts so the PR-skip check still fires correctly for the new in-progress labels (previously it only matched (detached) exactly).

Test plan

  • npx vitest run — new git-ops-state.test.ts drives real git in temp repos for rebase / bisect / cherry-pick (including degraded paths)
  • npm run typecheck
  • npx electron-vite build
  • Manual: rebase, bisect, and cherry-pick a worktree and confirm the sidebar label + triangle icon update

🤖 Generated with Claude Code

big-guy and others added 2 commits May 22, 2026 10:35
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>
@frenchie4111
frenchie4111 merged commit cfa0d80 into ness-dev:main May 23, 2026
@big-guy
big-guy deleted the detached-state-detail branch May 23, 2026 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants