feat(windows): add Git gutter with inline diff peek for editor - #1018
Merged
Merged
Conversation
Adds visual Git change markers in the editor gutter with click-to-peek inline diff viewer for Windows. **New components:** - GitGutterController: manages gutter decorations, peek widget lifecycle, and Monaco integration - GitGutterPeekWidget: inline diff viewer with prev/next navigation, displays HEAD vs working tree - git-gutter-changes: computes line-level diff markers (added/modified/deleted) from Git status and file diff - use-git-gutter-base: React hook providing gutter data and navigation actions **Settings:** - New toggle "git.showGutterChanges" (default true) in Git Settings panel - Search index updated for "gutter" and "inline diff" keywords **Behavior:** - Green bar: added lines; Blue bar: modified lines; Red triangle: deleted lines - Click marker opens inline diff at that change - Up/Down arrows navigate between changes - Widget closes on Escape, editor blur, or file change - Peek models disposed on widget close to prevent leaks **Not included (for follow-up):** - Revert/stage actions in peek widget (depends on PR #1015 merge) - macOS implementation (Windows-only for now) Refs #681 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Integrate preview while preserving the original PR history. Fix readonly test fixtures, index-relative isolated hunk coordinates, and repository identity in untracked-file filtering. Use theme primary colors for peek borders and focus while preserving Git semantic marker colors. Add regression coverage, register the gutter tests in Windows CI, and document the three capabilities in the platform matrix with pending native verification. Validation: TypeScript check, 28 focused tests, runtime bundle immutability, Windows boundaries, test stability, and matrix gates pass. Expanded Git/editor run has 19 failures also reproduced on preview; native Windows visual verification remains pending.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds visual Git change markers in the editor line number gutter with click-to-peek inline diff viewer for Windows.
What's implemented
Core components:
GitGutterController: manages gutter decorations, peek widget lifecycle, Monaco integrationGitGutterPeekWidget: inline diff viewer showing HEAD vs working tree, with prev/next navigationgit-gutter-changes: computes line-level diff markers (added/modified/deleted) from Git status and file diffuse-git-gutter-base: React hook providing gutter data and navigation actionsVisual markers:
Interaction:
Settings:
git.showGutterChanges(default true) in Git Settings panelNot included (follow-up needed)
discardHunkAPI)Testing done
git-gutter-changesandGitGutterPeekSessionpassWhat reviewer should check
bun testverify-windows-boundaries.sh,verify-test-stability.sh, etc.Refs #681
🤖 Generated with Claude Code