Skip to content

Fix Claude structured patch diffs to preserve real line numbers#164

Merged
SDSLeon merged 2 commits into
masterfrom
lightcode/swift-eagle-ec029808
Jun 13, 2026
Merged

Fix Claude structured patch diffs to preserve real line numbers#164
SDSLeon merged 2 commits into
masterfrom
lightcode/swift-eagle-ec029808

Conversation

@SDSLeon

@SDSLeon SDSLeon commented Jun 13, 2026

Copy link
Copy Markdown
Owner
  • Preserve Claude structuredPatch hunk ranges end-to-end so edit, multi-edit, and write results render real file line numbers instead of synthetic ranges.
  • Thread structured diff metadata through the Claude mapper state and payloads so the renderer can use the native patch context already present in tool results.
  • Add shared unified-diff helpers to keep header and hunk formatting consistent across generated diffs.
  • Cover both supervisor and renderer paths with tests to prevent regressions in line-number rendering.

- thread Claude `structuredPatch` metadata through file change payloads
- reuse shared unified-diff helpers for real hunk headers
- add mapper and renderer tests for Edit and MultiEdit patch rendering
@vercel

vercel Bot commented Jun 13, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
lightcode-landing Skipped Skipped Jun 13, 2026 7:31pm

@SDSLeon SDSLeon merged commit 87d9ba3 into master Jun 13, 2026
6 checks passed
@SDSLeon SDSLeon deleted the lightcode/swift-eagle-ec029808 branch June 13, 2026 19:31
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