Remove inert config.server_render_method option (#4415) - #4423
Conversation
The troubleshooting guide recommended `config.server_render_method = 'NodeJS'`, but the config validator raised `ReactOnRails::Error` at boot for any value other than blank or "ExecJS" — so anyone following the doc crashed on startup. The option was also completely inert: no runtime code ever read it (only doctor echoed it back). Docs: both the troubleshooting guide and the configuration README no longer recommend or document `server_render_method`; they now explain the open-source gem always renders with ExecJS and point standalone-Node users at React on Rails Pro's node renderer (`ReactOnRailsPro.configure`). Code (BREAKING, permitted in the 17.0.0 RC window): removed the `server_render_method` attr (default, attr_accessor, initialize kwarg, assignment), its boot validator `check_server_render_method_is_only_execjs` and the call to it, and the RBS signatures. Doctor no longer reads the attr; instead `check_deprecated_configuration_settings` flags a stale `config.server_render_method` line so users are guided to delete it. Specs: replaced the configuration_spec branch that exercised the validator with a NoMethodError regression assertion; dropped the now-invalid `server_render_method` stub from the doctor_spec runtime-config instance_double (a verifying double that otherwise rejects the removed method). Fixes #4415 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughChangesDocumentation updates
Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR removes the inert
Confidence Score: 4/5The code changes look mergeable after updating the stale generated documentation.
llms-full.txt Important Files Changed
Reviews (1): Last reviewed commit: "Fix CHANGELOG PR link to #4423" | Re-trigger Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7e4e16bb69
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Review: PR #4423 - Remove inert config.server_render_method option What it does: Removes the dead config.server_render_method config option (attr, initializer kwarg, boot validator, RBS sigs) since it never had a live runtime code path and its validator would raise for the exact value the troubleshooting docs recommended ('NodeJS'). Adds a rake react_on_rails:doctor deprecation notice for stale initializer lines, updates docs/CHANGELOG, and updates specs accordingly. Review scope: gh pr diff 4423 (8 files, +16/-54), plus full reads of the touched Ruby files (configuration.rb, doctor.rb) and specs for context. Findings: None survived verification. Checked specifically for:
One minor, non-blocking observation: the new server_render_method branch in check_deprecated_configuration_settings (doctor.rb) has no direct spec coverage, but this is consistent with its three untested sibling checks in the same method (generated_assets_dirs, skip_display_none, defer_generated_component_packs) - a pre-existing pattern, not a regression introduced by this PR. Overall this is a clean, well-scoped removal with docs, RBS, and specs all kept in sync. |
The generated machine-readable aggregate still contained the removed `server_render_method` configuration section and the boot-breaking `config.server_render_method = 'NodeJS'` troubleshooting snippet, because the doc sources were changed but the aggregate was not regenerated. Ran `node script/generate-llms-full.mjs` so the shipped reference no longer hands users/agents the exact boot-breaking guidance this PR removes. Only llms-full.txt changed; llms-full-pro.txt was unaffected. The single remaining `server_render_method` mention is the historical v12->13 upgrade-guide instruction to remove the setting, which is correct guidance. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Fixed in bd7526a. Ran
The only remaining |
|
+ci-run-hosted |
Code ReviewThis PR removes the inert One gap survived review:
Minor/optional: Everything else — the breaking-change framing, CHANGELOG entry, and the |
Hosted CI RequestedTriggered 9 workflow(s) for View progress in the Actions tab. |
…derer-shutdown-restart * origin/main: Add mechanical parity guards for Ruby↔TS protocol constants (#4412) (#4427) Move Node tsconfigs from @tsconfig/node14 to @tsconfig/node18 (#4410) (#4429) [Pro] Remove unused addressable and rainbow runtime deps from gemspec (#4416) (#4422) Delete finished #3313 Prism Gemfile-rewriter spike (#4421) Extract generator scan/tracking helpers (#4405) (#4430) Extract install_dependency_group helper in JsDependencyManager (#4403) (#4424) Remove obsolete Ruby<2.6 YAML-aliases capability shim (#4417) (#4428) Remove inert config.server_render_method option (#4415) (#4423) Prune stale knip ignores and enforce binaries in CI (#4408) (#4425) Extract shared redux_store kwargs validator (#4402) (#4420) Avoid caching async props prerender streams (#4376) Release incremental render context on setup failure (#4383) Optimize response type emitter snapshots (#4397) Skip generated stylesheet metadata for OSS renders (#4395) Avoid mutating render option inputs (#4396) Changelog: document PR 4282 registry cleanup (#4399) # Conflicts: # CHANGELOG.md
* origin/main: Add mechanical parity guards for Ruby↔TS protocol constants (#4412) (#4427) Move Node tsconfigs from @tsconfig/node14 to @tsconfig/node18 (#4410) (#4429) [Pro] Remove unused addressable and rainbow runtime deps from gemspec (#4416) (#4422) Delete finished #3313 Prism Gemfile-rewriter spike (#4421) Extract generator scan/tracking helpers (#4405) (#4430) Extract install_dependency_group helper in JsDependencyManager (#4403) (#4424) Remove obsolete Ruby<2.6 YAML-aliases capability shim (#4417) (#4428) Remove inert config.server_render_method option (#4415) (#4423) Prune stale knip ignores and enforce binaries in CI (#4408) (#4425) Extract shared redux_store kwargs validator (#4402) (#4420) Avoid caching async props prerender streams (#4376) Release incremental render context on setup failure (#4383) Optimize response type emitter snapshots (#4397) Skip generated stylesheet metadata for OSS renders (#4395) Avoid mutating render option inputs (#4396) Changelog: document PR 4282 registry cleanup (#4399) # Conflicts: # react_on_rails_pro/Gemfile.lock # react_on_rails_pro/react_on_rails_pro.gemspec # react_on_rails_pro/spec/dummy/Gemfile.lock
…cache-4317 * origin/main: Drop deprecation-tombstone config options for 17.0.0 (#4419) (#4432) Add mechanical parity guards for Ruby↔TS protocol constants (#4412) (#4427) Move Node tsconfigs from @tsconfig/node14 to @tsconfig/node18 (#4410) (#4429) [Pro] Remove unused addressable and rainbow runtime deps from gemspec (#4416) (#4422) Delete finished #3313 Prism Gemfile-rewriter spike (#4421) Extract generator scan/tracking helpers (#4405) (#4430) Extract install_dependency_group helper in JsDependencyManager (#4403) (#4424) Remove obsolete Ruby<2.6 YAML-aliases capability shim (#4417) (#4428) Remove inert config.server_render_method option (#4415) (#4423) Prune stale knip ignores and enforce binaries in CI (#4408) (#4425) Extract shared redux_store kwargs validator (#4402) (#4420) Avoid caching async props prerender streams (#4376) Release incremental render context on setup failure (#4383) Optimize response type emitter snapshots (#4397) Skip generated stylesheet metadata for OSS renders (#4395) Avoid mutating render option inputs (#4396) Changelog: document PR 4282 registry cleanup (#4399)
…-4364 * origin/main: (24 commits) Preserve streaming LoadError during dependency failures (#4388) Wire eslint-rules RuleTester suite into a runner, CI, and knip (#4409) (#4433) Handle fire-and-forget RSCRoute retry failures (#4378) Fix visible hydration cleanup for detached roots (#4374) Avoid full locale default obsolete scans (#4398) Document RSC public-page validation and sidecar patterns (#4387) Remove dead methods; prune always-false Rails<5.0 spec branches (#4418) (#4431) Drop deprecation-tombstone config options for 17.0.0 (#4419) (#4432) Add mechanical parity guards for Ruby↔TS protocol constants (#4412) (#4427) Move Node tsconfigs from @tsconfig/node14 to @tsconfig/node18 (#4410) (#4429) [Pro] Remove unused addressable and rainbow runtime deps from gemspec (#4416) (#4422) Delete finished #3313 Prism Gemfile-rewriter spike (#4421) Extract generator scan/tracking helpers (#4405) (#4430) Extract install_dependency_group helper in JsDependencyManager (#4403) (#4424) Remove obsolete Ruby<2.6 YAML-aliases capability shim (#4417) (#4428) Remove inert config.server_render_method option (#4415) (#4423) Prune stale knip ignores and enforce binaries in CI (#4408) (#4425) Extract shared redux_store kwargs validator (#4402) (#4420) Avoid caching async props prerender streams (#4376) Release incremental render context on setup failure (#4383) ... # Conflicts: # CHANGELOG.md
…e command (#4539) ## What Two documentation/process fixes surfaced while running the RC testing plan against **17.0.0.rc.7** (release-gate tracker #3823). ### 1. Add `config.server_render_method` removal to the v17 upgrade guide The removal is a breaking change (PR #4423) and is in the CHANGELOG, but it was **missing from the "Upgrading to v17" migration guide**. An app that still has `config.server_render_method = ...` in its initializer now hits `NoMethodError` at boot, and the guide never told the user to delete it. Adds the migration bullet (delete the line; `doctor` flags it; use Pro's Node renderer for a standalone rendering process). ### 2. Fix the generator/install gate command in `rc-testing-plan.md` The documented command ```bash bundle exec rspec react_on_rails/spec/react_on_rails/generators ``` run from the workspace root fails with `LoadError: cannot load such file -- rails` — the root workspace bundle has no Rails. CI runs these specs in the `react_on_rails/` gem bundle (whose Gemfile provides Rails). Updated the doc to run them there: ```bash (cd react_on_rails && bundle exec rspec spec/react_on_rails/generators) ``` Verified: run correctly, the generator specs pass **398 examples, 0 failures**. ### 3. Regenerate `llms-full.txt` / `llms-full-pro.txt` Required by the `check-llms-full` guard because the upgrade guide changed. `node script/generate-llms-full.mjs --check` passes. ## Why now Both are cheap, in-window fixes for the current release candidate. #1 is Lane 4a's single promotion-blocking gap; #2 makes the plan's own gate command actually runnable. ## Verification - `pnpm exec prettier --check` on both docs: clean - `node script/generate-llms-full.mjs --check`: `files are current` - lefthook pre-commit (trailing-newlines, markdown-links, prettier): pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Summary
The troubleshooting guide recommended
config.server_render_method = 'NodeJS' # for better error messages, but the config validator raisedReactOnRails::Errorat boot for any value other than blank or"ExecJS"— so anyone following that doc crashed their app on startup. The option was also completely inert: no runtime code path ever read it (onlyrake react_on_rails:doctorechoed it back). The configuration README documented it as a live option.This PR fixes both docs and removes the dead option. Because 17.0.0 is in the RC window, the breaking removal is free.
Fixes #4415
Breaking Change
config.server_render_methodis removed.check_server_render_method_is_only_execjs, and its RBS signatures are gone.config.server_render_method = ...inconfig/initializers/react_on_rails.rbnow raisesNoMethodErrorat boot. Users settingnilor"ExecJS"(which previously booted fine) must delete the line; users setting'NodeJS'already crashed today via the validator.rake react_on_rails:doctornow flags a staleconfig.server_render_methodline under "Deprecated Configuration Settings" so users are guided to delete it, instead of echoing the value back as a custom extension.Correct current mechanism: the open-source gem always renders on the server with ExecJS; there is no option to select a different server render method. For a standalone Node rendering process, use React on Rails Pro's Node renderer, configured via
ReactOnRailsPro.configure.Changes
docs/oss/deployment/troubleshooting.md,docs/oss/configuration/README.md): removed the boot-raisingserver_render_methodrecommendation / live-option documentation; added a sentence explaining ExecJS is always used and pointing standalone-Node users at Pro's node renderer.configuration.rb: removed the default,attr_accessorentry,initializekwarg, assignment, thecheck_server_render_method_is_only_execjsvalidator, and its call insetup_config_values.doctor.rb: removed bothserver_render_methodreads inanalyze_custom_extensions(runtime-config branch + initializer text-scan branch); added a removed-setting check tocheck_deprecated_configuration_settings.configuration.rbs: dropped the three signatures (attr, initialize kwarg, validator method).configuration_spec.rb: replaced the validator-exercising describe block with aNoMethodErrorregression assertion.doctor_spec.rb: dropped the now-invalidserver_render_method: nilstub from the runtime-configinstance_double(a verifying double that otherwise rejects the removed method). See "out-of-scope" note below.#### Breaking Changesentry under[Unreleased].QA Evidence
Docs no longer recommend a boot-raising value:
Boot loads cleanly without the option (dummy Rails app full environment):
Validation
Out-of-scope note
react_on_rails/spec/lib/react_on_rails/doctor_spec.rbwas outside this item's declared file scope, but itsinstance_double(ReactOnRails::Configuration, ..., server_render_method: nil)is a verifying double that raises once the attr is removed (the ReactOnRails::Configuration class does not implement the instance method: server_render_method). This one-line stub deletion is a direct, unavoidable consequence of the required attr removal (and is listed as step 6 in #4415), so it was included to keep the PR green. No sibling batch item touches this file.Not done here (deferred / not in scope): the historical v12→13 upgrade-guide note (
docs/oss/upgrading/upgrading-react-on-rails.md:392, already tells users to remove the setting) andllms-full.txtregeneration are outside this item's owned files.Codex Decision Log
check_deprecated_configuration_settings(which already has the migration-guide link and mirrors the deprecated-attrs report) rather than reword insideanalyze_custom_extensions, keeping all "delete this line" guidance in one canonical place.NoMethodErrorregression test to lock in the removal rather than silently deleting coverage.Confidence note: High. The option was provably inert (no runtime reader), the removal is validated by a clean dummy-app boot, and all targeted specs + rubocop + RBS validate pass locally. Risk is limited to the documented breaking change (initializers setting the attr now raise), which is expected in the RC window and covered by CHANGELOG + doctor guidance.
Summary by CodeRabbit