Desktop app: diff viewer shows stale content after Claude edits files
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
- In a git repo with existing uncommitted changes to a file, open the diff viewer (⌘⇧D or click the
+N -Nstats indicator). - Keep the diff viewer open.
- Ask Claude to edit one of the files already shown in the diff viewer.
- 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.
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗