Repository navigation
Let the React Compiler optimize six more modules - #4
Merged
Merged
Conversation
The compiler skipped seven functions across six files, each for one of two reasons it reports as a build warning. Refs written during render — `onChangeRef.current = onChange` at the top of Divider, Editor and useAutoFormat. The write now happens in an effect. Nothing reads those refs before the commit: they are only touched by pointer and key handlers, CodeMirror's update listener, and debounced work, all of which run later. `try`/`finally`, which the compiler cannot lower at all. Where the `catch` already swallowed the failure, the cleanup simply follows the `try`/`catch` (DocumentsPage's rename, useDocumentSave's write). useAutoFormat's debounce had no `catch`, so it gains one — the note above it already says a failed format is a no-op — and the early return becomes the positive branch. useRenderer's render gives up early in five places, so its body moves into a nested function; the returns stay local and the pending flag clears on every path. Behaviour is unchanged throughout.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
htmlcsspdf | a417fad | Commit Preview URL Branch Preview URL |
Aug 31 2026, 09:05 PM |
afternoon
marked this pull request as ready for review
August 31, 2026 21:07
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.
The build reported seven React Compiler bailouts across six files — each one a component or hook left unoptimized. This clears all of them. Behaviour is unchanged throughout.
Refs written during render
onChangeRef.current = onChangeat the top ofDivider,EditoranduseAutoFormat. The write moves into an effect. Nothing reads those refs before the commit: they are only touched by pointer and key handlers, CodeMirror's update listener, and debounced work, all of which run later.try/finally, which the compiler cannot lower at allDocumentsPage's rename anduseDocumentSave's write already swallowed the failure in acatch, so the cleanup simply follows thetry/catch.useAutoFormat's debounce had nocatch, so it gains one — the note above it already says a failed format is a no-op — and its early return becomes the positive branch.useRenderer's render gives up early in five places, so its body moves into a nested function. The returns stay local and the pending flag clears on every path.A note on the reported build failure
The fatal error in the deploy output was separate and is not a code problem:
bun.lockpins@better-auth/oauth-provider@1.7.2, which does export./client, and a cleanbun installbuilds fine. Deleting that package fromnode_modulesreproduces the error exactly — so the local checkout has a stale install from before the package was added.bun installfixes it.Verification
bun run build— clean, no compiler warnings remainbun run check— passes (the onebiomeinfo is pre-existing, insrc/sanitize.test.ts)bun run test:unit— 422 passedbun run test:e2e— 12 passedGenerated by Claude Code