[FEATURE] Show diff preview before applying file edits (like VS Code diff tab)
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
When Claude Code Desktop edits a file, the change is applied immediately and silently. The user only sees what changed after the fact, inside a small tool-call summary that is easy to miss. There is no moment to review and reject the change before it lands in the file. Working on production code without a pre-edit review step is risky — a single misunderstood instruction can silently corrupt a file.
Proposed Solution
Before every file edit (Edit or Write), Claude should render a side-by-side diff in the chat panel — old content on the left with removed lines highlighted red, new content on the right with added lines highlighted green (same as VS Code's diff tab). Claude then waits for explicit user approval before applying the change. No file is touched until the user confirms.
Alternative Solutions
A simpler version: show an inline before/after code block in the chat (not side-by-side, just two fenced blocks labelled BEFORE and AFTER) and still wait for approval. Less visual but achieves the same safety gate. Even this would be a significant improvement over the current silent-apply behaviour.
High Priority— this is a daily pain point for anyone using Claude Code Desktop on a production codebase. The VS Code extension already does this, so the expected behaviour is established. The Desktop app feels unsafe by comparison.
Priority
Critical - Blocking my work
Feature Category
File operations
Use Case Example
User asks Claude to fix a bug in TestItem.vue. Claude identifies the fix. Currently: it edits the file immediately. With this feature: Claude opens a diff showing exactly which 4 lines will change, user reviews, says "go ahead", then the edit is applied. If the diff reveals Claude misunderstood the scope, user says "no, only change the template not the script" — no damage done.
Additional Context
The VS Code extension already implements this exact UX via a native diff tab. Desktop should have feature parity. Users who trusted the extension and switched to Desktop are surprised and frustrated that this safety net is gone.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗