GeezerVison is showing github.com — fix(web): keep both halves of a file-to-symlink change in the PR diff by Mnigos · Pull Request #12581 · pingdotgg/t3code
Conversation
Mnigos
commented
Sep 19, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
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 a Map keyed 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.
orderDiffFiles now 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.ts gains 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 on main (['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.
Evidence
Captured in the web client on macOS 15.7.5 (Playwright, headless Chromium 1400×900) with a temporary draft PR on my fork that replaces LICENSE with a symlink to README.md, viewed in the PR panel's Code tab (All commits, stacked layout, hunks expanded, light appearance). Before is today's main (5cc99e1), after is this branch (413da8b); both panels are cropped identically.
Observed: on main the Code tab lists one block for LICENSE, the added one-line symlink, and the 21 deleted lines never appear. On this branch the deleted LICENSE block renders first, followed by the added symlink block, matching gh pr diff. The tab's counter reads "2 files" for the two blocks of that path while the PR header reads "1 file"; that counter counts diff blocks and is unchanged by this PR. Desktop and mobile clients were not exercised; the ordering logic is shared.
Implemented with Claude Code (Claude Fable 5.1).
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Approvability
Verdict: Approved at 413da8b
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.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
 
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID: 6bd9b50c-24f9-443c-99da-d49dcf42297a
📥 Commits
Reviewing files that changed from the base of the PR and between dfbb11b and 413da8b.
📒 Files selected for processing (2)
apps/web/src/components/pullRequest/pullRequestFileOrder.logic.test.ts
apps/web/src/components/pullRequest/pullRequestFileOrder.logic.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
Walkthrough
The 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.
Changes
Diff block ordering
| Layer / File(s) |
Summary |
Group and expand repeated blocks apps/web/src/components/pullRequest/pullRequestFileOrder.logic.ts |
orderDiffFiles groups all blocks for each path, collects imports from additions and deletions across those blocks, and expands ordered paths back into patch-order blocks. |
Validate repeated path behavior apps/web/src/components/pullRequest/pullRequestFileOrder.logic.test.ts |
Tests cover symlink conversion blocks, distinct buildFileDiffRenderKey values, and dependency ordering from imports in deletion lines. |
Priority: ⬇️ Low
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix
Suggested reviewers: juliusmarminge
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name |
Status |
Explanation |
| Title check |
✅ Passed |
The title clearly and concisely describes the main fix: preserving both parts of a file-to-symlink change in the pull request diff. |
| Description check |
✅ Passed |
The description explains what changed, why it changed, the tests added, validation results, and the UI impact. It does not use the template headings or include the checklist, but the required informat… |
| Docstring Coverage |
✅ Passed |
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. |
| Linked Issues check |
✅ Passed |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
✅ Passed |
Check skipped because no linked issues were found for this pull request. |
✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Note This comment is posted by Julius' dot
Closing for missing UI verification. The tests show that both diff blocks survive ordering, but the PR supplies no before/after capture of the Code tab displaying the previously missing deletion. Add those screenshots and the observed client result, then request reconsideration.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Note 🤖 Claude Fable 5.1 on behalf of Mnigos
Added the missing verification to the description: before/after screenshots of the Code tab on macOS (headless Chromium 1400×900) using a draft PR on my fork that replaces LICENSE with a symlink. On main only the added symlink block is listed; on this branch the deleted LICENSE block renders first, followed by the symlink block, matching gh pr diff. The description also states the observed counter behavior and what was not exercised. The branch itself is unchanged (413da8b). Requesting reconsideration.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:S
10-29 changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|