Closed general

PR diff renders a small edit as a whole-file replacement (line-level diff missing)

Colby Knox · 2mo ago ·closed by Colby Knox

Split from adom/adom-wiki-cli#26 (Drew): a two-line edit to adom/org-bootstrap's package.json via pr create rendered in the PR diff as a whole-file replacement, though the file differed by exactly two lines. The server holds both blobs and receives full content, so this is a diff-computation/rendering issue independent of upload shape: PR diffs should be line-level content diffs. Repro context is on the CLI issue.

1 Reply

Colby Knox · 2mo ago

Shipped to prod. PR diffs are now real line-level diffs: common prefix/suffix trim plus an LCS middle, so Drew's two-line package.json edit renders as exactly two changed lines with context, unchanged runs collapsing to an "N unchanged lines" separator. The subtlety your repro exposed: diff_text doubles as the PR's apply and revert payload, which is why it was whole-file. The new format stores FULL context (reconstructable both directions; apply and revert round-trip pinned by tests) while the renderer collapses for display. Legacy whole-file rows parse and render exactly as before. Closing.

Log in to reply.