-
Notifications
You must be signed in to change notification settings - Fork 0
feat: inline diff hunk viewer with stage/restore actions #687
Copy link
Copy link
Open
Labels
editorCode editor relatedCode editor relatedenhancementNew feature or requestNew feature or requestpriority: highCritical priorityCritical priority
Description
Summary
Replace the current broken inline diff accept/revert buttons (which overlap line numbers in the gutter) with a proper inline diff hunk viewer, similar to Zed editor.
Current behavior
Modified lines show garbled accept/revert buttons overlapping line numbers in the gutter (e.g., line 37 displays as "87℃").
Expected behavior
Collapsed state:
- Yellow marker strip in the gutter next to modified lines — line numbers stay clean and readable
Expanded state (click on marker):
- Inline hunk expands showing old (deleted) line in red and new line in green
- Right-aligned action buttons: Stage, Restore
- Navigation arrows (↓ ↑) to jump between changes
Motivation
Current inline diff UI is unusable — buttons render on top of line numbers. A proper hunk viewer (like Zed) gives users a clear way to review, stage, and restore individual changes.
Implementation ideas
- Gutter markers: keep yellow/green/red strips, remove current accept/revert buttons
- On click: insert temporary rows below the changed line showing the diff hunk (old vs new)
- Action buttons (Stage, Restore) rendered in a toolbar row inside the expanded hunk
- Navigation arrows to cycle through all hunks in the file
- Use
git diffparsed hunks fromGitStatusProvider
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
editorCode editor relatedCode editor relatedenhancementNew feature or requestNew feature or requestpriority: highCritical priorityCritical priority