Skip to content

Focus or solo a branch or worktree from the Commit Graph side bar and WIP context menus #5388

Description

@eamodio

Summary

Add context-menu commands to focus (scope) or solo (filter) the Commit Graph on a specific branch or worktree, directly from the graph's side bar branch/worktree panels, the graph rows, and the working tree (WIP) rows.

Impact

Users can quickly narrow the graph to a branch or worktree without opening the Focus Branch popover or hand-building a search query:

  • Focus on Branch / Focus on Worktree — on branches and worktrees in the Commit Graph side bar (and on graph rows) — scopes the graph (and minimap) to that branch and its merge base.
  • Focus on Worktree — on Commit Graph WIP rows — scopes the graph to the worktree's checked-out branch.
  • Solo Branch — on Commit Graph WIP rows — filters the graph to the worktree's checked-out branch (extends the existing Solo Branch command, already available on branch/worktree context menus).

Validation

  1. Open the Commit Graph. In the side bar Branches panel, right-click a branch → Focus on Branch scopes the graph; Solo Branch filters to it.
  2. In the side bar Worktrees panel, right-click a worktree → Focus on Worktree scopes to its branch.
  3. Right-click a branch/worktree row in the graph → same Focus/Solo entries appear (parity with Solo Branch).
  4. Right-click a WIP row (primary or a secondary worktree) → Focus on Worktree and Solo Branch target that row's worktree's branch.
  5. A detached/bare worktree correctly does not offer Focus on Worktree.

Risk

Low — additive context-menu commands that reuse the existing graph scope and ref: search-filter mechanisms; no change to default behavior.

Metadata

Metadata

Assignees

Labels

area-graphIssues or features related to the Commit Grapharea-worktreesIssues or features related to worktreesneeds-verificationRequest for verificationpending-releaseResolved but not yet released to the stable edition
No fields configured for Enhancement.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions