Conversation
Git writes a file turning into a symlink as a deletion and an addition of the same path. The pull request Code tab ordered diff blocks through a map keyed by path, so the addition overwrote the deletion and the removed contents never showed. Group blocks by path, order the paths as before, and emit every block of a path in patch order.
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a small, self-contained web bug fix that preserves existing diff ordering while retaining both blocks of file-to-symlink changes. Focused tests cover the affected representation and import ordering, with no production configuration, schema, security, or deployment impact. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: pingdotgg/t3code/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe diff ordering logic now preserves multiple blocks for the same path, reads imports from all owned blocks, and returns blocks in patch order. Tests cover symlink conversion ordering, unique render keys, and imports found in deletion lines. ChangesDiff block ordering
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
When a pull request turns a file into a symlink (or back), Git writes the change as two blocks for the same path: a deletion of the old file and an addition of the new one. The Code tab orders diff blocks with
orderDiffFiles, which indexed them in aMapkeyed by path, so the second block overwrote the first and the deleted contents never appeared in the review. #11075 made those two blocks render safely; this is the remaining place that still assumed one block per path.orderDiffFilesnow groups blocks by path, orders the paths exactly as before, and emits every block of a path in patch order. Import detection reads the lines of all blocks a path owns.Tests:
pullRequestFileOrder.logic.test.tsgains two cases. One parses a real deleted-plus-symlink patch and asserts both blocks survive with distinct render keys; the other covers imports spread across two blocks. Both fail onmain(['AGENTS.md:new', 'src/b.ts:new']instead of the deleted block first) and pass here, along with the existing 15. Targeted lint and web typecheck are clean. The change is pure ordering logic, so there is no visual diff beyond the previously missing block showing up.Implemented with Claude Code (Claude Fable 5.1).
Summary by CodeRabbit