[Feature Request] Per-message diff scope in the Desktop diff panel
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 Desktop app's diff panel currently shows the cumulative diff for the entire session. In long sessions where I send multiple prompts and Claude makes edits across many turns, I lose visibility into what changed in response to my most recent message.
Today, to answer "what did Claude just change?" I have to either:
- Mentally subtract earlier changes from the session-wide diff, or
- Drop to the terminal and run
git diffagainst an ad-hoc reference point I tracked manually.
This breaks the review flow, especially when iterating on a single feature over many turns.
Proposed Solution
Add a scope toggle to the diff panel:
- Session (current behavior) — diff of all changes since session start.
- Since last message (new) — diff of only the changes Claude made in response to the most recent user message.
- Since message N (stretch) — let users pick any prior user message in the transcript as the diff baseline.
Under the hood this just means snapshotting the working-tree state at each UserPromptSubmit boundary and diffing against the chosen snapshot.
UI sketch: a small dropdown or segmented control at the top of the existing diff panel - "Scope: [Session ▾]" with options: Session / Last message / Pick message….
Alternative Solutions
- Manual
git stash createvia a hook on every prompt submit, then git diff against the stash. Works, but requires a clean git state and lives outside the Claude Code UI. - Per-prompt rewind (#43755) is related but different — it's about reverting, not reviewing.
Priority
High - Significant impact on productivity
Feature Category
Developer tools/SDK
Use Case Example
- I ask Claude to scaffold a feature; it edits 6 files. I review and accept.
- I send a follow-up: "now add tests for the error path." Claude edits 3 files.
- Today: the diff panel shows all 9 files mixed together.
- With this feature: I switch scope to _Since last_ message and immediately see only the 3 test-related changes — the exact scope of my last instruction.
Additional Context
Related issues:
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗