Skip to content

feat(diff): add filler virtual lines for PR review pane alignment#112

Merged
actionshrimp merged 1 commit intomainfrom
feature/review-filler-virt-lines
Feb 23, 2026
Merged

feat(diff): add filler virtual lines for PR review pane alignment#112
actionshrimp merged 1 commit intomainfrom
feature/review-filler-virt-lines

Conversation

@actionshrimp
Copy link
Owner

Summary

  • When PR review threads are displayed as virt_lines on one side of the side-by-side diff viewer, the opposite buffer drifts out of visual sync
  • Adds matching filler virt_lines (using new GitladReviewFiller highlight group) on the side with fewer lines to keep panes aligned
  • Works for both review thread overlays (collapsed and expanded) and pending comments

Test plan

  • make test-file FILE=tests/unit/test_diff_review.lua — 37 tests pass (7 new)
  • make test — all 1536 unit + 622 e2e tests pass
  • make lint — clean

When review threads are rendered as virt_lines on one side of the
side-by-side diff viewer, the opposite buffer drifts out of sync.
Track virt_line counts per side per buffer line and add matching
filler lines (GitladReviewFiller) on the side with fewer to maintain
visual alignment. Works for both review threads and pending comments.
GitladReviewResolved = { link = "Comment" },
GitladReviewOutdated = { link = "DiagnosticWarn" },
GitladReviewPending = { link = "DiagnosticHint" },
GitladReviewFiller = { link = "GitladDiffFiller" },
Copy link
Owner Author

Choose a reason for hiding this comment

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

Now this i like!

@actionshrimp actionshrimp merged commit 657bac6 into main Feb 23, 2026
3 checks passed
@actionshrimp actionshrimp deleted the feature/review-filler-virt-lines branch February 23, 2026 21:27
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.

1 participant