Claude Code on Desktop app (mac os): Git panel diffs against origin/main without disclosing the base or ahead/behind state — clean working tree looks full of phantom changes
Resolved 💬 2 comments Opened Jun 6, 2026 by jaimegago Closed Jun 10, 2026
Summary
The git diff / "Create PR" panel computes its +/− against origin/main but labels the base as main → working tree, and it silently sums three distinct git states into one number. A clean working tree (with one unpushed commit + some untracked files) reads as a large pile of uncommitted changes, which looks like bogus data.
Environment
- Claude Desktop app: 1.11187.1
- macOS: 15.6.1 (build 24G90)
- Surface: Claude Code git panel inside the Claude Desktop app
Repro
- On a branch where local
mainis ahead oforigin/mainby ≥1 committed-but-unpushed commit. - Have a few untracked files in the working tree.
- Open the git/diff panel.
Actual
- Banner showed
+1,067 −507with a diff panel listing files that were already committed locally. git statuswas clean of tracked changes, so the panel appeared to show phantom edits.- Breakdown of that number:
+6 −507from the unpushed commit,+1,061from untracked files — i.e. the diff base wasorigin/main, not the working tree.
Root-cause UX problems
- Undisclosed diff base. Header says
main → working tree, but the real base isorigin/main. Diffing localHEAD→working tree would be empty. Calling the remote tracking branch just "main" is ambiguous when localmainis ahead. - Local-vs-remote state is never surfaced. Ahead/behind (
main...origin/main [ahead N]) — the key fact for reading the panel — isn't shown anywhere. - Three states collapsed into one count: unpushed commits + staged + unstaged + untracked are summed under a single
+/−. - Untracked files inflate the count with no visual indication they're untracked.
Suggested fixes
- Show and allow customizing the diff base (e.g.
origin/main → working tree). - Surface ahead/behind status (
↑1 ↓0). - Break the
+/−into unpushed commits / staged / unstaged / untracked sections, likegit status. - Visually distinguish untracked files from edits.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗