Skip to content

feat: add git gutter markers, tree syncing and diff preview#41

Closed
Queaxtra wants to merge 2 commits into
cloudmanic:mainfrom
Queaxtra:git-gutter-markers
Closed

feat: add git gutter markers, tree syncing and diff preview#41
Queaxtra wants to merge 2 commits into
cloudmanic:mainfrom
Queaxtra:git-gutter-markers

Conversation

@Queaxtra

Copy link
Copy Markdown

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.

Queaxtra added 2 commits June 21, 2026 22:32
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.
Copilot AI review requested due to automatic review settings June 21, 2026 19:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Queaxtra Queaxtra closed this Jun 21, 2026
@Queaxtra Queaxtra deleted the git-gutter-markers branch June 21, 2026 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants