7 Commits
Author SHA1 Message Date
OrcaWinandOrcaWin 3d28b6fbf8 test: remove low-value Codex lifecycle and compiler examples (#40588)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-09 18:25:15 -08:00
Brennan Benson 7777f352d8 build: fail the React Compiler ratchet on stale uncompiled-list paths (#40198)
* build: fail the React Compiler ratchet on stale uncompiled-list paths

- A listed path that no longer names a renderer source (a rename or split) fails the ratchet, so the file can't silently start compiling.
- The build and the ratchet read the lists through one parser that drops trailing notes, resolved from the repo root rather than the current directory.

* build: resolve uncompiled lists from import.meta.url and check listed paths on disk

- electron-vite's config bundle rewrites import.meta.url per file but not import.meta.dirname, so the repo root came out wrong and desktop builds failed with ENOENT.
- A listed path is stale only if no renderer file exists there; the scan's test-name filter no longer flags shipped files like notification-test-delivery.ts.

* build: require uncompiled-list entries to name the exact file the build matches

A ../ segment, a directory or a different letter case passed the existence check, but the build's exclusion matches only the exact path, so the file still compiled.

* build: reject backslashes in uncompiled-list entries

On Windows path.join turns a backslash into a separator, so the entry passed the check while the build's forward-slash match missed it.
2026-11-09 17:53:19 -08:00
OrcaWin a2d490700b build: enable React Compiler for the renderer and web build (#39811) 2026-11-08 19:41:47 -08:00
OrcaWinandOrcaWin bb368c3ae6 chore(ratchet): flag discarded subscriptions and store snapshots React Compiler would cache (#39630)
Two new React Compiler compat hazards:
- discarded-subscription: a useSyncExternalStore call whose result is thrown
  away, so the reads after it get cached on unrelated inputs.
- store-read-in-memo-block: a render-level getState() that the compiler places
  in a cache-guarded block. Reads inside the source's own useMemo or callbacks
  keep their written deps and are skipped.

The compiled output is parsed once for hook and store reads. Current sites are
grandfathered in the hazard baseline.

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-07 16:45:10 -08:00
OrcaWinandOrcaWin f6874cc512 refactor(renderer): make memo invalidators and layout flushes compiler-safe (#39414)
React Compiler drops bare `void x;` reads, narrows callback deps to the fields
read, and oxc 0.152 emits `a[q.head++]` as a prefix update. Rewrite those
sites so they behave the same with the compiler on, and identically to today
with it off:

- `void tick` memo invalidators -> `recomputeOn([tick], () => ...)`
- `void el.offsetWidth` transition resets -> `forceLayoutReflow(el)`
- pty termination queue reads, then advances, the head index
- host agent preference subscription takes the whole subscription object

Prunes the compiler-compat hazard baseline from 40 to 2 entries.

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-07 02:37:53 -08:00
OrcaWinandOrcaWin a89cdae5dc build(renderer): fail compiler-compat baseline shrinks only in touched files (#39440)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-07 01:59:33 -08:00
OrcaWinandOrcaWin 75910ba631 build(renderer): gate React Compiler compatibility with a ratchet (#39324)
Adds oxc-transform-react as a devDependency and a ratchet that runs React
Compiler in analysis mode over the shipped renderer sources. Files can't gain
bailouts (new files must compile fully), and new code the compiler would run
differently is banned: hooks it memoizes into a cached block, bare `void x;`
reads, member postfix updates used as values, and "use no memo" opt-outs.
Both baselines are generated by --update / --prune.

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-07 00:42:01 -08:00