Skip to content

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 #65852

Description

@jaimegago

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions