claude-code - 💡(How to fix) Fix Desktop app: diff viewer shows stale content after Claude edits files [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#52740Fetched 2026-04-24 10:40:53
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×5commented ×1

In the Claude Code macOS desktop app, the diff viewer does not auto-refresh when Claude edits files that are already displayed in it. The viewer continues to show the pre-edit diff until it is closed and reopened.

Root Cause

In the Claude Code macOS desktop app, the diff viewer does not auto-refresh when Claude edits files that are already displayed in it. The viewer continues to show the pre-edit diff until it is closed and reopened.

Fix Action

Workaround

Closing and reopening the diff viewer (⌘⇧D twice, or dismissing and re-clicking the stats indicator) does refresh it to the correct state.

However, the workaround has annoying side-effects:

  • Files that were collapsed in the side pane become uncollapsed again. Any manual collapsing done to focus the view is lost on every refresh.
  • Sidepane width is not preserved. The layout resets each time.
RAW_BUFFERClick to expand / collapse

Summary

In the Claude Code macOS desktop app, the diff viewer does not auto-refresh when Claude edits files that are already displayed in it. The viewer continues to show the pre-edit diff until it is closed and reopened.

Environment

  • Platform: Claude Code macOS desktop app
  • Diff viewer: the rebuilt one shipped on 2026-04-14

Repro steps

  1. In a git repo with existing uncommitted changes to a file, open the diff viewer (⌘⇧D or click the +N -N stats indicator).
  2. Keep the diff viewer open.
  3. Ask Claude to edit one of the files already shown in the diff viewer.
  4. After the edit completes, look at the diff viewer.

Expected

Diff viewer reflects the post-edit state of the file.

Actual

Diff viewer still shows the pre-edit diff. Verified against the on-disk file state via shell (git diff HEAD), which is correct — the issue is purely viewer-side staleness.

Workaround

Closing and reopening the diff viewer (⌘⇧D twice, or dismissing and re-clicking the stats indicator) does refresh it to the correct state.

However, the workaround has annoying side-effects:

  • Files that were collapsed in the side pane become uncollapsed again. Any manual collapsing done to focus the view is lost on every refresh.
  • Sidepane width is not preserved. The layout resets each time.

Suggested fix

The viewer should subscribe to file-system / git state changes and auto-refresh, or at minimum offer an explicit refresh control that preserves the viewer's current sidepane collapse state and pane layout.

extent analysis

TL;DR

The diff viewer in the Claude Code macOS desktop app can be refreshed to show the latest file changes by closing and reopening it, but a more seamless solution involving auto-refresh or an explicit refresh control is needed.

Guidance

  • Investigate how the diff viewer can subscribe to file-system or git state changes to enable auto-refresh.
  • Consider adding an explicit refresh control that preserves the viewer's current sidepane collapse state and pane layout.
  • Review the current workaround's side-effects, such as loss of manual collapsing and sidepane width reset, to understand the requirements for a more robust solution.
  • Evaluate the feasibility of integrating a refresh mechanism that updates the diff viewer without requiring a full reload.

Example

No specific code snippet can be provided without more context, but the solution might involve using file system watchers or git hooks to detect changes and trigger a refresh.

Notes

The suggested fix implies that the current implementation does not account for real-time updates, and the workaround has significant usability drawbacks. A more integrated solution would improve the user experience.

Recommendation

Apply a workaround, such as implementing an explicit refresh control, as it seems to be a more immediate and feasible solution compared to a full auto-refresh mechanism, which might require more significant changes to the application's architecture.

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