Skip to content

Conversation

@amadeus
Copy link
Member

@amadeus amadeus commented Jan 6, 2026

Codex managed to find a case where the renderer would crash on specific change types and we managed to narrow it down to a case where the newLines or oldLines for a change only had a singular newLine, which would get inadvertently removed from the rendered AST and then break rendering.

Also added a test for it to ensure we don't regress this functionality in the future.

@vercel
Copy link

vercel bot commented Jan 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
pierrejs-diff-demo Ready Ready Preview Jan 6, 2026 1:40am
pierrejs-docs Ready Ready Preview Jan 6, 2026 1:40am
pierrejs-solid-diff-demo Ready Ready Preview Jan 6, 2026 1:40am

@amadeus amadeus changed the title Fix rendered AST for hunks that only additions/deletions with only a singular newline Fix rendered AST for hunks that only contain a blank newline Jan 6, 2026
@amadeus amadeus changed the title Fix rendered AST for hunks that only contain a blank newline Fix rendered AST for hunks that only contain a blank newline on additions or deletions Jan 6, 2026
@amadeus amadeus merged commit 04455de into main Jan 6, 2026
9 checks passed
@amadeus amadeus deleted the amadeus/bad-patch-crash branch January 6, 2026 01:42
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