Diff Tracker

Diff Tracker is a VS Code extension that records file changes and provides three review modes:
- Inline readonly diff document
- VS Code side-by-side diff
- Cursor-like WebView diff with floating Undo/Keep actions
Screenshots
💥 New in 0.4.0. Cursor like floating accept/reject buttons!
| Cursor like WebView Unified |
Cursor like WebView Split |
 |
 |
| Editor Inline View |
Editor Inline View (hover effect) |
 |
 |
| Inline View 2 |
Side-by-side diff |
 |
 |
Features
- Activity Bar Change Recording tree with file grouping
- Recording mode (start/stop) with workspace baseline snapshot
- Workspace-wide file watching (including external file changes)
- Inline readonly diff view with line and word-level highlights
- Side-by-side diff (
Original ↔ Current) via built-in VS Code diff
- Cursor-like WebView diff (Split/Unified, Wrap, Expand, Keep All, Reject All)
- Block-wise actions: Undo/Keep per change block
- File-level actions: Revert file, Revert all files, Keep all changes in file
- Deleted-line badge, CodeLens actions, and hover details
- Settings panel + Watch Ignore editor (
.gitignore style patterns)
Usage
- Open Diff Tracker from the Activity Bar.
- Click Start Recording.
- Edit files in your workspace.
- In Change Recording, click a changed file to open inline diff.
- Use context menu or editor title buttons to open:
- Inline Diff (active file)
- Side-by-Side Diff
- WebView Diff
- In WebView Diff, use block-level Undo/Keep or file-level Keep All/Reject All.
- Use Revert File / Revert All Changes as needed.
- Stop recording when done.
How It Works
When recording starts, Diff Tracker:
- Captures baseline snapshots for workspace files (batched)
- Tracks file/document changes and rebuilds line/block diffs
- Serves virtual inline/original documents
- Keeps tree, decorations, CodeLens, and WebView in sync
Installation
From VSIX
- Download the .vsix file
- Open VS Code
- Open Extensions (Cmd+Shift+X)
- Click ... -> Install from VSIX...
- Select the downloaded .vsix
Development
- Clone the repository
- Run npm install
- Run npm run compile
- Press F5 to launch the Extension Development Host
Requirements
Extension Settings
This extension provides the following settings:
| Setting |
Default |
Description |
diffTracker.showDeletedLinesBadge |
true |
Show a badge indicating deleted lines |
diffTracker.showCodeLens |
true |
Show CodeLens actions (Revert/Keep) above change blocks |
diffTracker.highlightAddedLines |
true |
Highlight added lines with green background |
diffTracker.highlightModifiedLines |
true |
Highlight modified lines with blue background |
diffTracker.highlightWordChanges |
true |
Highlight word-level changes within modified lines |
diffTracker.watchExclude |
[] |
Additional watch ignore patterns (.gitignore style) |
You can toggle display/highlight settings in the sidebar Settings panel, and edit watch ignore patterns via Edit Watch Ignores.
Known Issues
- Pure line-ending-style changes (CRLF/LF only) are currently treated as no logical content change.
- If you find a reproducible diff/render edge case, please open an issue with a minimal file sample.
Release Notes
0.1.0
- Activity Bar entry
- Recording mode for change tracking
- Inline diff highlighting
- Side-by-side diff
- Multi-file tracking with timestamps
- Revert file and revert all
- Clear diffs
0.2.0
- Change from LCS-based diff to Patience Diff algorithm for more intuitive diff display
0.3.0
- Add Partial Revert/Keep buttons, just like cursor
- Add go-to-original-file button in left panel
0.3.1
- Add file-level "Revert All" / "Keep All" buttons (CodeLens at file top)
- Add settings panel in sidebar to toggle display options
- Fix block-wise keep/revert affecting all blocks instead of just one
- Fix hover showing "unknown" for deleted empty lines
0.3.2
0.3.3
- Add word-level diff highlighting for modified lines
- Add "Highlight Word Changes" setting to toggle word-level highlighting
0.4.0
- Cursor-like WebView diff: floating Undo/Keep, unified view default, wrap/expand, and Keep All/Reject All in the toolbar
- Offline WebView rendering (bundled @pierre/diffs)
- Workspace-wide file watching (no longer limited to open files)
- New Watch Ignore panel with
.gitignore support
- Faster tracking in large workspaces (debounced changes + optimized watchers)
- Smoother recording start on big repos (baseline builds in batches, large files skipped)
0.4.1
- Refactor diff pipeline to use a unified logical-line model
- Stabilize block grouping for large paste/delete and EOF scenarios
- Fix WebView empty-file rendering fallback that could hide block actions after full deletion
- Unify inline virtual URI mapping and refresh flow to prevent stale inline readonly content
- Improve mixed newline handling (LF/CRLF/CR) in Keep/Revert block operations
0.5.0
- Add Explorer file context action for Diff Tracker while recording, with the final label: Open with Diff Tracker
- Add configurable default open mode for changed files (WebView / Inline / Side-by-side / Original / Split Original+WebView)
- Add
Open split view mode (left original file + right WebView diff)
- Add global recording toggle shortcut:
Shift+Alt+D
- Improve changes tree to workspace-relative nested directory grouping
- Use VS Code native file icons in the changes tree
- Show changed-file count badge on the Diff Tracker activity icon
- Add and streamline global file actions in changes view workflows (Keep All / Revert All)
- Add
Clear Diffs baseline reset to current workspace state
- lots of optimizations & fixes
0.5.1
- Improve recording controls in Change Recording with inline start entry, starting status, and title start/stop actions
0.5.2
- Fix watch ignore rules not refreshing in some recording states
- Reuse snapshot filtering in watcher updates to avoid tracking binary/oversized files
- Clear pre-seeded empty baseline for non-trackable created files in watcher flow
License
MIT
| |