Repository navigation
fix(web): stop crashing the native React Compiler on ChatView - #20340
Merged
juliusmarminge merged 1 commit intoOct 17, 2026
Merged
Conversation
juliusmarminge
added this pull request to stack #20165
October 16, 2026 17:32
This was referenced Oct 16, 2026
juliusmarminge
marked this pull request as ready for review
October 16, 2026 20:59
Contributor
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a small, tested extraction of an existing pure ChatView predicate to unblock compiler analysis. The production behavior remains equivalent, with no new capability, product-default change, deployment change, or static-analysis suppression. No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
Contributor
This was referenced Oct 16, 2026
`Math.max(...)` inside ChatView's woke-visibility memo hit an internal codegen invariant in oxc's React Compiler, so it abandoned the whole component after spending ~15s on it, and never reported the real reasons ChatView can't compile. The check is now the pure isThreadWokeUnseen in ChatView.logic, with tests. The compiler now reaches ChatView's real bailouts (ref reads during render, try/finally in handlers, memo mismatches), which the next layers fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
juliusmarminge
force-pushed
the
chatview-split/compiler-unblock
branch
from
October 17, 2026 00:11
94fb2f7 to
30f3439
Compare
vedprakash2302
added a commit
to vedprakash2302/Cody
that referenced
this pull request
Oct 17, 2026
Brings in upstream through pingdotgg#20797 (144aae4). - React Compiler cleanup (pingdotgg#20340 and ~300 perf/refactor PRs): the web components Cody patches were rewritten without manual memoization. Cody's worktree base selection, scheduled task thread picker, Tailscale SSH remote open login, and WSL tailnet pairing links were reapplied onto the new code, also without manual memoization. - Adapted: ChatView now keeps the chosen worktree base per thread, like upstream's new per-thread branch and env mode overrides, instead of clearing it from effects. - AutoInstallUpdatesRow: dropped useCallback for the new no-manual-memo lint rule. - Worktree handoff MCP: the custom path option is gone, so Cody's base-ref test no longer passes one. - Git runs with safe.bareRepository=explicit (pingdotgg#20440): Cody's worktree base test now names the bare repo with --git-dir. - fetchRemoteTrackingBranch: kept Cody's non-interactive env with upstream's `--` before the remote name. - Superseded: none.
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.
Part of the ChatView split so the React Compiler can compile it.
Problem. ChatView never compiled, and the compiler never said why. The native React Compiler hit an internal codegen error on one
Math.max(...)call in the "woke from snooze" check, abandoned the whole component after spending ~15s on it, and reported only that crash. None of the earlier layers could change that on their own.Fix. The check is now
isThreadWokeUnseeninChatView.logic, with tests. With the crash gone, the compiler reaches ChatView's real problems and lists them, which the next layer fixes.try/finallyorthrowintryuseMemodeps it can't preserveStack progress
Measured with the native React Compiler (
oxc-transform-react) on each layer'sChatView.tsx. "Crashes" means it hit an internal codegen error and left ChatView uncompiled; "skips" means it reported reasons it could not compile it. Strict files must compile with no bailouts, no manual memoization and no effect-rule violations; lint andreactCompiledFiles.test.tsenforce it.🤖 Generated with Claude Code (Claude Opus 5.5)