Repository navigation
Description
What happened
With the Diff panel open on a thread whose working tree has 227 changed files (9 modified, 218 untracked), the user opened one of the thread's subagent threads and then clicked the pill at the top to go back to the parent thread. The window went to the "Something went wrong" screen:
T3 Code (Beta) 0.1.11
Error: Minified React error #185
at Pi (dist-dAVDK5nE.js:34:28269)
at ji (dist-dAVDK5nE.js:34:27794)
at fc (dist-dAVDK5nE.js:34:60319)
at dc (dist-dAVDK5nE.js:34:59941)
at S (DiffPanel-CBFx7eSK.js:8:8773)
at C (DiffPanel-CBFx7eSK.js:8:8985)
at Object.o [as flush] (DiffPanel-CBFx7eSK.js:1:3025)
at Object.ki [as current] (DiffPanel-CBFx7eSK.js:10:3931)
at useStableCallback-B86gD7bj.js:1:366
at a (PanelLayoutControls-BmIGsC3I.js:4:27242)
Diagnosis
I checked each frame against the minified assets shipped in the same 0.1.11 build. Mapped to the v0.1.11 source:
| Frame | Source |
|---|---|
a (PanelLayoutControls chunk) |
@pierre/diffs CodeView defineItemSharedCallback: the per-item onPostRender callback |
ki / useStableCallback |
flushCodeView in apps/web/src/components/DiffPanel.tsx (around line 722) |
o [as flush] |
createCodeViewScrollRestore().flush in apps/web/src/components/diffs/useCodeViewScrollRestore.ts, at the loadMore?.() call (line 33) |
C |
loadNextFiles in apps/web/src/components/diffs/useReviewFilePatches.ts (line 100) |
S |
requestFiles → setRequested (line 90) |
dc → Pi |
React dispatchSetState → throwIfInfiniteUpdateLoop |
How the loop works:
- Coming back to the parent thread remounts the code view.
attachsetspendingto the scroll position saved for that diff scope (fix(web): diff tab keeps its scroll position across thread switches #35090). - On each post-render,
flushseesmaxScrollTop < pending && !settledand callsloadMore(). That requests the next 4 files. - Those files' patches are still in the client cache from the last time the thread was shown (5-minute
staleTime; a refresh keeps the old value while it refetches). So they count as settled in the same render, and the viewer renders them right away. - The next post-render runs
flushagain. If the saved position is still out of reach, it callsloadMore()again, and the cycle repeats.
Each round is a synchronous update made during commit and adds only 4 files. A deep saved position in a diff of more than about 200 files (50 × 4) therefore goes past React's limit of 50 nested updates. Here, 227 files means about 56 rounds.
The server trace backs this up: from the moment of the switch, review.getDiffPreview (the per-file patch read) runs in steady groups of four, the background refetches of the cached patches.
useCodeViewScrollRestore.ts is the same on main as in v0.1.11. useReviewFilePatches.ts has only an unrelated change (mergeBase / changeType in the request), so this probably still happens on the latest nightly.
Possible fixes: request every file up to the one that reaches the saved position in a single requestFiles call, or move loadMore out of the commit phase (for example into a microtask or the next frame) so each batch is not a nested update.
Steps to reproduce
- Open a thread on a repo whose working-tree diff has more than about 200 files (untracked files count).
- Open the Diff panel, let the files load, and scroll near the bottom of the list.
- Switch to another thread (here, a subagent thread of the same project), then go straight back to the first thread within a few minutes.
- The renderer crashes with React Add drag-and-drop project reordering to the sidebar #185.
I did not run these steps again, to avoid crashing the user's session. They come from the user's report, the trace, and the source.
Version
0.1.11 (desktop app and server). The triage CLI was also 0.1.11.
Environment
- Client: T3 Code Desktop 0.1.11 on Windows 11
- Server: the desktop app's WSL backend (Ubuntu on WSL2, kernel 6.18), version 0.1.11
- Thread provider: Antigravity (gemini-4-neon); the subagent was an Astra thread
Evidence
- Renderer stack trace above, with the frame mapping checked against
client/assetsof the 0.1.11 WSL runtime - Server trace, 06:52:29–06:52:39Z: groups of 4
ws.rpc.review.getDiffPreviewspans about every 0.75 s on the affected repo, thenorchestration.subscribeThreadis interrupted at 06:52:35.8Z (the renderer reload after the crash) - Repo: 227 entries in
git status --porcelain -uall
Related issues
- fix(web): diff tab keeps its scroll position across thread switches #35090 added the scroll restore that drives this loop
- Workspace panes: opening a second image from the file tree crashes with React #185 in rightPanelStore.syncFromLayout #40158 is a different React Add drag-and-drop project reordering to the sidebar #185 (rightPanelStore.syncFromLayout); not a duplicate
Workaround
Reload the window. To avoid the crash, close the Diff panel before leaving a thread with a very large diff, or scroll it back to the top first. Committing the untracked files also shrinks the working-tree diff.
Produced by Claude Opus 5.5 (claude-opus-5-5), running in a T3 Code triage session via Claude Code.
Activity
juliusmarminge commentedon Nov 25, 2026
A fix for this was proposed in #42675, but when the reported steps were run in the real app the problem did not appear.
What was run on
ca81b7b97a, the commit before this change:Created 9 modified and 218 untracked files, each with 40 lines. Opened Thread A, opened Diff, expanded all files, and repeatedly scrolled to the bottom until patch loading and height settled. Captured the deep position, switched to Thread B, confirmed its composer was mounted, waited one second, then returned to Thread A. Checked the crash screen, captured window errors and unhandled rejections, and measured restoration. After a successful run on both commits, repeated with longer cache settling and explicit Thread B confirmation. Final result on both: savedTop 197188, restoredTop 197156, height 198096, no captured exceptions, no crash screen. Base logged only the passive-effect warning. scenarios:prove exited 1 because both sides passed.
How: Scenario runner driving the real web development app in Chromium, 1440x1000, light theme. Each commit used its own fresh database, synthetic git repository, and two Replay (dev) threads.
Could you share the exact steps, what you see, and the version and platform you are on? The pull request is closed for now; the fix is picked up again once the problem can be shown.