Diff review is a local-only feature. Remote projects over SSH do not yet support diff visualization.
File Changes panel
The File Changes panel is your central hub for reviewing agent-made changes:Access the panel
Click the File Changes icon in the task toolbar, or use the keyboard shortcut:
- macOS:
Cmd+Shift+D - Windows/Linux:
Ctrl+Shift+D
View changed files
The panel shows all modified, added, and deleted files since the base branch:
- 🟢 Green: Added files
- 🟡 Yellow: Modified files
- 🔴 Red: Deleted files
- +/- counts: Insertions and deletions per file
Panel layout
FromFileChangesPanel.tsx (exact file structure):
Diff visualization
Clicking a file opens the diff viewer with syntax-highlighted changes:Diff types
- Unified diff
- Split diff
- Syntax highlighting
Default view showing changes inline:
- Lines prefixed with
-are deletions (red background) - Lines prefixed with
+are additions (green background) - Context lines (unchanged) have no prefix
Diff navigation
Jump to next change
Press
F8 or click Next Change to jump to the next modified hunk.Jump to previous change
Press
Shift+F8 or click Previous Change.Fold unchanged lines
Click the fold icon to collapse large blocks of unchanged code.
Expand context
Click
... to show more context lines above/below changes.Staging changes
Emdash supports Git’s staging area for granular control over commits:Stage files
- Stage individual files
- Stage all files
- Unstage files
In the File Changes panel, click the Stage button next to a file.Or use the context menu:
- Right-click a file → Stage changes
Stage hunks
Stage specific sections of a file:- Open the diff viewer for a file
- Hover over a change hunk
- Click Stage Hunk (or
Cmd/Ctrl+K) - Only that hunk is staged; the rest remains unstaged
Hunk staging is useful when a file has multiple unrelated changes (e.g., a feature + unrelated formatting fix).
Committing changes
Write commit message
In the File Changes panel footer:
- Enter a commit message in the text field
- Follow Conventional Commits:
feat: add dark modefix: resolve login bugchore: update dependencies
Comparison view
The comparison view shows differences between two Git references:Use cases
- Compare task branch to main: See all changes before creating a PR
- Compare two commits: Review changes between specific commits
- Compare before/after: See impact of a refactor or bug fix
Opening comparison view
Select comparison targets
In the File Changes panel header, click Compare:
- Base: Branch or commit to compare from (e.g.,
main) - Target: Branch or commit to compare to (e.g.,
emdash/feature-abc)
View full diff
The panel updates to show:
- All files changed between base and target
- Total insertions/deletions across all files
- Commit history between refs
Comparison formats
main that landed after the branch was created.
Approval workflow
Before creating a PR, Emdash encourages a review workflow:Review all changes
Open the File Changes panel and review each modified file:
- Verify the agent made intended changes
- Check for accidental modifications
- Look for security issues (hardcoded secrets, etc.)
Stage reviewed files
As you review each file, stage it to mark it as “approved”.Files left unstaged are not included in the PR.
This workflow ensures you don’t blindly merge agent-generated code without review.
Common scenarios
Scenario 1: Agent modified too many files
Problem: The agent changed files you didn’t want modified. Solution:- Review the File Changes panel
- Only stage files you want to keep
- Discard unwanted changes:
- Commit only staged files
Scenario 2: Large refactor needs multiple PRs
Problem: The agent made 50+ file changes that should be split into smaller PRs. Solution:- Stage files for PR #1 (e.g., core functionality)
- Commit with message:
feat: implement core feature - Create PR #1
- Stage files for PR #2 (e.g., tests)
- Commit:
test: add unit tests - Create PR #2 on a new branch
Scenario 3: Need to test before committing
Problem: Want to test changes before finalizing the commit. Solution:- Leave changes unstaged
- Run tests locally:
- If tests pass, stage and commit
- If tests fail, ask the agent to fix issues
Scenario 4: Reviewing merge conflicts
Problem: The base branch has new commits that conflict with task branch. Solution:- Merge
maininto task branch: - Resolve conflicts in the diff viewer
- Stage resolved files
- Commit the merge
Keyboard shortcuts
| Action | macOS | Windows/Linux |
|---|---|---|
| Open File Changes | Cmd+Shift+D | Ctrl+Shift+D |
| Stage file | Cmd+K | Ctrl+K |
| Unstage file | Cmd+Shift+K | Ctrl+Shift+K |
| Stage all | Cmd+Shift+A | Ctrl+Shift+A |
| Commit | Cmd+Enter | Ctrl+Enter |
| Next change | F8 | F8 |
| Previous change | Shift+F8 | Shift+F8 |
| Toggle split view | Cmd+\ | Ctrl+\ |
Limitations
Best practices
Review everything
Never commit agent changes without reviewing the diff. Agents make mistakes.
Stage incrementally
Stage and commit related changes together. Split unrelated changes into separate commits.
Write clear messages
Commit messages explain why changes were made, not what changed (the diff shows that).
Test before committing
Run tests on unstaged changes. Only commit if tests pass.
Troubleshooting
File Changes panel is empty
File Changes panel is empty
Symptom: No files appear in the panel despite agent making changes.Solutions:
- Check if changes are committed:
git status - Ensure you’re in the task’s worktree directory
- Refresh the panel: Close and reopen
Diff viewer shows garbled text
Diff viewer shows garbled text
Symptom: Diff contains escape codes or binary data.Solution: This is a binary file. View it outside Emdash (e.g., image viewer).
Cannot stage files
Cannot stage files
Symptom: Clicking “Stage” does nothing.Solutions:
- Check if file exists:
ls <file-path> - Ensure Git is tracking the file:
git status - Check file permissions:
ls -la <file-path>
Diff viewer is slow
Diff viewer is slow
Symptom: Viewer freezes when opening large diffs.Solutions:
- Close other Monaco editors to free memory
- View diff in external tool:
git diff <file-path> - Split large changes into smaller commits