Skip to content

feat(windows): add Git gutter with inline diff peek for editor - #1018

Merged
1lck merged 2 commits into
previewfrom
feat/681-gutter-change-peek
Oct 1, 2026
Merged

1lck merged 2 commits into
previewfrom
feat/681-gutter-change-peek

Conversation

@1lck

@1lck 1lck commented Oct 1, 2026

Copy link
Copy Markdown
Owner

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 integration
  • GitGutterPeekWidget: inline diff viewer showing HEAD vs working tree, with prev/next navigation
  • 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

Visual markers:

  • Green bar: added lines
  • Blue bar: modified lines
  • Red triangle: deleted lines

Interaction:

  • Click marker → opens inline diff at that change
  • Up/Down arrows navigate between changes
  • Escape / editor blur / file change → closes widget
  • Peek models disposed on close (no leaks)

Settings:

  • New toggle git.showGutterChanges (default true) in Git Settings panel
  • Search index updated for "gutter" and "inline diff"

Not included (follow-up needed)

  • Revert/stage actions in peek widget: blocked on #1015 merge (adds discardHunk API)
  • Full test coverage: agent ran out of gateway retries before completing component-level tests and browser validation
  • macOS implementation: Windows-only for now
  • Platform feature matrix update: needs testing on real Windows machine first

Testing done

  • Unit tests for git-gutter-changes and GitGutterPeekSession pass
  • Type check passes
  • Agent was interrupted by gateway timeouts before completing:
    • Full Vite test suite run
    • Browser visual validation (dev server and harness files were prepared but not executed)
    • Repository verification scripts

What reviewer should check

  1. Run full test suite: bun test
  2. Run repository checks: verify-windows-boundaries.sh, verify-test-stability.sh, etc.
  3. Test on Windows machine: open a Git-tracked file with changes, verify markers appear, click to peek
  4. Verify peek widget keyboard navigation (Up/Down arrows between changes)
  5. Check that peek models are disposed (no Monaco model leaks)

Refs #681

🤖 Generated with Claude Code

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>
@ghfind-review ghfind-review Bot added the review: high ghfind author score; see https://ghfind.com label Oct 1, 2026
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.
@1lck
1lck merged commit 4773688 into preview Oct 1, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review: high ghfind author score; see https://ghfind.com

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant