🤖 perf: let React Compiler compile MessageRenderer and AssistantMessage - #4428
Merged
Merged
Conversation
ThomasK33
added this pull request to stack #4430
September 24, 2026 11:31
ThomasK33
marked this pull request as ready for review
September 24, 2026 11:56
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
ThomasK33
force-pushed
the
perf-compiler-messages
branch
from
September 24, 2026 12:42
2b07954 to
6bd012d
Compare
github-merge-queue
Bot
removed this pull request from the merge queue because a pull request earlier in the stack was removed
Sep 24, 2026
ThomasK33
force-pushed
the
perf-compiler-messages
branch
from
September 24, 2026 14:45
6bd012d to
b88dcc7
Compare
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Sep 24, 2026
ThomasK33
force-pushed
the
perf-compiler-messages
branch
from
September 24, 2026 15:28
b88dcc7 to
a973197
Compare
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
MessageRendererandAssistantMessagenow compile under React Compiler and leave the guard baseline. Both render once per transcript row.Implementation
MessageRendererreassigned its destructuredmessageprop (message = useStreamingMessageDelta(...)), which the compiler can't lower. The prop is now destructured asmessageProp, and the streamed value is a newconst message.AssistantMessage's fork handler had??insidetry/catch; it now usesrunWithCatchwith the same body and error handler.Validation
13/18 hot components compile (5 known skipped).src/browser/features/Messagesunit tests (incl.MessageRenderer.test.tsx) andtests/ui/chat/forkFromResponse.test.tspass.Measurements
Electron perf e2e (
tests/e2e/scenarios/perf.*.spec.ts,XUM_PROFILE_REACT=1), local, serial, 3 runs each, medians. Baseline ismainat 349657d; "after" is the top of this stack (#4429), because the layers were measured together. React time is the summedactualDurationof the profiled subtrees.chat-pane.transcriptchat-pane.inputchat-pane.transcriptchat-pane.inputchat-pane.transcriptCommit counts are unchanged; the gain is less work per commit. Typing in a large chat and the review hunk specs show no change beyond noise. ChatInput alone, measured before #4418 landed: New Workspace typing went from 165
CreationControlsrenders per run to 2.Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high• Cost:$4.05