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

  1. On a branch where local main is ahead of origin/main by ≥1 committed-but-unpushed commit.
  2. Have a few untracked files in the working tree.
  3. Open the git/diff panel.

Actual

  • Banner showed +1,067 −507 with a diff panel listing files that were already committed locally.
  • git status was clean of tracked changes, so the panel appeared to show phantom edits.
  • Breakdown of that number: +6 −507 from the unpushed commit, +1,061 from untracked files — i.e. the diff base was origin/main, not the working tree.

Root-cause UX problems

  1. Undisclosed diff base. Header says main → working tree, but the real base is origin/main. Diffing local HEAD→working tree would be empty. Calling the remote tracking branch just "main" is ambiguous when local main is ahead.
  2. 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.
  3. Three states collapsed into one count: unpushed commits + staged + unstaged + untracked are summed under a single +/−.
  4. 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, like git status.
  • Visually distinguish untracked files from edits.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗