Repository navigation
fix(review): prevent partial diffs from crashing code review - #2361
Merged
backnotprop merged 1 commit intoOct 31, 2026
Merged
Conversation
|
I have not checked but did you attempt to update to 1.6.2 before doing the patch? |
Contributor
Author
|
@paxsonsa I hadn’t tried 1.6.2 before opening this PR, but I’ve now reproduced the same error with it in Brave. With full file context enabled and full contents unavailable, the page loads but the diff doesn’t render. It still throws This was a small, one-file reproduction, so upgrading to 1.6.2 alone doesn’t fix that case. |
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.
Summary
Code review can crash with
FileDiff: loadDiffFiles is required to load full files for a partial diffwhen full file context is enabled.Plannotator loads full contents through
/api/file-contentand updates the diff itself. While that request is pending, or when contents are unavailable or rejected by the existing consistency check, the diff remains partial.Patch
@pierre/diffs1.5.2 to leave that partial diff readable when noloadDiffFilescallback is configured. Configured loaders keep their existing behavior, and editing still requires complete contents.Closes #2264.
Verification
bun run typecheck: passed.bun run check:release-version: passed.bun test scripts/dom-test-allowlist.test.ts scripts/ci-test-lanes.test.ts: 8 tests passed.bun run --cwd apps/review build: passed.bun run --cwd packages/ui smoke:packagefails withpublished core exports.0 must be a string. Reproduced with unchanged base source: the registry returns an array of exports, while the smoke script expects an object.Docs
Documented the compatibility patch and its upgrade requirements in
docs/agent-guides/project-and-development.md.