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
- 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.
- In the side bar Worktrees panel, right-click a worktree → Focus on Worktree scopes to its branch.
- Right-click a branch/worktree row in the graph → same Focus/Solo entries appear (parity with Solo Branch).
- Right-click a WIP row (primary or a secondary worktree) → Focus on Worktree and Solo Branch target that row's worktree's branch.
- 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.
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:
Validation
Risk
Low — additive context-menu commands that reuse the existing graph scope and
ref:search-filter mechanisms; no change to default behavior.