claude-code - 💡(How to fix) Fix [FEATURE] Diff uncommitted changes on Claude Code Desktop [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52179Fetched 2026-04-23 07:34:30
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1

Root Cause

This is confusing in a common workflow: after Claude makes a focused change and commits, the file count and line delta can still show dozens of unrelated files from earlier commits on the same branch. In a recent session Claude edited 10 files, but the toolbar showed 100+ files changed because the branch was 4 commits ahead of origin/main. There's no built-in way in Desktop to view the uncommitted working-tree diff, the last commit in isolation, or a per-session change set — you have to drop into the integrated terminal and run git diff HEAD / git show HEAD manually.

RAW_BUFFERClick to expand / collapse

Preflight Checklist

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

Problem Statement

The diff indicator in the Claude Code Desktop session toolbar (e.g. +136 -103) compares the current branch against the base branch on origin, not against HEAD. When a session produces one or more commits before pushing, the indicator reflects the cumulative delta across all unpushed commits rather than the changes introduced by the most recent session or the current uncommitted working tree.

This is confusing in a common workflow: after Claude makes a focused change and commits, the file count and line delta can still show dozens of unrelated files from earlier commits on the same branch. In a recent session Claude edited 10 files, but the toolbar showed 100+ files changed because the branch was 4 commits ahead of origin/main. There's no built-in way in Desktop to view the uncommitted working-tree diff, the last commit in isolation, or a per-session change set — you have to drop into the integrated terminal and run git diff HEAD / git show HEAD manually.

Proposed Solution

Add a selector to the diff viewer (next to the +/- indicator or inside the diff panel header) to choose the comparison base. Suggested options, in order of usefulness:

  • Working tree vs HEAD — uncommitted changes only (this is the gap I hit most)
  • Last commit — HEAD~1..HEAD, useful right after Claude commits
  • This session — only files Claude touched in the current session (best UX, but probably requires session-level tracking)
  • Branch vs origin — current behavior, kept as an option

Alternative Solutions

No response

Priority

High - Significant impact on productivity

Feature Category

Other

Use Case Example

I'm partway through a session where Claude has made several rounds of changes. The branch already has a couple of earlier commits from this session that I've reviewed and accepted. Claude just finished another round — say, refactoring a service and updating its callers — and I'm ready to commit that round as its own logical unit.

Before clicking Commit, I want to confirm exactly what's going in: which files are staged/dirty right now, and whether the diff matches the scope Claude described. The toolbar shows +200 -150 because it's comparing the branch against origin/main, which includes the earlier commits I've already reviewed. That number is useless for the decision I'm about to make — I don't want to re-review work I already signed off on, I want to see only what's new since the last commit.

With a "Working tree vs HEAD" view, I could click the diff indicator, see only the uncommitted files from this round, skim them to confirm nothing unintended snuck in (stray console.log, an unrelated file Claude touched, a dependency version bump I didn't ask for), and then hit Commit with confidence. Without it, I either commit blind, trust Claude's summary, or break out of the GUI into the terminal to run git diff — which defeats the purpose of having a diff viewer in the app.

This is essentially the same review step that git diff → git commit gives you in any standard Git GUI (VS Code's Source Control panel, GitKraken, Fork, etc.), and it's the one review surface currently missing from Desktop.

Additional Context

No response

extent analysis

TL;DR

To address the issue, consider adding a selector to the diff viewer to choose the comparison base, such as "Working tree vs HEAD" to show only uncommitted changes.

Guidance

  • The current diff indicator compares the current branch against the base branch on origin, which can be confusing when there are unpushed commits.
  • To improve the workflow, a selector with options like "Working tree vs HEAD", "Last commit", "This session", and "Branch vs origin" could be added to the diff viewer.
  • The "Working tree vs HEAD" option would allow users to view only the uncommitted changes, making it easier to review and commit changes with confidence.
  • Implementing this feature would require changes to the diff viewer and potentially the underlying Git integration.

Example

No code snippet is provided as the issue does not contain specific technical details about the implementation.

Notes

The proposed solution requires changes to the existing diff viewer and Git integration, which may involve significant development effort. The "This session" option may require additional session-level tracking, which could add complexity to the implementation.

Recommendation

Apply a workaround by using the integrated terminal to run git diff HEAD to view the uncommitted changes, until the proposed feature is implemented. This allows users to review their changes before committing, although it defeats the purpose of having a diff viewer in the app.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [FEATURE] Diff uncommitted changes on Claude Code Desktop [1 comments, 2 participants]