fix: auto-expand diff spacers when comments exist on folded lines#333
Merged
tomasz-tomczyk merged 3 commits intomainfrom Apr 23, 2026
Merged
fix: auto-expand diff spacers when comments exist on folded lines#333tomasz-tomczyk merged 3 commits intomainfrom
tomasz-tomczyk merged 3 commits intomainfrom
Conversation
When a comment targets a line inside a folded spacer gap between diff hunks, the spacer is now automatically expanded during rendering so the comment appears at its correct inline position. Previously, such comments fell through to the "outdated" section at the bottom of the diff. Closes #317 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds a server.go file with multi-hunk diff to the word-diff instance (instance 2) and seeds a comment on line 15 (inside a spacer gap) with an agent reply. Demonstrates the #317 fix — the spacer auto-expands to show the comment at its correct position. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The word-diff fixture uses uncommitted working-tree changes (not a feature branch). Committing server.go v2 meant crit saw no diff for it. Now server.go v2 is an uncommitted change like the other files. Co-Authored-By: Claude Opus 4.6 (1M context) <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
expandHunksForComments(file)called from bothrenderDiffUnifiedandrenderDiffSplitbefore the hunk rendering loopTest plan
make test-diff(instance 2, server.go line 59)Closes #317
🤖 Generated with Claude Code