Skip to content

feat(sidebar): cards that tell worktrees of one repo apart - #140

Open
xikimay wants to merge 2 commits into
mainfrom
feat/sidebar-card-readability
Open

xikimay wants to merge 2 commits into
mainfrom
feat/sidebar-card-readability

Conversation

@xikimay

@xikimay xikimay commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

TLDR: with many worktrees of one repo, each card now shows the PR title, the distinctive end of its branch, a teammate's initial, and a diff stat without the handover.

Problem

13 worktrees of one repo gave 13 look-alike cards: the title repeated the branch, end truncation cut the part that differs (tomiir/payouts-ledg…), a teammate's branch looked like your own, and every card showed +25 −251, which was only the tracked .claude-handover.md.

Solution

  • Line 1: the PR title (without the shared type(scope): prefix) while the workspace is still titled with its branch. A name set by hand stays. Card only: the rail, ⌘K and notifications keep the workspace title. The title is kept across commits until the branch changes, so it doesn't flicker.
  • Line 2: the branch without the prefix it shares with listed worktrees of the same repo (cut at / or -), middle truncation, full branch in the tooltip. #N stays on line 3.
  • A teammate's PR: their initial before the branch. Not shown for bots or your own PRs. The gh login is fetched once per host (a failure is retried after 10 min).
  • The diff stat and the diff it opens leave .claude-handover.md / .codex-handover.md out.
  • Reviews: /code-review (3 passes) and an adversarial premortem. Fixed: rail churn, flicker, bots, empty label, failure caching. Not done: using titleIsManual, because every workspace is created with a title, so it's always true.
  • Note for feat/sidebar-groups: siblings are grouped by repo here, not by group. Both branches append to WorkspaceInfo (a trivial conflict).

🤖 Generated with Claude Code

xikimay and others added 2 commits October 8, 2026 19:27
Thirteen worktrees of one repo made thirteen look-alike cards: the title
repeated the branch, the cut ate the branch's distinctive end, a
teammate's branch looked like the user's own, and every card showed the
same diff, the tracked .claude-handover.md.

- Title: the PR's title, while the workspace is still titled with its
  branch. A name set by hand differs from the branch and stays.
- Line 2: the branch without the prefix it shares with the visible
  worktrees of its repo, cut at a / or -, truncated in the middle. The
  full branch in its tooltip.
- A teammate's PR: their initial before the branch. The gh user's login
  is asked once per host; unknown, nothing is marked.
- The diff stat leaves the mission handovers out.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Reviews of the first commit:
- The PR title named WorkspaceInfo, so the rail's initials too, and
  vanished on every commit (prInfo clears on a new head). The card's
  line 1 now reads WorkspaceState.lastPullRequest, kept until the branch
  changes, and drops the type(scope): prefix every PR of a repo shares.
  The rail and other surfaces keep the workspace title.
- Bots (is_bot, app/dependabot) get no teammate mark.
- A failed gh user lookup is remembered ten minutes, with a 10 s cap,
  rather than retried at every PR refresh.
- A branch ending at its shared prefix's separator kept an empty line 2.
- Inactive workspaces, folded away, no longer shorten listed cards.
- The diff opened from the stat leaves the handovers out too.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@xikimay
xikimay marked this pull request as ready for review October 8, 2026 17:56
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.

1 participant