Add standalone RSC upgrade guide for existing Pro apps#2831
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughAdded a new Pro-focused RSC upgrade guide and linked it from the Pro tutorial and upgrade pages; updated prerequisite/versioning language and checks in the new guide. All changes are documentation-only. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 adds a standalone upgrade guide ( Key observations:
Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Existing React on Rails App] --> B{Using Pro?}
B -- No --> C[Run rails generate react_on_rails:pro]
C --> D[Now a Pro App]
B -- Yes --> D
D --> E{React 19.0.x\nNode renderer\nShakapacker?}
E -- No --> F[Install prerequisites]
F --> G[Run rails generate react_on_rails:rsc]
E -- Yes --> G
G --> H[Creates: rscWebpackConfig.js\nHelloServer components]
G --> I[Modifies: react_on_rails_pro.rb\nserverWebpackConfig.js\nclientWebpackConfig.js\nServerClientOrBoth.js\nroutes.rb\nProcfile.dev]
H --> J[Verification: bin/dev]
I --> J
J --> K{All 3 bundles build?}
K -- No --> L[Troubleshooting]
K -- Yes --> M[Visit /hello_server\nand /rsc_payload/HelloServer]
M --> N[RSC enabled ✓]
Reviews (1): Last reviewed commit: "Add standalone RSC upgrade guide for exi..." | Re-trigger Greptile |
Review: Add standalone RSC upgrade guide for existing Pro appsOverall this is a well-structured, useful guide. The code snippets match the actual One blocking issueLine 34 — CVE identifiers appear to be AI-hallucinated. Minor observations
None of the minor items are blockers, but the CVE issue should be resolved before this ships publicly. |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
docs/pro/react-server-components/upgrading-existing-pro-app-to-rsc.md (1)
18-32: Consider adding package manager alternatives.The version check commands only show Yarn examples. Based on coding guidelines, end-user documentation should include npm, yarn, and pnpm alternatives for package-manager agnostic guidance.
📦 Suggested package manager alternatives
# Check npm package version -yarn why react-on-rails-pro # or: npm ls react-on-rails-pro +npm ls react-on-rails-pro # npm +# OR +yarn why react-on-rails-pro # yarn +# OR +pnpm list react-on-rails-pro # pnpm # Check React version (must be 19.0.x) -yarn why react +npm ls react # npm +# OR +yarn why react # yarn +# OR +pnpm list react # pnpmBased on learnings, in all end-user documentation under docs/, ensure package-manager-agnostic installation instructions include npm, yarn, and pnpm.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/pro/react-server-components/upgrading-existing-pro-app-to-rsc.md` around lines 18 - 32, Update the version-check command block to be package-manager-agnostic by adding npm and pnpm equivalents alongside the existing yarn commands: keep the Ruby gem check (bundle show react_on_rails_pro) and the initializer verify (ls config/initializers/react_on_rails_pro.rb), but replace/augment the "yarn why react-on-rails-pro" and "yarn why react" lines with equivalent "npm ls react-on-rails-pro" / "npm ls react" and "pnpm why react-on-rails-pro" / "pnpm why react" (or their appropriate pnpm list/why alternatives) so the code block covers yarn, npm, and pnpm users.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/pro/react-server-components/upgrading-existing-pro-app-to-rsc.md`:
- Around line 50-76: Update the "NPM dependencies added" section in
docs/pro/react-server-components/upgrading-existing-pro-app-to-rsc.md to list
only react-on-rails-rsc (remove react-server-dom-webpack), and add a short note
that react-server-dom-webpack is vendored inside react-on-rails-rsc; locate the
section labeled "NPM dependencies added" (and the table header entries like
`react-on-rails-rsc` / `react-server-dom-webpack`) and modify the content so it
accurately reflects that only react-on-rails-rsc is installed as an explicit
dependency.
---
Nitpick comments:
In `@docs/pro/react-server-components/upgrading-existing-pro-app-to-rsc.md`:
- Around line 18-32: Update the version-check command block to be
package-manager-agnostic by adding npm and pnpm equivalents alongside the
existing yarn commands: keep the Ruby gem check (bundle show react_on_rails_pro)
and the initializer verify (ls config/initializers/react_on_rails_pro.rb), but
replace/augment the "yarn why react-on-rails-pro" and "yarn why react" lines
with equivalent "npm ls react-on-rails-pro" / "npm ls react" and "pnpm why
react-on-rails-pro" / "pnpm why react" (or their appropriate pnpm list/why
alternatives) so the code block covers yarn, npm, and pnpm users.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 167ed74e-abc6-4f10-a7e3-e50a290990b7
📒 Files selected for processing (5)
docs/README.mddocs/pro/react-server-components/index.mddocs/pro/react-server-components/tutorial.mddocs/pro/react-server-components/upgrading-existing-pro-app-to-rsc.mddocs/pro/upgrading-to-pro.md
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 56addc5568
ℹ️ 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".
New doc page covering the `react_on_rails:rsc` generator workflow for existing Pro installations, including legacy vs current webpack export compatibility, what files are created/modified, and a verification checklist. Linked from RSC index, tutorial, upgrading-to-pro, and main docs README. Closes #2425 Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
56addc5 to
dce6bf2
Compare
|
Review posted via inline comments below. |
|
Review summary - two blocking issues found. See inline comments for details on all items. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: New guide duplicates existing doc with same title
- This was a real duplication issue, so I deleted the duplicate guide and updated all references to point consistently to the existing
upgrading-existing-pro-app.mdpage.
- This was a real duplication issue, so I deleted the duplicate guide and updated all references to point consistently to the existing
Or push these changes by commenting:
@cursor push 4e83eb7350
Preview (4e83eb7350)
diff --git a/docs/README.md b/docs/README.md
--- a/docs/README.md
+++ b/docs/README.md
@@ -38,7 +38,7 @@
## Pro features
- [React Server Components](./pro/react-server-components/tutorial.md) - RSC with Rails
-- [Add RSC to Existing Pro App](./pro/react-server-components/upgrading-existing-pro-app-to-rsc.md) - Standalone RSC upgrade for Pro users
+- [Add RSC to Existing Pro App](./pro/react-server-components/upgrading-existing-pro-app.md) - Standalone RSC upgrade for Pro users
- [Streaming SSR](./oss/building-features/streaming-server-rendering.md) - Progressive server rendering
- [Node Renderer](./oss/building-features/node-renderer/basics.md) - Dedicated Node.js rendering server
- [Upgrading to Pro](./pro/upgrading-to-pro.md) - Switch from OSS to Pro in three steps
diff --git a/docs/pro/react-server-components/tutorial.md b/docs/pro/react-server-components/tutorial.md
--- a/docs/pro/react-server-components/tutorial.md
+++ b/docs/pro/react-server-components/tutorial.md
@@ -18,4 +18,4 @@
Each part of the tutorial builds on the concepts from previous sections, so it's recommended to follow them in order. Let's begin with creating your first React Server Component!
-> **Already running Pro?** If you have an existing React on Rails Pro app and want to add RSC, see the [upgrade guide](./upgrading-existing-pro-app-to-rsc.md) for a streamlined path using the standalone `react_on_rails:rsc` generator.
+> **Already running Pro?** If you have an existing React on Rails Pro app and want to add RSC, see the [upgrade guide](./upgrading-existing-pro-app.md) for a streamlined path using the standalone `react_on_rails:rsc` generator.
diff --git a/docs/pro/react-server-components/upgrading-existing-pro-app-to-rsc.md b/docs/pro/react-server-components/upgrading-existing-pro-app-to-rsc.md
deleted file mode 100644
--- a/docs/pro/react-server-components/upgrading-existing-pro-app-to-rsc.md
+++ /dev/null
@@ -1,211 +1,0 @@
-# Upgrading an Existing React on Rails Pro App to RSC
-
-Already running React on Rails Pro? This guide covers adding React Server Components to your existing app using the standalone RSC generator. If you're starting from scratch, see the [RSC tutorial](./tutorial.md) instead.
-
-> **This guide is for existing Pro apps.** If you're on OSS and want RSC, first [upgrade to Pro](../upgrading-to-pro.md), then come back here.
-
-## Prerequisites
-
-Before running the generator, verify:
-
-- **React on Rails Pro v4.0.0+** with **React on Rails v16.0.0+**
-- **React 19.0.x** (`react` and `react-dom` both at 19.0.4 or later within the 19.0.x range). React 19.1.x and later are not yet supported.
-- **Node renderer** configured and running (RSC requires server-side JavaScript execution via the node renderer, not ExecJS)
-- **Shakapacker** (or webpack configured via Shakapacker)
-- **Node.js 20+**
-- **Pro initializer exists** at `config/initializers/react_on_rails_pro.rb`
-
-Check your versions:
-
-```bash
-# Check gem version
-bundle show react_on_rails_pro
-
-# Check npm package version
-yarn why react-on-rails-pro # or: npm ls react-on-rails-pro
-
-# Check React version (must be 19.0.x)
-yarn why react
-
-# Verify Pro initializer exists
-ls config/initializers/react_on_rails_pro.rb
-```
-
-> **React version note:** `react-on-rails-rsc` versions 19.0.0 through 19.0.3 vendored older builds of `react-server-dom-webpack` with known vulnerabilities (CVE-2025-55182, CVE-2025-67779, CVE-2026-23864). Use 19.0.4 or later.
-
-## Run the Generator
-
-```bash
-bundle exec rails generate react_on_rails:rsc
-```
-
-For TypeScript projects:
-
-```bash
-bundle exec rails generate react_on_rails:rsc --typescript
-```
-
-The generator is idempotent -- it skips files that already exist and checks for existing configuration before making changes.
-
-## What the Generator Creates and Modifies
-
-### New files
-
-| File | Purpose |
-| --------------------------------------------------------------- | ----------------------------------------------------------- |
-| `config/webpack/rscWebpackConfig.js` | RSC webpack bundle config (derives from your server config) |
-| `app/javascript/src/HelloServer/ror_components/HelloServer.jsx` | Example RSC component (registered as a Server Component) |
-| `app/javascript/src/HelloServer/components/HelloServer.jsx` | Server component implementation |
-| `app/javascript/src/HelloServer/components/LikeButton.jsx` | Example client component with `'use client'` directive |
-
-### Modified files
-
-| File | Change |
-| ------------------------------------------- | ------------------------------------------------------------------------------------ |
-| `config/initializers/react_on_rails_pro.rb` | Adds `enable_rsc_support`, `rsc_bundle_js_file`, `rsc_payload_generation_url_path` |
-| `config/webpack/serverWebpackConfig.js` | Adds `RSCWebpackPlugin` import, `rscBundle` parameter to `configureServer()` |
-| `config/webpack/clientWebpackConfig.js` | Adds `RSCWebpackPlugin` import and plugin |
-| `config/webpack/ServerClientOrBoth.js` | Adds RSC config import, `RSC_BUNDLE_ONLY` env handling, includes RSC in multi-bundle |
-| `config/routes.rb` | Adds `rsc_payload_route` and `hello_server` route |
-| `Procfile.dev` | Adds RSC bundle watcher: `rsc-bundle: RSC_BUNDLE_ONLY=yes bin/shakapacker --watch` |
-
-### NPM dependencies added
-
-- `react-on-rails-rsc` -- RSC webpack loader, plugin, and runtime
-- `react-server-dom-webpack` -- React's RSC wire protocol
-
-## Legacy vs Current Webpack Export Styles
-
-The generator handles both webpack config export styles transparently. No manual action is required -- the generated `rscWebpackConfig.js` includes backward-compatibility logic.
-
-### Current style (Pro generator output)
-
-If you ran the Pro generator recently, your `serverWebpackConfig.js` exports an object with named exports:
-
-```js
-module.exports = {
- default: configureServer,
- extractLoader,
-};
-```
-
-The `extractLoader` function is used by the RSC config to find babel-loader or swc-loader in your webpack rules.
-
-### Legacy style (older Pro installs or manual setup)
-
-Older installations export the function directly:
-
-```js
-module.exports = configureServer;
-```
-
-### How the RSC config handles both
-
-The generated `rscWebpackConfig.js` uses this pattern:
-
-```js
-const serverWebpackModule = require('./serverWebpackConfig');
-
-// Works with both export styles
-const serverWebpackConfig = serverWebpackModule.default || serverWebpackModule;
-const extractLoader =
- serverWebpackModule.extractLoader ||
- ((rule, loaderName) => {
- // Inline fallback implementation
- if (!Array.isArray(rule.use)) return null;
- return rule.use.find((item) => {
- const testValue = typeof item === 'string' ? item : item.loader;
- return testValue && testValue.includes(loaderName);
- });
- });
-```
-
-This means:
-
-- **Current style**: Uses `serverWebpackModule.default` and `serverWebpackModule.extractLoader` directly
-- **Legacy style**: Falls back to `serverWebpackModule` itself (the function) and provides an inline `extractLoader`
-
-You do not need to update your `serverWebpackConfig.js` export style for RSC to work.
-
-## Verification Checklist
-
-After running the generator, verify everything works:
-
-### 1. Build all bundles
-
-```bash
-bin/dev
-# or: foreman start -f Procfile.dev
-```
-
-Watch for build errors in the terminal output. All three bundles (client, server, RSC) should compile successfully.
-
-### 2. Check generated files
-
-```bash
-# RSC bundle should exist in your server bundle output directory
-ls ssr-generated/rsc-bundle.js
-
-# RSC manifests should exist in your webpack output directory
-ls public/packs/react-client-manifest.json
-ls public/packs/react-server-client-manifest.json
-```
-
-> **Note:** The paths above assume default configuration. Your `server_bundle_output_path` and webpack output directory may differ.
-
-### 3. Visit the example page
-
-Navigate to [http://localhost:3000/hello_server](http://localhost:3000/hello_server). You should see the HelloServer component rendered with a "Like" button that works client-side.
-
-### 4. Verify the RSC payload route
-
-Navigate to [http://localhost:3000/rsc_payload/HelloServer](http://localhost:3000/rsc_payload/HelloServer). You should see RSC payload output (a stream of encoded React component data), not an error page.
-
-### 5. Run the doctor
-
-```bash
-bundle exec rails react_on_rails:doctor
-```
-
-This validates that your React on Rails configuration is consistent.
-
-## Troubleshooting
-
-### Generator reports "Pro is not installed"
-
-The RSC generator requires `config/initializers/react_on_rails_pro.rb` to exist. Run the Pro generator first:
-
-```bash
-bundle exec rails generate react_on_rails:pro
-```
-
-### Webpack transform warnings
-
-If the generator reports "Some RSC webpack transforms may not have applied correctly", your webpack configs have been customized in a way the generator's regex-based transforms couldn't match. Check the [modified files table](#modified-files) above and apply the changes manually. The [Preparing Your App](../../oss/migrating/rsc-preparing-app.md) guide has detailed "What this does" callouts explaining each change.
-
-### RSC bundle fails to build
-
-Common causes:
-
-- **Missing `react-server-dom-webpack`**: Run `yarn install` or `npm install` to ensure the RSC npm dependencies were added
-- **`react-dom/server` import error**: The RSC config aliases `react-dom/server` to `false`. If you have a custom webpack config that re-adds it, remove that alias for the RSC bundle
-- **React version mismatch**: RSC requires React 19.0.x specifically. Check with `yarn why react`
-
-### HelloServer page returns 500
-
-Check the node renderer logs for errors. Common issues:
-
-- Node renderer not running (check `Procfile.dev`)
-- RSC bundle not built yet (wait for the RSC watcher to finish)
-- Missing `rsc_payload_route` in `config/routes.rb`
-
-## Next Steps
-
-- [RSC Tutorial](./tutorial.md) -- Learn RSC concepts step by step
-- [Preparing Your App for RSC Migration](../../oss/migrating/rsc-preparing-app.md) -- Detailed manual setup for migrating existing components
-- [How RSC Works](./how-react-server-components-work.md) -- Technical deep-dive into bundling
-- [Migrating to RSC](../../oss/migrating/migrating-to-rsc.md) -- Full migration series for converting components
-
-## Implementation Context
-
-This upgrade path was implemented in [#2284](https://github.com/shakacode/react_on_rails/pull/2284) (generator flags) and [#2424](https://github.com/shakacode/react_on_rails/pull/2424) (standalone RSC generator compatibility). The backward-compatible webpack export handling ensures the generator works with both legacy and current Pro installations.
\ No newline at end of file
diff --git a/docs/pro/upgrading-to-pro.md b/docs/pro/upgrading-to-pro.md
--- a/docs/pro/upgrading-to-pro.md
+++ b/docs/pro/upgrading-to-pro.md
@@ -120,5 +120,5 @@
- [Installation reference](./installation.md) - Detailed manual installation steps
- [Configuration](../oss/configuration/configuration-pro.md) - All Pro configuration options
- [Upgrading Pro versions](./updating.md) - Upgrading between Pro versions
-- [Add RSC to Your Pro App](./react-server-components/upgrading-existing-pro-app-to-rsc.md) - Add RSC support to an existing Pro installation
+- [Add RSC to Your Pro App](./react-server-components/upgrading-existing-pro-app.md) - Add RSC support to an existing Pro installation
- [React Server Components Tutorial](./react-server-components/tutorial.md) - Learn RSC concepts step by step|
Full review — two blocking issues, three non-blocking (see inline comments on specific lines) BLOCKING 1: CVE identifiers are unverifiable (line 34) BLOCKING 2: Duplicate guide — upgrading-existing-pro-app.md already exists Non-blocking (inline comments posted on specific lines):
|
- Remove fabricated CVE identifiers, link to v16.2.0 release notes instead - Disambiguate react-on-rails-rsc vs react version in callout - Fix NPM dependency listing: react-server-dom-webpack is vendored, not separate - Soften idempotency claim to accurately reflect regex-based patching behavior - Fix manifest verification paths: server-client manifest is in ssr-generated/ - Add dev-server note about client manifest being in memory Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Review: Add standalone RSC upgrade guide for existing Pro appsThis is a documentation-only PR so the main concerns are accuracy and consistency with existing docs. Critical: Duplicate documentation file
The RSC index page (
Recommendation: Rather than shipping two conflicting upgrade guides, either update the existing Other issues (detailed inline)
Minor note (pre-existing, outside this PR scope)
|
Delete upgrading-existing-pro-app-to-rsc.md (orphaned duplicate) and consolidate on upgrading-existing-pro-app.md. Fix Pro gem version requirement from v16.4.0+ to v4.0.0+ to match index.md, add missing React on Rails OSS gem v16.0.0+ prerequisite row, and update all references that pointed to the deleted file. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 68e212fd7e
ℹ️ 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".
ReviewGood doc addition overall — well-structured with clear prerequisites, generator walkthrough, legacy webpack compatibility explanation, and troubleshooting. Version numbers are now correct (v4.0.0+ for Pro gem, v16.0.0+ for OSS gem), and all cross-document links resolve. One concrete bugThe "Generated Files Check" section (Step 3) tells users to look for Left an inline comment with a suggested fix. Minor
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/pro/react-server-components/upgrading-existing-pro-app.md`:
- Around line 13-14: Update the incorrect minimum version for the React on Rails
Pro gem in the table entry that currently shows "v4.0.0+" (the "React on Rails
Pro gem" row) to the correct baseline used across Pro docs—replace "v4.0.0+"
with "v16.0.0+" (or the project's actual minimum stable version for RSC support)
so it matches other Pro upgrade documentation; verify and adjust any other
references to the React on Rails Pro gem version to ensure consistency across
the Pro docs.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 8b45a80b-2e52-4a3a-b9d9-abb6e06ba4c7
📒 Files selected for processing (4)
docs/README.mddocs/pro/react-server-components/tutorial.mddocs/pro/react-server-components/upgrading-existing-pro-app.mddocs/pro/upgrading-to-pro.md
✅ Files skipped from review due to trivial changes (3)
- docs/pro/react-server-components/tutorial.md
- docs/README.md
- docs/pro/upgrading-to-pro.md
Review: Add standalone RSC upgrade guide for existing Pro appsGood documentation addition overall — the prerequisite table expansion and webpack export shape explanation are well-structured. A few issues worth addressing: Broken link (potential 404)In the prerequisites table, Package manager consistencyThe prerequisites table was helpfully broadened to show
Both should offer the same three-manager alternatives shown in the table. Removed requirement note in legacy export shape sectionThe old text warned "These apps must upgrade to v16.4.0+ before adding RSC". Removing it silently changes the documented requirement. If the RSC generator now handles both export shapes without a manual migration (which the new |
- Pro gem: v4.0.0+ → v16.4.0+ (Pro uses 16.x versioning scheme) - OSS gem: v16.0.0+ → v16.4.0+ (RSC generator added in 16.4.0) - rsc-bundle.js: moved from webpack output dir to server_bundle_output_path (default: ssr-generated/), matching rsc-preparing-app.md verification checklist Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Review: Add standalone RSC upgrade guide for existing Pro appsThis is a well-structured documentation PR. The new upgrade guide covers the key areas a user would need: prerequisites, generator usage, webpack export compatibility, and verification steps. A few specific issues worth addressing: 1. Broken directory link (line 16 of The prerequisites table links to 2. Package manager inconsistency The prerequisites table correctly lists npm/yarn/pnpm alternatives for check commands, but the React upgrade snippet on line 25 only shows pnpm: pnpm add react@~19.0.4 react-dom@~19.0.4Users on npm or Yarn will need to translate this. Either show all three variants (as done in the table) or add a note that pnpm is the project's default and npm/Yarn users should substitute accordingly. Same applies to line 204 in the troubleshooting section. 3. Idempotency claim (line 38) The guide states the generator is "idempotent -- safe to run multiple times." A previous review cycle softened this claim because the generator uses regex-based patching which may produce unintended results on re-runs. If the claim has since been verified, it's fine — but if regex-based patching still applies, this should be qualified (e.g., "generally safe to re-run; review any modifications to existing files before committing"). Overall the content is accurate and well-organized. The webpack export compatibility section is particularly helpful for teams with older setups. |
|
Good documentation addition overall. The guide is well-structured and covers the right material. The corrections across multiple commits (removing fabricated CVEs, fixing file paths, consolidating the duplicate) show good iteration. Three issues to address: 1. React version inconsistency in the prerequisites table -- The Expected column says '19.0.x (see release notes for latest support)' but the callout below says '19.0.4+ recommended, 19.0.0-19.0.3 have known security vulnerabilities'. The table implies any 19.0.x is acceptable. The Expected column should say '19.0.4+' to surface the security guidance at the point of the check. Also, the 16.4.0.md release notes link does not mention React version support ranges — 16.2.0.md or rsc-preparing-app.md would be more accurate targets. 2. Package manager inconsistency -- The prerequisites table was correctly expanded to show npm/yarn/pnpm variants, but two other places still assume pnpm only: the React upgrade command on line 25 (pnpm add react@~19.0.4 react-dom@~19.0.4) and the troubleshooting hint on line 206 (pnpm add react-on-rails-rsc). Users following npm/yarn paths will hit pnpm-only commands at the next step. 3. Unqualified idempotency claim -- Line 38 says 'The generator is idempotent -- safe to run multiple times.' An earlier commit (2af1e63) softened this claim specifically because the generator uses regex-based patching. Running it twice on an already-patched file may double-apply the patch or not recognize the already-modified shape. The current wording reverts to the strong claim. Qualifying it ('generally safe to re-run') or adding a caveat about already-modified configs would be more accurate. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Review: Add standalone RSC upgrade guide for existing Pro appsOverall this is a solid documentation improvement. The multi-package-manager support in the prerequisites table, the explicit 19.0.4+ minimum with security context, and the corrected rsc-bundle.js output path location are all good changes. Consistency gap in the Troubleshooting section (line 207, not in diff): This line still says "React 19.0.x" (should be 19.0.4+ to match the updated prerequisites) and is pnpm-only (inconsistent with the table that now shows npm/yarn/pnpm). Suggested fix: change to "RSC requires React 19.0.4+. Check with index.md inconsistency (not changed by this PR): Pnpm-only install command: The React upgrade command at line 25 only shows pnpm, but the prerequisites table now shows all three package managers — see inline comment. Nits:
|
The generator patches existing files via regex transforms that can fail silently on customized configs, so "idempotent" overstates the guarantee. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Good documentation improvement overall. The PR correctly addresses the package-manager-agnostic feedback from previous reviews and improves accuracy (file output paths, React version security context). A few issues worth addressing: (1) Inconsistency in React version requirement: the prerequisites table and upgrade note now correctly say 19.0.4+, but the Troubleshooting section (line 207) still refers to 'React 19.0.x' as the requirement. Also, docs/pro/react-server-components/index.md (not changed by this PR) still says 'React 19.0.x (19.1.x and later are not yet supported)' -- should get the same 19.0.4+ update. (2) React upgrade command is pnpm-only: the prerequisites table now shows npm/yarn/pnpm alternatives for every check command, but the upgrade command (line 25) only shows pnpm. Should include npm/yarn equivalents for consistency. (3) Minor: line 28 uses 19.0.0--19.0.3 (double hyphen as range separator). Rendered Markdown does not auto-convert this -- consider 'versions earlier than 19.0.4' for clarity. |
## Summary - replace dead `https://pro.reactonrails.com` links with the live canonical Pro docs landing page at `https://reactonrails.com/docs/pro/` - update the one user-facing runtime warning in `ReactOnRails::Utils` to stop sending users to the failing subdomain - keep the scope limited to non-overlapping files outside the active docs PRs ## Scope notes - Supports shakacode/reactonrails.com#59 - Intentionally does not touch `react_on_rails/lib/generators/react_on_rails/pro_setup.rb`, which is already tracked by #2575 - Intentionally does not touch the stale `/pro` page content / `docs/pro/react-on-rails-pro.md`, which is tracked by #2838 - Intentionally excludes files already being modified in active PRs: #2610, #2651, #2675, #2831, and #2850 ## Validation Passed: - `bundle exec rubocop react_on_rails/lib/react_on_rails/utils.rb` - `git diff --check` - `git diff --name-only origin/main...HEAD | rg '\.md$' | xargs pnpm dlx [email protected] --check` - custom local relative-link scan across the changed markdown files - `curl -I -L` checks showing: - `https://reactonrails.com/docs/pro/` -> `200` - `https://pro.reactonrails.com` -> `500` <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: changes are documentation link updates plus a single user-facing warning string, with no behavioral impact beyond directing users to a new URL. > > **Overview** > Updates documentation to replace references to the dead `https://pro.reactonrails.com` site with the canonical Pro landing page at `https://reactonrails.com/docs/pro/` across the README and multiple OSS docs. > > Also updates the `ReactOnRails::Utils.immediate_hydration_pro_install_warning` message to point users at the new Pro docs URL when `immediate_hydration: true` is used without the Pro gem. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 457f7d5. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated React on Rails Pro documentation links across the README, API references, feature guides, configuration documentation, migration guides, release notes, and installation messages to consistently direct users to the new centralized Pro documentation hub for improved navigation and accessibility. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary This docs cleanup pass aligns repo docs and user-facing help output with the current published docs structure. Changes in this PR: - replace stale docs-route references in runtime/help output with the current docs paths - replace legacy Pro wiki links and stale external references in OSS docs - document current `ReactOnRails.render` return behavior for React 18+ vs React 16/17 - update internal contributor guidance to point at the canonical Pro docs home ## Scope notes - Closes #2839 - Partial #2838 - Intentionally excludes files already being modified in active docs PRs: #2610, #2651, #2675, and #2831 ## Validation Passed: - `bundle exec rubocop react_on_rails/lib/react_on_rails/configuration.rb react_on_rails/lib/react_on_rails/doctor.rb react_on_rails/lib/react_on_rails/packer_utils.rb react_on_rails/lib/react_on_rails/packs_generator.rb react_on_rails/lib/react_on_rails/server_rendering_js_code.rb react_on_rails/lib/tasks/generate_packs.rake react_on_rails/spec/dummy/spec/packs_generator_spec.rb` - `git diff --name-only origin/main...HEAD | rg '\.md$' | xargs pnpm dlx [email protected] --check` - `git diff --check` - custom local relative-link scan across the changed markdown files - `curl -I -L` checks for `https://invite.reactrails.com`, `https://jsdoc.app/`, and `https://reactonrails.com/docs/pro/` Not run: - `bundle exec rspec react_on_rails/spec/dummy/spec/packs_generator_spec.rb` - blocked in this clean worktree because the dummy-app spec loads `rails_helper` from the dummy app environment and that bundle/setup is not present here <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: changes are limited to documentation text and user-facing help/error message URLs, with no behavioral code changes. > > **Overview** > Updates docs and in-tool messaging to match the reorganized `reactonrails.com` documentation structure, replacing legacy wiki/old guide URLs across OSS guides, Pro references, and generator docs. > > Clarifies the `ReactOnRails.render` API docs to reflect React 18+ root return behavior vs React 16/17, and adds guidance warning that repeated calls on the same DOM node are not deduplicated. > > Refreshes community/support links (Slack invite, JSDoc) and updates several runtime error/help messages and corresponding specs to point at the new canonical doc routes. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 296ecc1. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated many guide links to the reorganized documentation site (including Pro docs and upgrade/migration paths). * Clarified API docs for render behavior across React versions and added guidance about repeated renders. * Replaced community Slack invite/link and updated external JSDoc reference. * Adjusted error/help message and test links to point to the correct docs. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
…olve-2833 * origin/main: docs: fix profiling node renderer command (#2863) generators: point Pro install fallback to upgrade guide (#2868) Add RSC Flight payload optimization guide (Article 7) (#2827) Migrate from deprecated Async::Variable to Async::Promise (#2832) docs: turn pro quick start into a gateway (#2862) Fix upload-assets endpoint duplicating bundles across directories (#2768) docs: fix stale docs links and help URLs (#2850) docs: replace dead pro.reactonrails.com links (#2851) docs: refresh generator and helper URLs (#2852) Add standalone RSC upgrade guide for existing Pro apps (#2831) Raise docs version floor to 16.4.0 in install/demo guidance (#2610) # Conflicts: # CHANGELOG.md
…olve-2849 * origin/main: docs: fix profiling node renderer command (#2863) generators: point Pro install fallback to upgrade guide (#2868) Add RSC Flight payload optimization guide (Article 7) (#2827) Migrate from deprecated Async::Variable to Async::Promise (#2832) docs: turn pro quick start into a gateway (#2862) Fix upload-assets endpoint duplicating bundles across directories (#2768) docs: fix stale docs links and help URLs (#2850) docs: replace dead pro.reactonrails.com links (#2851) docs: refresh generator and helper URLs (#2852) Add standalone RSC upgrade guide for existing Pro apps (#2831) Raise docs version floor to 16.4.0 in install/demo guidance (#2610) # Conflicts: # CHANGELOG.md
…olve-2835 * origin/main: (21 commits) docs: fix profiling node renderer command (#2863) generators: point Pro install fallback to upgrade guide (#2868) Add RSC Flight payload optimization guide (Article 7) (#2827) Migrate from deprecated Async::Variable to Async::Promise (#2832) docs: turn pro quick start into a gateway (#2862) Fix upload-assets endpoint duplicating bundles across directories (#2768) docs: fix stale docs links and help URLs (#2850) docs: replace dead pro.reactonrails.com links (#2851) docs: refresh generator and helper URLs (#2852) Add standalone RSC upgrade guide for existing Pro apps (#2831) Raise docs version floor to 16.4.0 in install/demo guidance (#2610) Fix release script: require changelog, fix RC version computation (#2848) Bump version to 16.5.0 Bump version to 16.5.0.rc.0 Update CHANGELOG.md for 16.5.0.rc.0 (#2847) Docs: add memory leak prevention guide for Node Renderer SSR (#2845) Docs: fix RSC migration gaps found during real-world migration (#2842) Add common mistakes sections to RSC migration guides (#2826) fix: preserve runtime env vars across Bundler.with_unbundled_env (#2836) Skip Pro CI workflows for Dependabot PRs (#2825) ... # Conflicts: # CHANGELOG.md
## Summary - Stamped `### [16.5.1] - 2026-03-27` with two Pro fixes (PRs #2872, #2768) - Removed the `### [16.5.0.rc.0]` section (was already released as 16.5.0 stable) - Consolidated the 16.5.0 section with full entries (previously just said "no changes from rc.0") - Updated diff links at bottom of file ## Skipped PRs (docs/internal only) #2856, #2860, #2857, #2859, #2864, #2870, #2863, #2868, #2827, #2862, #2850, #2851, #2852, #2831, #2610, #2848 ## Test plan - [ ] Verify CHANGELOG.md formatting and diff links are correct - [ ] Run `rake release` (no args) after merge to publish 16.5.1 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: changes are limited to `CHANGELOG.md` release notes and version/compare links with no runtime code modifications. > > **Overview** > Documents the `16.5.1` release by adding a new section under *Unreleased* with two **[Pro]** fixes (missing packaged rake tasks and avoiding duplicated bundles during remote renderer asset uploads). > > Cleans up the `16.5.0` entry by removing the `16.5.0.rc.0` section and updating the compare-link footer so `unreleased` now starts from `v16.5.1` and `16.5.0` compares from `v16.4.0`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 9a6b224. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated changelog to document version 16.5.1 release with consolidated version history and updated comparison links. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
## Summary - Stamped `### [16.5.1] - 2026-03-27` with two Pro fixes (PRs #2872, #2768) - Removed the `### [16.5.0.rc.0]` section (was already released as 16.5.0 stable) - Consolidated the 16.5.0 section with full entries (previously just said "no changes from rc.0") - Updated diff links at bottom of file ## Skipped PRs (docs/internal only) #2856, #2860, #2857, #2859, #2864, #2870, #2863, #2868, #2827, #2862, #2850, #2851, #2852, #2831, #2610, #2848 ## Test plan - [ ] Verify CHANGELOG.md formatting and diff links are correct - [ ] Run `rake release` (no args) after merge to publish 16.5.1 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: changes are limited to `CHANGELOG.md` release notes and version/compare links with no runtime code modifications. > > **Overview** > Documents the `16.5.1` release by adding a new section under *Unreleased* with two **[Pro]** fixes (missing packaged rake tasks and avoiding duplicated bundles during remote renderer asset uploads). > > Cleans up the `16.5.0` entry by removing the `16.5.0.rc.0` section and updating the compare-link footer so `unreleased` now starts from `v16.5.1` and `16.5.0` compares from `v16.4.0`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 9a6b224. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated changelog to document version 16.5.1 release with consolidated version history and updated comparison links. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>


Summary
docs/pro/react-server-components/upgrading-existing-pro-app-to-rsc.mdreact_on_rails:rscgenerator workflow for existing Pro installationsmodule.exports = configureServer) vs current (module.exports = { default: configureServer, extractLoader }) webpack export styles and how the generated RSC config handles bothCloses #2425
Test plan
rscWebpackConfig.js.tttemplate code🤖 Generated with Claude Code
Note
Low Risk
Low risk: documentation-only changes that add a new RSC upgrade guide and update cross-links, with no runtime/code behavior impact.
Overview
Adds a new Pro documentation page,
docs/pro/react-server-components/upgrading-existing-pro-app.md, detailing how to enable React Server Components in an existing Pro app via the standalonereact_on_rails:rscgenerator, including prerequisites, legacy vs current webpack export-shape compatibility, and a verification/troubleshooting checklist.Updates docs navigation and onboarding by linking this guide from
docs/README.md, adding a callout in the RSC tutorial, and splitting the “Next Steps” section indocs/pro/upgrading-to-pro.mdto surface both the upgrade guide and the tutorial.Written by Cursor Bugbot for commit 5889bf5. This will update automatically on new commits. Configure here.
Summary by CodeRabbit