Repository navigation
fix(chat): mark the lines a diff leaves out between hunks - #1304
Merged
Merged
Conversation
The split diff in chat (edit tool's details.patch, apply_patch) and the git diff view in the file panel dropped every @@ header, so two hunks rendered as if their lines were adjacent in the file. parseUnifiedPatch() now emits a gap row between two hunks of one file when the second header starts past where the first one ends, with the skipped count (headers with an empty side, as in --unified=0, count from the line they name). Contiguous hunks and the start of a file get no row. The apply_patch V4A input has no line numbers, so a later @@ chunk gets a gap without a count. Both diff views render it as a dim "⋯ N unchanged lines" row; the file panel merges it into its existing collapsed-lines marker, now translated. The demo copies get the same change. Fixes #1297 Co-Authored-By: Claude Opus 5.5 <[email protected]>
agegr
added a commit
to brynne8/pi-web
that referenced
this pull request
Oct 19, 2026
Resolves the conflicts with agegr#1304's hunk-gap rows: unifiedDiffLines() passes a file's gap rows through, so the file viewer's diff keeps its "N unchanged lines" markers and the one-column card draws them too, with the same row the two-column view uses (DiffGapRow). Co-Authored-By: Claude Opus 5.5 <[email protected]>
windli2018
pushed a commit
to aiti-ai/aiti-ai
that referenced
this pull request
Nov 6, 2026
The split diff in chat (edit tool's details.patch, apply_patch) and the git diff view in the file panel dropped every @@ header, so two hunks rendered as if their lines were adjacent in the file. parseUnifiedPatch() now emits a gap row between two hunks of one file when the second header starts past where the first one ends, with the skipped count (headers with an empty side, as in --unified=0, count from the line they name). Contiguous hunks and the start of a file get no row. The apply_patch V4A input has no line numbers, so a later @@ chunk gets a gap without a count. Both diff views render it as a dim "⋯ N unchanged lines" row; the file panel merges it into its existing collapsed-lines marker, now translated. The demo copies get the same change. Fixes agegr#1297 Co-authored-by: Claude Opus 5.5 <[email protected]>
windli2018
pushed a commit
to aiti-ai/aiti-ai
that referenced
this pull request
Nov 8, 2026
The split diff in chat (edit tool's details.patch, apply_patch) and the git diff view in the file panel dropped every @@ header, so two hunks rendered as if their lines were adjacent in the file. parseUnifiedPatch() now emits a gap row between two hunks of one file when the second header starts past where the first one ends, with the skipped count (headers with an empty side, as in --unified=0, count from the line they name). Contiguous hunks and the start of a file get no row. The apply_patch V4A input has no line numbers, so a later @@ chunk gets a gap without a count. Both diff views render it as a dim "⋯ N unchanged lines" row; the file panel merges it into its existing collapsed-lines marker, now translated. The demo copies get the same change. Fixes agegr#1297 Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
The split diff in chat (edit tool's details.patch, apply_patch) and the
git diff view in the file panel dropped every @@ header, so two hunks
rendered as if their lines were adjacent in the file.
parseUnifiedPatch() now emits a gap row between two hunks of one file
when the second header starts past where the first one ends, with the
skipped count (headers with an empty side, as in --unified=0, count
from the line they name). Contiguous hunks and the start of a file get
no row. The apply_patch V4A input has no line numbers, so a later @@
chunk gets a gap without a count. Both diff views render it as a dim
"⋯ N unchanged lines" row; the file panel merges it into its existing
collapsed-lines marker, now translated. The demo copies get the same
change.
Fixes #1297
Testing
node --experimental-strip-types --test lib/patch.test.mjs lib/apply-patch.test.mjs(gap counts incl. omitted counts,--unified=0empty sides, new/deleted files, multi-file patches, contiguous hunks, V4A chunks)tsc --noEmitclean,npm test2787 pass / 0 fail / 1 skipped.🤖 Generated with Claude Code