Skip to content

fix(reporter): anchor diff on aligned prefix/suffix#31

Merged
jacekradko merged 1 commit into
mainfrom
jacek/diff-prefix-suffix-anchor
May 28, 2026
Merged

fix(reporter): anchor diff on aligned prefix/suffix#31
jacekradko merged 1 commit into
mainfrom
jacek/diff-prefix-suffix-anchor

Conversation

@jacekradko

Copy link
Copy Markdown
Member

A 1-line edit inside a 500-line type alias (see clerk/javascript#8678) rendered as ~120 lines of mostly-identical content with the actual change buried in the elided middle. The reporter now trims the aligned common prefix and suffix, runs LCS on what's left when it fits in budget, and only falls back to bulk head+tail when the two sides share no structure.

// ... 498 unchanged lines elided ...
  key497: string;
  key498: string;
  key499: string;
+ added: string;
  };

Also drops two stray em-dashes (one in the truncation summary, one in a comment in api-diff.ts).

…ail per side

Previously a 1-line edit inside a 500-line type alias rendered as ~120
lines of mostly-identical content, with the actual change buried in the
elided middle. Now the reporter trims aligned common prefix and suffix,
runs LCS on the remaining middle when it fits in budget, and only falls
back to bulk head+tail when both sides share no structure.
@pkg-pr-new

pkg-pr-new Bot commented May 27, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/clerk/snapi/@clerk/snapi@31

commit: dc215ae

@github-actions

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by snapi on 2026-05-27T23:40:47.492Z

Summary

Metric Count
Packages analyzed 1
Packages with changes 0
🔴 Breaking changes 0
🟡 Non-breaking changes 0
🟢 Additions 0

No API Changes Detected

All packages have stable APIs with no detected changes.


Report generated by snapi

@jacekradko jacekradko merged commit 2479ffc into main May 28, 2026
7 checks passed
@jacekradko jacekradko deleted the jacek/diff-prefix-suffix-anchor branch May 28, 2026 01:47
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