Accessing Git Diff
The Git diff viewer is available from the sidebar:- Click the Diff button in the left sidebar
- The diff view opens showing all uncommitted changes in your workspace
Diff Viewer Interface
Header
The top of the diff view shows:- Page title: “Git Diff”
- Refresh button: Manually reload changes at any time
File List
All changed files are displayed in a scrollable list. Each file shows:- File name and path
- Addition and deletion indicators
- Full unified diff view
Reading Diffs
The diff viewer uses a unified diff format with visual enhancements:Diff Indicators
Changes are shown with bar indicators on the side:- Green bars - Added lines
- Red bars - Removed lines
- Yellow bars - Modified sections
Diff Styles
- Unified View
- Color Coding
All changes are shown in a single column with:
-prefix for deletions in red+prefix for additions in green- Context lines in standard text color
File Change Details
For each modified file, you can see:- File path - Full path from repository root
- Change type - Modified, added, or deleted
- Line numbers - Both old and new line numbers
- Change hunks - Grouped sections of related changes
The diff viewer automatically parses standard Git patch format, so it works seamlessly with your existing Git workflow.
Real-Time Updates
The diff view integrates with your active workspace:Auto-Detection
Changes are automatically detected when:- The AI agent modifies files
- You manually edit files in your project
- External tools make changes
Manual Refresh
You can force a refresh at any time:- Click the Refresh button in the header
- The diff re-fetches all changes from Git
- The file count badge updates accordingly
Empty State
When there are no changes to display:- A message shows “No changes detected”
- A Refresh button is available to check again
- The empty state is centered for clarity
Error Handling
If the diff viewer encounters issues:Loading Errors
Loading Errors
- Error message displays in red
- Includes the specific error reason
- Retry button to attempt loading again
Parsing Errors
Parsing Errors
- Invalid diff formats are gracefully handled
- Falls back to empty state if parsing fails
- No crashes or broken UI
Git Not Available
Git Not Available
- Clear message if Git is not initialized
- Instructions for initializing Git in your project
Common Use Cases
Reviewing AI Changes
After asking the AI to modify your code:- Navigate to the Diff view
- Review all changed files
- Verify the changes match your expectations
- Commit changes if satisfied
Tracking Work Progress
Use the file count badge to:- Monitor how many files the AI has modified
- Gauge the scope of changes before reviewing
- Know when the AI has completed a task
Before Committing
Always review diffs before committing:- Open the Diff view
- Check each changed file
- Look for unexpected modifications
- Return to the chat to ask for adjustments if needed
Keyboard Navigation
The diff viewer supports scrolling:- Mouse wheel - Scroll through files
- Touch gestures - Swipe to scroll on mobile
- Page Up/Down - Quick navigation on desktop
Mobile Experience
On mobile devices, the diff viewer adapts:- Full-width display for maximum readability
- Touch-optimized refresh button
- Smooth scrolling through long diffs
- Horizontal scrolling for long lines
Performance
The diff viewer is optimized for large changesets:- Efficiently parses multi-file diffs
- Smooth scrolling even with hundreds of changes
- Lazy rendering for very large files
- Minimal memory footprint
Diff data is cached and only refetched when you click Refresh or when significant changes are detected.