feat: full-file diff view, two-pane diff tab, and git sidebar enhancements#232
Open
yashas-salankimatt wants to merge 16 commits intomarcus:mainfrom
Open
feat: full-file diff view, two-pane diff tab, and git sidebar enhancements#232yashas-salankimatt wants to merge 16 commits intomarcus:mainfrom
yashas-salankimatt wants to merge 16 commits intomarcus:mainfrom
Conversation
Add a third diff view mode (full-file side-by-side) alongside unified and split views. This shows the complete old and new file content side-by-side with change highlighting, similar to VS Code's diff editor. - Add BuildFullFileDiff() to construct full-file diffs from old/new content - Add RenderFullFileSideBySide() for rendering full-file diffs - Add NextChange()/PrevChange() for navigating between changes (n/N keys) - Add loadFullFileDiff() async loader for both inline and full-screen views - Update scroll clamping, view rendering, and breadcrumb for the new mode - Cycle through modes: unified → split → full-file (v/V keys) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the single scrollable diff view with a two-pane hierarchical layout
matching the git plugin's interaction model:
- Left pane: file list with status icons (+/-) and commits section
- Right pane: per-file diff viewer with unified/split/full-file modes
- j/k navigate files, l/enter drills into diff, h/esc goes back
- Commit hover shows file list preview in right pane
- Commit drill-down: left=file list with commit info, right=file diff
- v/V cycles view modes, n/N jumps between changes, {/} jumps files
- Default split ~25% file list, ~75% diff viewer
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Include untracked files in the workspace diff view by generating synthetic new-file diffs. Uses git ls-files --others --exclude-standard to discover untracked files, then creates diff output via gitstatus.GetNewFileDiff() so they appear alongside tracked file changes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Allow drag-to-resize the file list vs diff viewer split in the diff tab. The width is saved to state.json and restored across sessions. - Add DiffTabFileListWidth to state with getter/setter - Register mouse hit region on the diff tab divider - Handle drag events with pixel-based width updates and clamping - Track lastDragRegion to correctly dispatch persistence on drag end (mouse handler clears drag state before the DragEnd event) - Compute effective width at drag start when no saved preference exists Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When the diff tab content width is below 120 columns, switch from the two-pane side-by-side layout to a single-pane hierarchical view. This makes the diff tab usable in vertical/narrow terminal configurations. Navigation works the same way — l/enter drills down one level, h/esc goes back up — but only one level is shown at a time using the full available width. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a VS Code-style minimap alongside the full-file diff viewer showing diff density with colored markers and a viewport position indicator. Known issue: viewport indicator can desync from actual scroll position. - Half-block Unicode encoding (▀) for 2× vertical resolution - Color-coded diff markers (green=add, red=remove, gray=context) - Bright/dim variants for inside/outside viewport - Purple rail (▐) showing current viewport position - Mouse click on minimap to jump to file location - Scroll clamping on j/k to prevent scrolling past EOF - Works in full-screen modal, two-pane, and sidebar diff views - Skipped when line wrapping is enabled (line count mismatch) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ormulas G key, ctrl+d, and full-file-diff-loaded handlers used (height-2) for maxScroll while clampDiffScroll used (height-4), allowing scroll 2 lines past the true maximum. This caused the minimap viewport indicator to show an incorrect position. Replace all inline maxScroll calculations with calls to the centralized clamp functions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…e scroll clamping - Replace ▐ rail with half-block characters (▀/▄/█) that encode per-slot viewport membership, eliminating the visual desync between the rail and the bright/dim boundary of the map cells - Replace all remaining inline maxScroll calculations in mouse.go and plugin.go with calls to clampDiffScroll()/clampDiffPaneScroll(), fixing height-6 vs height-4 inconsistency between mouse and keyboard - Add debug logging via slog.Debug for minimap diagnostics (--debug flag) - Add tests for viewport > file, negative totalLines, half-block rail boundary, and viewEnd exceeding totalLines Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…to full width Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
Contributor
Author
9 tasks
Contributor
Author
|
These three PRs were developed together and should be merged in order:
Together they represent a large bump to sidecar's diff viewing, agent output inspection, and workspace management capabilities. |
4 tasks
…ommitStatusHeader) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Owner
|
Hey @yashas-salankimatt! Starling here (AI assistant on the project). 👋 Three coordinated PRs in one morning — this is a serious drop. Let me summarize what landed:
Your merge order note is noted: #232 → #233 → #234. I've flagged this to Marcus for review. The screenshots look great — the VS Code-style diff view especially. Test plan is thorough. The minimap is a nice touch. One heads-up: these are large diffs. Review may take a bit of time, but they're on Marcus's radar. ✦ |
…iles in workspace stats - GetCommitDetail now runs --name-status alongside --numstat to get actual file statuses (Added, Deleted, Renamed, etc.) instead of defaulting everything to Modified - Workspace getDiffStats now counts lines in untracked files as additions, matching what git would show if they were staged Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
394e314 to
e864ec5
Compare
…r diff from commit preview - Fix h/l scrolling in full-screen diff view: clampDiffHorizScroll was using side-by-side parsedDiff metrics in full-file mode, clamping the offset back to 0 immediately. Now skips side-by-side clamp in full-file mode. - Same fix for inline diff pane clampDiffPaneHorizScroll. - Add l/right as aliases for enter/d in commit preview file list to enter the diff view, matching workspace plugin navigation conventions. - h at offset 0 in inline diff pane now returns focus to sidebar. - h at offset 0 in full-screen diff exits back to previous view. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.




Summary
Key Changes
Git Plugin
kat topmost file to expand full message, scroll with j/k, collapse with escWorkspace Plugin
Test plan
kat topmost commit file to expand body, scroll with j/k, collapse with esc/j🤖 Generated with Claude Code