feat: add git gutter markers, tree syncing and diff preview#41
Closed
Queaxtra wants to merge 2 commits into
Closed
feat: add git gutter markers, tree syncing and diff preview#41Queaxtra wants to merge 2 commits into
Queaxtra wants to merge 2 commits into
Conversation
Introduce per-path and per-line git change tracking and UI integration. Convert tree DirtyFiles/DirtyFolders to typed GitChangeKind, add rebaseGitPaths to normalize repo paths, and roll up folder change kinds. Add line-level diff parsing (parseGitDiffLines, parseGitHunkPreview, loadGitLineChanges) and store per-tab GitLines so the editor renders colored gutter markers and opens a diff preview on marker clicks. Sync active tab/file with the sidebar (syncActiveTreeFile, Reveal) and ensure opening via finder or CLI reveals and scrolls the tree to the file. Add HighlightVisible and baseStyleGrid to limit tokenization to the viewport. Colorize diff previews in the info modal. Update rendering helpers (gitLineMarkerRune/color, gitChangeColor) and add/adjust tests for these behaviors.
This reverts commit 07a8b01.
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
This PR introduces line-level git change tracking with colored gutter markers in the editor, enabling users to see modified, added, and deleted lines at a glance. It adds bidirectional sync between the active tab and the file tree sidebar, and automatically reveals and scrolls to files opened via the finder or CLI. Dirty file paths are normalized relative to the repo root, and folder-level change summaries are recalculated accordingly. It also adds a diff preview panel that opens when clicking a gutter marker, colorizing the output in the info modal. Additionally, tokenization and cursor highlighting are now limited to the visible viewport for better performance. Comprehensive tests are included for all new functionality.