claude-code - 💡(How to fix) Fix [BUG] Web UI diff view only shows files changed within the current session, not the full branch diff vs. base [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#48823Fetched 2026-04-16 06:49:57
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1

Error Message

Error Messages/Logs

Root Cause

In the Claude Code web UI, the diff panel shows main ← claude/openspec-setup-e2jv9 but only displays files changed within the current session, not all files that differ between the branch and main. In this case, 406 files existed on the branch from a prior session, but the diff only showed the 1 file (.gitignore) added in the current session. GitHub itself correctly shows the full branch diff. Expected: the diff view should reflect the complete delta between the feature branch and the base branch. Also, it seems this may be hapenning because the original github repo was really empty (ie, created without main)

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

In the Claude Code web UI, the diff panel shows main ← claude/openspec-setup-e2jv9 but only displays files changed within the current session, not all files that differ between the branch and main. In this case, 406 files existed on the branch from a prior session, but the diff only showed the 1 file (.gitignore) added in the current session. GitHub itself correctly shows the full branch diff. Expected: the diff view should reflect the complete delta between the feature branch and the base branch. Also, it seems this may be hapenning because the original github repo was really empty (ie, created without main)

What Should Happen?

Show the files that are indeed committed.

Error Messages/Logs

Steps to Reproduce

  1. create new project in github, without main branch;
  2. create a new session in claude code web;
  3. do some action that creates files in the project;
  4. ask them to be committed;
  5. confirm they appear in github on the non-main branch;
  6. the UI will show none of the files as needing to be committed;

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

web

Platform

Anthropic API

Operating System

Other

Terminal/Shell

Other

Additional Information

No response

extent analysis

TL;DR

The issue can be resolved by ensuring the GitHub repository has a properly initialized main branch with at least one commit, as the Claude Code web UI diff panel relies on this to correctly display the full delta between the feature branch and the base branch.

Guidance

  • Verify that the GitHub repository has a main branch with at least one commit, as an empty repository or one without a main branch may cause the diff panel to malfunction.
  • Try initializing the main branch with a simple commit, such as a README file, to see if this resolves the issue.
  • Check the Claude Code web UI settings to ensure that it is configured to display the full diff between the feature branch and the base branch.
  • If the issue persists, try recreating the repository with a main branch and re-importing it into Claude Code to see if this resolves the issue.

Example

No code snippet is provided as this issue seems to be related to repository configuration rather than code.

Notes

The issue may be specific to repositories created without a main branch or with an empty main branch. Further investigation is needed to determine if this is a bug in Claude Code or an expected behavior given the repository configuration.

Recommendation

Apply workaround: Initialize the main branch with at least one commit to ensure the Claude Code web UI diff panel functions correctly. This is because the issue seems to be related to the repository configuration rather than a bug in Claude Code.

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