[FEATURE] /diff panel: show the branch diff against the base branch (merge-base with main), not only uncommitted changes

Status Open
Reported on v2.1.260
Maintainer reply None cached
Activity 0 comments · opened Sep 7, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

The new /diff panel (2.1.260) shows uncommitted changes only. In an agent workflow that is almost always empty: Claude commits as it goes, so by the time I open the panel there is nothing left to review. The panel ends up unusable for its main purpose, reviewing what the session actually changed.

What I need to review before opening a PR is the branch's diff against the base branch, especially inside a worktree where every change on the branch belongs to this piece of work.

Proposed Solution

Add a base-branch mode to the /diff panel:

  • Diff the current branch against its merge-base with the base branch (main, or the repo default via origin/HEAD). Same file list and per-file view as today, just a different baseline.
  • Make it the default when the session is in a worktree; keep "uncommitted" as the other mode. A keybinding or /diff base / /diff uncommitted to switch.
  • Later, optional filters: "changes made in this session only". Not needed for a first version.

Alternative Solutions

Running git diff main...HEAD in a second terminal, or opening lazygit. Both leave the conversation, and neither lets me select lines to comment on back into the prompt the way the panel does.

Priority

Medium - Would be very helpful

Feature Category

Interactive mode (TUI)

Use Case Example

  1. Start a session in a worktree branched from main.
  2. Claude implements a feature over several commits.
  3. Open /diff to review before creating the PR.
  4. Today: the panel is empty (everything is committed). With this: the full branch diff, file by file, with line selection for follow-up comments.

Additional Context

Desktop's diff panel already baselines against main (#23626 and #90196 discuss picking a different base there). This request is for the CLI/TUI panel. Related CLI panel bugs, not duplicates: #89395 (panel reads the launch dir instead of the worktree), #92101, #92516.

View original on GitHub ↗