Repository navigation
Conversation
domgan-oai
marked this pull request as ready for review
August 8, 2026 20:06
57 tasks done
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
octane initandoctane create.@octanejs/cli.References #632 (Workstream 3); other roadmap work remains open.
Why
The SPA starter previously assigned
createRoot(...)to a variable before callingrender. That root does not escape, but the existing production compiler intentionally specializes only a directly chained, compiler-proven disposable root. The starter therefore retained the complete generic reusable-root implementation unnecessarily. Changing the generated entry to the already supported chained form fixes the missed optimization without changing the compiler or runtime.Changes
Validation
pnpm format:checkpnpm typecheck(repository-wide; scoped and complete CLI-package checks below passed)pnpm test(repository-wide; 256 relevant targeted tests below passed)pnpm syncpnpm format:files:check .changeset/cli-disposable-root-specialization.md benchmarks/README.md benchmarks/baselines/ratios.json benchmarks/bundle-size/minimal-budgets.json benchmarks/bundle-size/run-minimal.mjs benchmarks/bundle-size/verify-reachability.mjs packages/cli/src/commands/init/templates.js packages/cli/tests/create.test.js packages/cli/tests/init.test.jspnpm typecheck:files packages/cli/src/commands/init/templates.js./node_modules/.bin/tsgo --noEmit -p packages/cli/tsconfig.typecheck.json./node_modules/.bin/vitest run --project cli --project create-octane --reporter=dot --silent=passed-only— 163 tests../node_modules/.bin/vitest run packages/octane/tests/compiler/bundler-compiler.test.ts packages/octane/tests/external-hook-slot.test.ts --project octane --reporter=dot --silent=passed-only— 76 tests, including HMR, escaped/reused roots, and trusted compiled-output proof../node_modules/.bin/vitest run packages/rspack-plugin-octane/tests/loader.integration.test.ts --project rspack-plugin --reporter=dot --silent=passed-only— 17 tests, including Rspack's fail-closed generic-root behavior.node benchmarks/bench.mjs --quick --ratios bundle-reachability— 28 executable production builds / 84 passing size guards.pnpm changeset:checknode scripts/generate-scaffold-manifest.mjs --checknode scripts/generate-cli-data.mjs --checkRisk / follow-ups
Provenance
agent-authored)Note
Low Risk
Only the disposable SPA starter template and benchmark/test wiring change; reusable, HMR, and escaping roots keep their existing contracts.
Overview
SPA scaffolds from
octane initandoctane createnow emit a chained mount (createRoot(...).render(App)) instead of assigning the root to a variable first. That matches the shape the production compiler already specializes, so new apps can drop the generic reusable-root path from the bundle without changing compiler or runtime behavior for roots that are actually reused.Regression coverage adds a
cli-spa-starterbundle-reachability scenario that builds from the realclientEntryandappComponent('spa')templates (no duplicate fixtures), checks the landing page in jsdom, and asserts__createVoidRootis present whilecreateRootis not. Committed raw/gzip/brotli budgets and three new ratio guards extend the suite to 28 builds / 84 byte guards; docs and a patch changeset for@octanejs/cliare included.Reviewed by Cursor Bugbot for commit d74cb17. Bugbot is set up for automated code reviews on this repo. Configure here.