claude-code - 💡(How to fix) Fix Branch status badge shows diff-vs-base line count instead of branch content [1 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#51738Fetched 2026-04-22 07:54:10
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
labeled ×3
  • The branch in question is a multi-week framework migration (Vue+PrimeVue → React+shadcn). The line numbers will legitimately climb into six figures before merge. The badge becomes increasingly useless as the work progresses.
  • Related confusion: the number is the cumulative delta to base, not pending work or unpushed. I've seen multiple users read that number as "something to finish/clean up."

Root Cause

  • The branch in question is a multi-week framework migration (Vue+PrimeVue → React+shadcn). The line numbers will legitimately climb into six figures before merge. The badge becomes increasingly useless as the work progresses.
  • Related confusion: the number is the cumulative delta to base, not pending work or unpushed. I've seen multiple users read that number as "something to finish/clean up."

Code Example

main ← v2ui     +1699615345CI     View PR
RAW_BUFFERClick to expand / collapse

What I see

When I'm on a feature branch with an open PR, the status badge in the Claude Code UI shows something like:

main ← v2ui     +16996 −15345     ● CI     View PR

The large +N −M number is the cumulative line-level diff between the branch head and the PR base (main in this example).

Why it's the wrong signal

On a feature branch I'm intentionally diverging from main — that's the point of the branch. The magnitude of that divergence is almost never what I want to know. For a long-running branch (like a framework migration) the number climbs into the tens of thousands and becomes pure noise.

Worse, users read it as local state. My actual reaction was "why is 17k/15k lines sitting uncommitted?" The answer — "they're committed and pushed, the number is the PR delta" — is a surprise. The badge implies status/cleanliness but is really just line accounting against a different branch.

What I actually want the badge to tell me

In order of usefulness:

  1. Commit count and/or the latest commit subject — "20 commits · fix(ai-review): set prime-dark…"
  2. Work-stream grouping on hover/expand — let me see commits clustered by area (e.g., feat(ai-review) × 11, chore(v2ui) × 3), not just flat file diffs.
  3. Actual branch state indicators — is it in sync with upstream? ahead/behind remote? any uncommitted changes locally? These answer "where am I" far better than a diff number.

The diff numbers could stay as a secondary/tooltip fact, but explicitly labeled ("v2ui vs main: +16k/-15k"). They shouldn't dominate the badge's visual space on a branch that's supposed to be diverging.

Context

  • The branch in question is a multi-week framework migration (Vue+PrimeVue → React+shadcn). The line numbers will legitimately climb into six figures before merge. The badge becomes increasingly useless as the work progresses.
  • Related confusion: the number is the cumulative delta to base, not pending work or unpushed. I've seen multiple users read that number as "something to finish/clean up."

Suggestion

Default to commit-centric information on the branch. Reserve line-diff stats for when the user is about to ship (review/merge UI) — that's the moment the scope number is actually useful.

extent analysis

TL;DR

The status badge in the Claude Code UI should prioritize commit-centric information, such as commit count and latest commit subject, over line-level diff statistics.

Guidance

  • Consider revising the badge to display commit count and/or latest commit subject as primary information, with line-diff stats as secondary or tooltip information.
  • Implement work-stream grouping on hover/expand to provide more context about the commits, such as clustering by area (e.g., feat(ai-review) × 11, chore(v2ui) × 3).
  • Add actual branch state indicators, such as whether the branch is in sync with upstream, ahead/behind remote, or has uncommitted changes locally, to provide a clearer picture of the branch's status.
  • Reserve line-diff stats for when the user is about to ship (review/merge UI), as this is when the scope number is most useful.

Example

No code snippet is provided as the issue is more related to UI design and information prioritization.

Notes

The current implementation of the status badge may lead to confusion, especially for long-running branches with large cumulative line-level diffs. The suggested changes aim to provide more relevant and useful information to the user.

Recommendation

Apply workaround: revise the status badge to prioritize commit-centric information and provide more context about the branch's status, as this will improve the user experience and reduce confusion.

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 Branch status badge shows diff-vs-base line count instead of branch content [1 participants]