Repository navigation
perf: speed up server-rendered HTML escaping - #629
Merged
trueadm merged 1 commit intoAug 7, 2026
Merged
Conversation
6 of 13 tasks
trueadm
marked this pull request as ready for review
August 7, 2026 20:32
jonkwheeler
pushed a commit
to jonkwheeler/octane
that referenced
this pull request
Aug 7, 2026
jonkwheeler
pushed a commit
to jonkwheeler/octane
that referenced
this pull request
Aug 7, 2026
jonkwheeler
pushed a commit
to jonkwheeler/octane
that referenced
this pull request
Aug 7, 2026
jonkwheeler
pushed a commit
to jonkwheeler/octane
that referenced
this pull request
Aug 7, 2026
jonkwheeler
pushed a commit
to jonkwheeler/octane
that referenced
this pull request
Aug 7, 2026
jonkwheeler
pushed a commit
to jonkwheeler/octane
that referenced
this pull request
Aug 7, 2026
jonkwheeler
pushed a commit
to jonkwheeler/octane
that referenced
this pull request
Aug 8, 2026
jonkwheeler
pushed a commit
to jonkwheeler/octane
that referenced
this pull request
Aug 8, 2026
jonkwheeler
pushed a commit
to jonkwheeler/octane
that referenced
this pull request
Aug 8, 2026
jonkwheeler
pushed a commit
to jonkwheeler/octane
that referenced
this pull request
Aug 8, 2026
jonkwheeler
pushed a commit
to jonkwheeler/octane
that referenced
this pull request
Aug 8, 2026
jonkwheeler
pushed a commit
to jonkwheeler/octane
that referenced
this pull request
Aug 8, 2026
jonkwheeler
pushed a commit
to jonkwheeler/octane
that referenced
this pull request
Aug 8, 2026
jonkwheeler
pushed a commit
to jonkwheeler/octane
that referenced
this pull request
Aug 8, 2026
jonkwheeler
pushed a commit
to jonkwheeler/octane
that referenced
this pull request
Aug 8, 2026
jonkwheeler
pushed a commit
to jonkwheeler/octane
that referenced
this pull request
Aug 8, 2026
jonkwheeler
pushed a commit
to jonkwheeler/octane
that referenced
this pull request
Aug 8, 2026
jonkwheeler
pushed a commit
to jonkwheeler/octane
that referenced
this pull request
Aug 8, 2026
2 of 5 tasks
leonidaz
pushed a commit
that referenced
this pull request
Aug 10, 2026
* docs(packaging): plan CommonJS package conditions * feat(packaging): add CommonJS graph builder * fix(packaging): parse CommonJS graphs with esbuild * feat(octane): publish CommonJS runtime entries * feat(bindings): publish CommonJS runtime graphs * test(packaging): exercise packed CommonJS consumers * chore(release): record CommonJS package conditions * test(packaging): run CommonJS tarball canary * test(packaging): compare ESM and CommonJS parity * fix(review): guard CommonJS output deletion * fix(review): reject lossy CommonJS transforms * feat(packaging): compile TSRX CommonJS graphs * perf(packaging): reuse TSRX compilation work * feat(packages): support callable CommonJS defaults * fix(packages): recognize TSRX CommonJS roots * perf: speed up server-rendered HTML escaping (#629) * perf: skip unchanged conditional keyed rows (#628) * perf: skip unchanged conditional keyed rows * fix: exclude Activity boundaries from keyed row memoization * fix(ci): prevent usehooks hydration timeout * fix(ci): refresh React parity evidence hashes * perf: reuse bounded keyed-reorder scratch storage (#630) * perf: add minimal-import bundle reachability budgets (#631) * perf: add minimal-import bundle reachability budgets * fix: register reachability benchmark with MCP server * fix: preserve side-effect-only bootstrap entrypoints (#633) * perf: cache stable renderable regions and prune sync warming (#634) * perf: cache stable renderable regions and prune sync warming * fix: preserve uppercase-prefixed custom hook state * fix(benchmarks): remove js-framework DOM node metrics (#636) * fix(bindings): classify production bundle side effects (#637) * feat: enable React Compiler across framework benchmarks (#639) * perf: reduce core runtime and compiled application bundles (#638) * Version Packages (#601) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix(commonjs): fail closed on authored .tsrx modules Refuse compiling .tsrx into CommonJS packaging output so published packages keep source for consumers to compile. Co-authored-by: Cursor <[email protected]> * fix(commonjs): restore published require export conditions Re-apply the CommonJS require maps for octane and the binding packages after the main merge dropped them. Co-authored-by: Cursor <[email protected]> * fix(commonjs): order require before default and wire binding prepack Put import/require ahead of default in octane publishConfig.exports so Node does not always pick the ESM graph, and run build:cjs from prepack for the binding packages that advertise dist/cjs. Co-authored-by: Cursor <[email protected]> * fix(compiler): discover source packages without a CommonJS build require.resolve failed on prepack-only dist/cjs entries in CI, so Vite source discovery skipped Base UI and nested bindings. Fall back to the installed package manifest when the require target is missing. Co-authored-by: Cursor <[email protected]> --------- Co-authored-by: domgan-oai <[email protected]> Co-authored-by: Dominic Gannaway <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Cursor <[email protected]>
trueadm
added a commit
that referenced
this pull request
Aug 28, 2026
* feat(bindings): port react-transition-group * fix(bindings): address transition parity feedback (#487) * fix(bindings): make group updates synchronous (#487) * fix(bindings): register transition group integrations (#487) * fix(bindings): refresh transition parity evidence (#487) * fix(bindings): guard null transition refs (#487) * fix(bindings): format transition parity inventory (#487) * fix(react-transition-group): preserve transition state * fix(ci): format TransitionGroup source * fix(ci): refresh transition parity lock hash * docs: refresh package inventory * docs: refresh binding parity gaps * docs: refresh binding status * fix(react-transition-group): refresh stable child flags * chore(evals): refresh transition group corpus * fix(ci): refresh transition parity evidence * fix(ci): format transition parity inventories * feat(react-select): add foundation and default components * feat(react-select): port managed option hooks * feat(react-select): port Select and composed entrypoints * feat(react-select): add nonce and public type parity * feat(react-select): match menu placement and keyboard navigation * feat(react-select): match accessibility and scroll behavior * feat(react-select): match touch interaction behavior * feat(react-select): match multi-value navigation * feat(react-select): match input and form events * feat(react-select): match pointer selection behavior * feat(react-select): match mount focus behavior * feat(react-select): complete exact binding * fix(react-select): register migration rewrites (#541) * fix(react-select): enforce public type parity * chore(ci): refresh react-parity evidence after main merge Regenerate lockfile hashes and inventory for react-select. Co-authored-by: Cursor <[email protected]> * chore(ci): refresh react-parity evidence after main merge Regenerate lockfile hashes and inventory for react-select. Co-authored-by: Cursor <[email protected]> * chore(ci): refresh react-parity evidence after main merge Regenerate lockfile hashes and inventory for react-select. * perf: speed up server-rendered HTML escaping (#629) * perf: skip unchanged conditional keyed rows (#628) * perf: skip unchanged conditional keyed rows * fix: exclude Activity boundaries from keyed row memoization * fix(ci): prevent usehooks hydration timeout * fix(react-select): resolve Bugbot keyed-list and selection regressions Always call setValue on single-select reselection, merge Fade innerProps, and add stable keys for menu, form, and animated value-container children. Co-authored-by: Cursor <[email protected]> * fix(react-select): pass animated value children without Fragment wrappers Octane Children.toArray does not flatten Fragment descriptors, so MultiValueContainer could not clone transition props onto MultiValue and Placeholder children. Co-authored-by: Cursor <[email protected]> * fix(react-select): pass inspectable animated value children Restore the needsInspectableValueChildren path so TransitionGroup receives an enumerable children array instead of a compiler opaque block, without Fragment wrappers that Children.toArray cannot flatten. Co-authored-by: Cursor <[email protected]> * test(react-transition-group): scaffold upstream parity lanes Run the pinned React suite unchanged and separate adapted parity evidence from ordinary Octane conformance coverage. Co-authored-by: Cursor <[email protected]> * test(react-select): add pristine upstream Jest lane Run the vendored react-select suites unchanged as a required parity oracle, drop whole-project parity ownership so repo-authored tests stay ordinary, and refresh neighboring vitest.config.js evidence hashes after the main merge. Co-authored-by: Cursor <[email protected]> * test(react-transition-group): complete adapted upstream suite Port every applicable upstream runtime case one-for-one so the adapted lane now provides exhaustive parity evidence with no pending dispositions. Co-authored-by: Cursor <[email protected]> * test(react-select): start adapted upstream suite Port the smaller upstream suites into a verified Octane lane and account for every remaining pristine identity with fail-closed controls. Co-authored-by: Cursor <[email protected]> * test(react-select): adapt core Select behavior Port 102 upstream Select cases covering props, filtering, inputs, callbacks, accessibility, and interactions, reducing the unadapted inventory to 115 identities. Co-authored-by: Cursor <[email protected]> * test(react-transition-group): address parity review feedback Strengthen adapted lifecycle scenarios and keep parity evidence mapped to the files that execute each upstream case. Co-authored-by: Cursor <[email protected]> * test(react-select): expand Select upstream coverage Adapt 66 more Select cases across keyboard navigation, callbacks, forms, accessibility, custom components, and value handling, leaving 49 pristine identities pending. Co-authored-by: Cursor <[email protected]> * test(react-select): complete adapted upstream suite Port the remaining one-for-one adapted cases to 248 of 255 pristine identities, keep seven Select blockers fail-closed with rationales, and refresh the parity inventories and hashes for the review feedback. Co-authored-by: Cursor <[email protected]> * test(react-select): stabilize StateManaged snapshot ids Move the defaults snapshot before other mounts so instance ids stay at react-select-1 regardless of suite filtering or test order. Co-authored-by: Cursor <[email protected]> * fix(react-select): match upstream focus and clear behavior Co-authored-by: Cursor <[email protected]> * fix(react-select): mark parity provenance verified Unverified provenance left required React parity lanes validate-only; flip to verified so CI executes them. Co-authored-by: Cursor <[email protected]> * fix(react-transition-group): add type lanes for verified parity Absent upstream type suites still require repo-authored pristine-types and adapted-types evidence before verification can be verified; add consumer-shaped typetests and refresh lockfile hashes. Co-authored-by: Cursor <[email protected]> * fix(react-transition-group): restore adapted upstream oracles Address leonidaz parity review: node-env SSR adapted project, silent cleanup console spy, mid-appear null child, childFactory reentry, appear checkpoint, and full SwitchTransition callback traces. Co-authored-by: Cursor <[email protected]> * fix(react-select): address parity inventory review Split the transition-group SSR adaptation into its own required lane, inventory the three canonical react-select skips as not-applicable, classify Select.test.ts under fail-closed discovery, and reconcile UPSTREAM.md with the verified counts. Co-authored-by: Cursor <[email protected]> * fix(react-select): close leonidaz parity control gaps Add assertion-group type parity verifiers and typetest ledger coverage for react-select and react-transition-group, record exact oracle versions, and drop Vitest wrappers around the direct jest-full pristine lanes. Co-authored-by: Cursor <[email protected]> * fix(select): close type-parity controls and drop react prefix Verify mapped typetest fixtures belong to the pristine/adapted compiler programs, record the exact @types/react type-oracle pins, and rename the Octane package to @octanejs/select per maintainer naming guidance. Co-authored-by: Cursor <[email protected]> * chore: refresh parity hashes after select rename and main merge Co-authored-by: Cursor <[email protected]> * fix(select): route differential tests to react-parity and pin type oracle Move the six react-octane-differential SSR suites into a dedicated select-differential Vitest project under testExecution.group react-parity, and replace catalog:default @types/react pins with literal 19.2.17/19.2.3. Co-authored-by: Cursor <[email protected]> * fix(select): reconcile multi-value focus and key inspectable children Match upstream focusedValue remapping on value updates and give the animated ValueContainer path stable keys without breaking MultiValue child inspection. Co-authored-by: Cursor <[email protected]> * fix(select): flatten keyed fragments in animated ValueContainer Unwrap inspectable ValueContainer's keyed Fragment slots before TransitionGroup and MultiValueContainer inspect child types. Co-authored-by: Cursor <[email protected]> * fix(select): preserve animated child identities (#541) - retain fragment and inner child keys when flattening inspectable children - cover animated single-select value and input rendering Note: pre-existing typecheck failures in packages/select/src/animated/transitions.tsrx were not addressed by this PR. * chore: format refreshed parity evidence * fix(select): validate without Node ambient types * fix(select): register browser suite in heavy CI * chore: refresh eval corpus hashes * fix(select): reconcile async state transactionally * chore: refresh merged parity evidence * fix(select): address parity review findings --------- Co-authored-by: Cursor <[email protected]> Co-authored-by: domgan-oai <[email protected]> Co-authored-by: Dominic Gannaway <[email protected]>
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
Array.fromcopy consumes approximately 0.64% of sampled allocated bytes and 0.025% of total render time, while alternatives that preserve custom iterators, proxies, getter ordering, eager mutation snapshots, and suspension were 6–20 times slower.Same-session balanced production measurements:
The compiled, streaming, and escaped HTML outputs remain byte-identical.
Part of #611.
Validation
pnpm format:checkpnpm typecheckpnpm test./node_modules/.bin/tsgo --noEmit -p packages/octane/tsconfig.json../node_modules/.bin/tsgo --noEmit -p packages/octane/typetests/tsconfig.json.CONFIGS=escape,deopt,waterfall,parallel node benchmarks/ssr-throughput/run.mjs 0.1 --quick --no-buildacross seven Octane SSR scenarios, including the new deterministic work gate.TARGETS=octane node benchmarks/streaming-ssr/run.mjs 3 --no-buildacross staggered and all-fast modes.pnpm sync.Risk / follow-ups
<escaping implementation makes the new buffered, hostile-markup, and streamed-output tests fail; restoring it makes both compile modes pass.external-hook-slot.test.tsandregister-hook.test.ts) are excluded because their optional packages cannot be installed; every SSR, security, streaming, hydration, compiler, and runtime suite remains included. Full cross-framework workspace checks are explicitly not claimed.Provenance
agent-authored)Note
Medium Risk
Touches security-sensitive HTML escaping on the server; behavior is heavily tested and benchmark-gated, but any escaper regression could affect XSS safety.
Overview
Server
escapeHtmlstill uses a single pre-scan on clean text; when escaping is needed, the three global-regex.replacepasses are swapped forString.prototype.replaceAllwith literal targets (&,<,>). The attribute escaper, list snapshot behavior, and streaming/hydration paths are intentionally unchanged.The escape-heavy SSR benchmark gains a post-run work gate that re-renders under instrumentation: it fails if HTML escaping still goes through the old regex replacement pattern, if the 10k-item list is not snapshotted exactly once via
Array.from, or if the response body differs. README and changeset document the perf goal and preserved semantics.SSR tests expand coverage for escaped text across buffered/static markup, coercion and errors, streaming output, and hydration adopting server nodes—without changing production behavior beyond the escaper implementation.
Reviewed by Cursor Bugbot for commit 13a0de5. Bugbot is set up for automated code reviews on this repo. Configure here.