Skip to content

Split docs and migration content into focused update#2896

Closed
justin808 wants to merge 1 commit intomainfrom
split/docs-migration-content
Closed

Split docs and migration content into focused update#2896
justin808 wants to merge 1 commit intomainfrom
split/docs-migration-content

Conversation

@justin808
Copy link
Copy Markdown
Member

@justin808 justin808 commented Mar 30, 2026

Summary

  • split docs-heavy content from the giant migration branch into a docs-only PR
  • include OSS and Pro docs updates, migration guide revisions, and README/agent-guide content updates
  • keep runtime/CI code changes out of this PR

Scope

  • docs/**
  • README.md
  • AGENTS_USER_GUIDE.md
  • internal/contributor-info/create-react-on-rails-app-smoke-testing.md
  • analysis/open-issue-deep-dive/wave-3-long-tail.md
  • llms.txt

Testing

  • pre-commit hook ran Prettier on all changed markdown files ✅

Note

Low Risk
Documentation-only changes, but they update stated prerequisites and Pro/Node Renderer setup guidance, so incorrect edits could mislead users during installs or upgrades.

Overview
Updates docs across the repo to refresh prerequisites and Pro references, including bumping recommended minimums to Ruby 3.2 / Node 20 and standardizing many Pro links to pro.reactonrails.com / reactonrails.com/pro.

Reworks several guides for clarity and focus: adds a new Pro quick-start-from-scratch walkthrough, trims/rewrites sections in the alternatives comparison and RSC migration docs, and adjusts generator/install notes (e.g., React 19.0.x requirement and gem version constraints).

Restructures deployment documentation by simplifying docs/oss/deployment/README.md and re-adding archived deployment pages (capistrano-deployment.md, elastic-beanstalk.md), plus multiple Node Renderer doc edits (Heroku, debugging, JS config) that change recommended commands and defaults.

Written by Cursor Bugbot for commit 085e515. This will update automatically on new commits. Configure here.

Summary by CodeRabbit

  • Documentation

    • Updated system requirements: Ruby 3.2+ and Node.js 20+ (previously 3.0+ and 18+).
    • Added deployment guides for Capistrano and Elastic Beanstalk.
    • Simplified Node Renderer setup guidance and troubleshooting documentation.
    • Clarified React Server Components (RSC) compatibility and setup procedures.
    • Restructured Pro documentation links and consolidated external resource references.
  • Chores

    • Updated Pro feature documentation URLs and navigation paths across guides.
    • Refreshed package manager examples to standardize on Yarn for consistency.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 30, 2026

Walkthrough

Updated React on Rails documentation repository-wide: raised minimum version requirements (Ruby 3.2+, Node 20+), consolidated Pro documentation links from relative internal paths to absolute external URLs (https://pro.reactonrails.com), simplified Node Renderer and deployment guides, narrowed package-manager guidance to Yarn-focused, and removed or condensed sections covering memory management, troubleshooting, and common mistakes across migration and configuration docs.

Changes

Cohort / File(s) Summary
Root-Level Documentation
README.md, AGENTS_USER_GUIDE.md, llms.txt
Updated minimum supported versions (Ruby 3.2+, Node 20+), replaced Pro documentation links with absolute URLs, revised generator commands and Pro feature guidance.
Navigation and Index Docs
docs/README.md
Consolidated alternatives comparison links, replaced changelog link with internal documentation path, simplified Pro feature section routing to OSS guides.
API Reference
docs/oss/api-reference/*
Updated Pro feature links from relative paths to absolute https://pro.reactonrails.com URLs, adjusted version constraints and React compatibility notes.
Core Concepts
docs/oss/core-concepts/*
Updated React on Rails Pro references to external wiki or absolute URLs; removed RSC-related railsContext warning documentation.
Configuration Docs
docs/oss/configuration/*
Updated Pro feature links to absolute URLs, adjusted configuration reference paths.
Building Features – General
docs/oss/building-features/bundle-caching.md, caching.md, code-splitting.md, extensible-precompile-pattern.md, images.md, testing-configuration.md, turbolinks.md, how-to-conditionally-server-render-based-on-device-type.md, i18n.md
Updated Pro callout links to absolute URLs, adjusted minimum version requirements (16.2+ for some features), changed package-manager guidance to Yarn-focused, updated image asset path configuration.
Building Features – Node Renderer
docs/oss/building-features/node-renderer/basics.md, debugging.md, error-reporting-and-tracing.md, heroku.md, js-configuration.md, troubleshooting.md
Removed memory management sections, changed minimum Node requirement (14+), simplified Procfile guidance, replaced multi–package-manager examples with Yarn-only, updated Pro links to absolute URLs, restructured debugging workflows.
Building Features – Integration
docs/oss/building-features/rails-webpacker-react-integration-options.md
Updated Pro link to absolute URL.
Getting Started Guides
docs/oss/getting-started/quick-start.md, create-react-on-rails-app.md, installation-into-an-existing-rails-app.md, oss-vs-pro.md, common-issues.md, tutorial.md, comparing-react-on-rails-to-alternatives.md, comparison-with-alternatives.md, pro-quick-start.md
Updated version requirements and prerequisites, removed/updated Pro feature guidance and setup options, consolidated alternative-comparison sections, simplified command examples, updated Slack invite link.
Deployment Guides
docs/oss/deployment/README.md, server-rendering-tips.md, troubleshooting.md, troubleshooting-build-errors.md, capistrano-deployment.md, elastic-beanstalk.md
Added new Capistrano and Elastic Beanstalk deployment guides, removed memory guidance and troubleshooting sections, replaced package-manager examples with Yarn-focused, updated Pro links and version constraints.
Migration / RSC Guides
docs/oss/migrating/migrating-to-rsc.md, rsc-component-patterns.md, rsc-context-and-state.md, rsc-data-fetching.md, rsc-preparing-app.md, rsc-third-party-libs.md, rsc-troubleshooting.md
Removed extensive "Common Mistakes" and troubleshooting sections, simplified streaming and data-fetching guidance, updated Pro links, removed RSC payload optimization references, consolidated error catalogs.
Pro Documentation
docs/pro/home-pro.md, installation.md, js-memory-leaks.md, profiling-server-side-rendering-code.md, react-on-rails-pro.md, updating.md, react-server-components/create-without-ssr.md, react-server-components/purpose-and-benefits.md, react-server-components/tutorial.md, troubleshooting.md
Restructured Pro landing page, updated version constraints and installation guidance, condensed memory-leak documentation, removed overmind-based profiling steps, updated RSC setup instructions, simplified troubleshooting.
Miscellaneous
docs/oss/misc/style.md, docs/oss/misc/updating-dependencies.md, internal/contributor-info/create-react-on-rails-app-smoke-testing.md
Updated JSDoc reference link, replaced pnpm–focused dependency guidance with Yarn-only workflow, simplified contributor smoke-testing instructions.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

documentation, docs-cleanup, review-needed, P3

Suggested reviewers

  • AbanoubGhadban
  • ihabadham

Poem

🐰 A hare hops through docs with glee,
Linking Pro to URLs with spree,
Node twenty tall, Ruby three-plus strong,
Yarn skips along, the paths now throng. 🌿
Version bumps and links anew,
Documentation shines bright and true!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Split docs and migration content into focused update' accurately describes the main objective of this PR: extracting documentation and migration guide changes into a separate, focused pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch split/docs-migration-content

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai bot added review-needed documentation docs-cleanup Documentation cleanup or migration P3 Parked priority labels Mar 30, 2026
@claude
Copy link
Copy Markdown
Contributor

claude bot commented Mar 30, 2026

PR Review: Split docs and migration content

Good documentation housekeeping overall - the link consolidation toward pro.reactonrails.com is clean and consistent. However, I found several factual issues and one security concern that need attention before merging.

Bugs / Incorrect Facts

  1. Node.js version regression in basics.md - The PR bumps Node.js requirements to 20+ everywhere else, but docs/oss/building-features/node-renderer/basics.md now reads 'Make sure you have Node.js version 14 or higher'. This contradicts the project's own updated prerequisites.

  2. prerender_caching default is wrong in basics.md - The new text says 'Leave the default of config.prerender_caching = true' but the actual default is false. The previous text correctly described the option as opt-in. This will mislead new users into thinking caching is already on when it is not.

  3. images alias claim is incorrect in images.md - The new text asserts 'images is a defined alias' pointing to /client/app/assets/images/. The old text was accurate: React on Rails does not define this alias by default. Claiming it exists will cause confusing errors for users who rely on this.

  4. Version downgrade in extensible-precompile-pattern.md and i18n.md - 16.4.0 changed to 16.2 in both files. If the precompile hook feature was introduced in 16.4.0, lowering the stated requirement could send users to a version that does not support it. Needs verification against the CHANGELOG.

Security Concern

  1. Password enforcement documentation removed in js-configuration.md - The old text explicitly warned that in non-dev/test environments the renderer refuses to start without a password. This was replaced with the vague 'If no password is set, no authentication will be required.' If the code behavior has not changed, the new text is incorrect. If it has changed, this is a security regression that needs a migration note.

Quality Issues

  1. Inconsistent Pro link destinations - Several files (redux-store-api.md, client-vs-server-rendering.md, how-react-on-rails-works.md, react-server-rendering.md, server-rendering-tips.md) link Pro users to https://github.com/shakacode/react_on_rails/wiki while the rest of the PR standardizes on https://pro.reactonrails.com. These stray wiki links should be updated.

  2. REACT_ON_RAILS_PRERENDER_OVERRIDE documentation silently removed - The env var still exists in the codebase (lib/react_on_rails/react_component/render_options.rb). Removing it from view-helpers-api.md without a deprecation note leaves users with no way to discover this feature.

  3. Critical memory management warnings removed - The basics.md memory management section and two tips in server-rendering-tips.md (NODE_OPTIONS=--max-old-space-size, module-level state warning) were removed without replacement. Users routinely hit OOM in production due to this behavior. Even if detail moved to the memory-leaks guide, a brief pointer should remain.

  4. Node renderer debugging workflow replaced with outdated yalc/yarn steps - The debugging.md changes replace the pnpm-based monorepo workflow with older instructions referencing yalc, a top-level yarn, and nps scripts that no longer reflect the current repo structure.

  5. JS configuration example switched to ES modules without context - The js-configuration.md simple example now uses import syntax but instructs users to run it as 'node ./node-renderer.js'. Plain Node.js will not run ESM without type:module in package.json or a .mjs extension.

```
2. Make sure you have **Node.js 18+** and a JavaScript package manager such as **npm**, **pnpm**, **Yarn**, or **bun**.
3. Initialize a Node application and install the `react-on-rails-pro-node-renderer` package.
2. Make sure you have **Node.js** version **14** or higher and **Yarn** installed.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Node.js 14 is end-of-life and contradicts the project's own updated requirement. This PR bumps prerequisites to Node.js 20+ everywhere else.

Suggested change
2. Make sure you have **Node.js** version **14** or higher and **Yarn** installed.
2. Make sure you have **Node.js 20+** and a JavaScript package manager such as **npm**, **pnpm**, **Yarn**, or **bun**.


1. Set `config.server_renderer = "NodeRenderer"`
2. Decide whether to enable `config.prerender_caching = true`. The default is `false`; turn it on only if you want Rails cache-backed SSR result caching and your cache is configured for the additional load.
2. Leave the default of `config.prerender_caching = true` and ensure your Rails cache is properly configured to handle the additional cache load.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incorrect — the default for prerender_caching is false, not true. The removed text correctly described it as opt-in. Stating the wrong default here will cause confusion for users who are surprised to find caching is not active.

Suggested change
2. Leave the default of `config.prerender_caching = true` and ensure your Rails cache is properly configured to handle the additional cache load.
2. Optionally enable `config.prerender_caching = true` if you want Rails cache-backed SSR result caching and your cache is configured for the additional load. The default is `false`.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 085e515949

ℹ️ 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".


# Install nodejs
echo "install nodejs"
curl --silent --location https://rpm.nodesource.com/setup_6.x | sudo bash -
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Replace NodeSource 6.x installer in EB deployment script

This new Elastic Beanstalk guide installs Node via setup_6.x, which provisions an end-of-life Node 6 runtime. Users following this document will end up with an unsupported Node version that is incompatible with current React on Rails tooling (the repo docs now require modern Node) and may fail during build/runtime; this should be updated to a current LTS install path.

Useful? React with 👍 / 👎.

@@ -37,44 +36,4 @@ node packages/create-react-on-rails-app/bin/create-react-on-rails-app.js my-app
node packages/create-react-on-rails-app/bin/create-react-on-rails-app.js my-rsc-app --rsc --template javascript --package-manager pnpm
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore build step before manual create-app smoke test

The manual smoke-test commands run bin/create-react-on-rails-app.js, which loads ../lib/index.js (built output), but this updated section no longer tells contributors to rebuild first. When someone is testing local CLI changes from src/, these instructions can run stale lib code and produce misleading smoke-test results; add an explicit build step before the manual commands.

Useful? React with 👍 / 👎.

React on Rails does not define an `images` alias by default. If you want one, add it explicitly.
For example, if your images live in `app/javascript/images`, then `"images/foobar.jpg"` can point
to `app/javascript/images/foobar.jpg` with a custom alias like this:
**images** is a defined alias, so "images/foobar.jpg" would point to the file at
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incorrect. React on Rails does not define an images alias — this code block below is showing an example of how to add one yourself. Claiming it's "a defined alias" will mislead users into thinking the path just works out of the box.

Suggested change
**images** is a defined alias, so "images/foobar.jpg" would point to the file at
**images** is not defined as an alias by default. If you want one, add it explicitly. For example, to make `"images/foobar.jpg"` resolve to `/client/app/assets/images/foobar.jpg`:

In all other environments (`staging`, `production`, etc.), the renderer will refuse to start without an explicit password. Set `RENDERER_PASSWORD` in your environment or pass `password` in the config object.
1. **allWorkersRestartInterval** (default: `env.RENDERER_ALL_WORKERS_RESTART_INTERVAL`) - Interval in minutes between scheduled restarts of all workers. By default restarts are not enabled. If restarts are enabled, `delayBetweenIndividualWorkerRestarts` should also be set. **Recommended for production** — rolling restarts are the primary safety net against memory leaks from application code. See the [Memory Leaks guide](../../../pro/js-memory-leaks.md).
1. **delayBetweenIndividualWorkerRestarts** (default: `env.RENDERER_DELAY_BETWEEN_INDIVIDUAL_WORKER_RESTARTS`) - Interval in minutes between individual worker restarts (when cluster restart is triggered). By default restarts are not enabled. If restarts are enabled, `allWorkersRestartInterval` should also be set. Set this high enough so that not all workers are down simultaneously (e.g., if you have 4 workers and set this to 5 minutes, the full restart cycle takes 20 minutes).
If no password is set, no authentication will be required.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The removed text contained an important security contract: in staging/production environments the renderer refuses to start without a password. The new wording ("no authentication will be required") implies the renderer will happily run unauthenticated in production.

Please verify the actual runtime behavior:

  • If the code still enforces a password in production, restore the warning.
  • If the enforcement was intentionally removed, document the change explicitly and add a security advisory so users know to set RENDERER_PASSWORD manually.

```js
const path = require('path');
const { reactOnRailsProNodeRenderer } = require('react-on-rails-pro-node-renderer');
import path from 'path';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example switched to ES module syntax (import), but the setup instructions above say to run it with node ./node-renderer.js. Plain Node.js will throw SyntaxError: Cannot use import statement in a module unless:

  • package.json contains "type": "module", or
  • the file is renamed to .mjs

Either add a note about this requirement, or revert to the CommonJS (const { ... } = require(...)) syntax which works without any extra config — especially important for a copy-paste quickstart example.

Note: if you use the [mini_racer](https://github.com/rubyjs/mini_racer) runtime and run into a `ReferenceError: TextEncoder is not defined` error, see [this comment](https://github.com/shakacode/react_on_rails/issues/1457#issuecomment-1165026717) for a solution.

If you want to maximize the performance of your server rendering, then you want to use React on Rails Pro which uses NodeJS to do the server rendering. See the [docs for React on Rails Pro](../../pro/home-pro.md).
If you want to maximize the performance of your server rendering, then you want to use React on Rails Pro which uses NodeJS to do the server rendering. See the [docs for React on Rails Pro](https://github.com/shakacode/react_on_rails/wiki).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The GitHub wiki is not the right destination for Pro feature docs — it hasn't been the canonical Pro docs location for some time. This PR standardizes all other Pro links on https://pro.reactonrails.com, so this one should match.

Suggested change
If you want to maximize the performance of your server rendering, then you want to use React on Rails Pro which uses NodeJS to do the server rendering. See the [docs for React on Rails Pro](https://github.com/shakacode/react_on_rails/wiki).
If you want to maximize the performance of your server rendering, then you want to use React on Rails Pro which uses NodeJS to do the server rendering. See the [docs for React on Rails Pro](https://pro.reactonrails.com).

4. Look for growing `string`, `Object`, and `Array` counts — these typically point to module-level caches.

See the [Memory Leaks guide](../../../pro/js-memory-leaks.md) for common patterns and fixes.
1. cd to the top level of the project.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This debugging workflow (yalc, top-level yarn, nps renderer.debug) describes the old monorepo setup and does not match the current repo structure, which uses pnpm workspaces. Contributors following these steps won't get a working environment.

The removed content (using pnpm from react_on_rails_pro/spec/dummy) was accurate. If the Pro package has genuinely moved back to a yarn/yalc workflow, please verify with the current package.json files before finalizing this.

@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Mar 30, 2026

Greptile Summary

This PR splits a large documentation-and-migration branch into a focused docs-only update across 69 files, covering OSS guides, Pro docs, migration content, the README, AGENTS_USER_GUIDE.md, and llms.txt. Most changes are clean consolidations (updated Pro URLs to pro.reactonrails.com, bumped Ruby/Node minimums to 3.2+/20+, expanded pro-quick-start.md into a real guide, simplified comparison pages), but four issues need attention before merging:

  • Broken changelog linkdocs/README.md now links to ./oss/upgrading/changelog.md, a file that does not exist in the repository.
  • Stale pre-release versions in RSC setup docdocs/pro/react-server-components/create-without-ssr.md was overwritten with 15.0.0-alpha.2 / 4.0.0 install commands (previously correct 16.4.0 stable versions) and a note saying the versions aren't released yet.
  • Node.js 6 in restored Elastic Beanstalk guideelastic-beanstalk.md was restored from git history but still installs Node 6 (EOL 2019), directly contradicting the Node 20+ minimum updated elsewhere in this PR.
  • Missing bundle add in llms.txt — the base install snippet now starts with rails generate react_on_rails:install with no prior gem-add step; the generator will fail because react_on_rails isn't in the Gemfile yet.

Confidence Score: 3/5

Not safe to merge as-is — four P1 issues will actively mislead or break users following the docs.

The PR has four P1 findings: a broken internal link, stale pre-release version numbers replacing current stable ones in an actively-read RSC guide, a restored deployment guide that installs an EOL Node.js version that conflicts with the requirements updated in this same PR, and a missing gem-install step in the AI agent guide. Any one of these will result in a broken or misleading experience for users who follow the affected docs.

docs/pro/react-server-components/create-without-ssr.md (stale alpha versions), docs/oss/deployment/elastic-beanstalk.md (Node 6 EOL), docs/README.md (broken changelog link), llms.txt (missing bundle add step)

Important Files Changed

Filename Overview
docs/README.md Simplified Pro navigation section; introduced a broken link to ./oss/upgrading/changelog.md which does not exist.
llms.txt Removed bundle add react_on_rails --strict from base install snippet, leaving the generator step with no gem available; also removed valuable SSR memory-safety guidance.
docs/oss/deployment/elastic-beanstalk.md Restored from git history but still installs Node.js 6.x (EOL 2019) — incompatible with the Node 20+ minimum now required.
docs/pro/react-server-components/create-without-ssr.md Replaced current stable 16.4.0 install commands with stale 15.0.0-alpha.2 / 4.0.0 pre-release versions annotated as unreleased; will break RSC setup instructions.
docs/oss/getting-started/pro-quick-start.md Substantially expanded from a gateway stub into a full step-by-step Pro quick start with Node Renderer config; minor prerequisite version inconsistency (3.0+/18+ vs 3.2+/20+).
AGENTS_USER_GUIDE.md Updated Ruby/Node minimums to 3.2+/20+, consolidated Pro doc links to react-on-rails-pro.md, refined badge documentation.
README.md Updated Pro URL to pro.reactonrails.com, bumped minimum Ruby/Node requirements, and removed comparison table (now in separate docs).
docs/oss/misc/updating-dependencies.md Reverted from multi-package-manager guide (pnpm-default) back to yarn-only with hardcoded cd client directory, which doesn't match the current default app layout.
docs/oss/deployment/README.md Heavily simplified, dropping all navigation links; leaves the deployment section without a useful index of available guides.
docs/pro/react-on-rails-pro.md Replaced the concise feature overview with the older GitHub Sponsors pitch and fragment caching content; content is accurate but represents a narrative style change.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User finds React on Rails docs] --> B{OSS or Pro?}
    B -->|OSS| C[README.md / docs/README.md]
    B -->|Pro| D[docs/pro/react-on-rails-pro.md]

    C --> E[docs/oss/getting-started/quick-start.md]
    C --> F["docs/README.md Changelog link BROKEN: ./oss/upgrading/changelog.md does not exist"]

    D --> G[docs/pro/installation.md]
    D --> H["docs/oss/getting-started/pro-quick-start.md - Expanded step-by-step guide"]

    H --> I["docs/pro/react-server-components/create-without-ssr.md - Stale alpha versions 15.0.0-alpha.2"]

    E --> J["llms.txt AI agent install guide - Missing bundle add step"]

    C --> K["docs/oss/deployment/elastic-beanstalk.md - Installs Node.js 6 EOL 2019"]
Loading

Reviews (1): Last reviewed commit: "Split docs and migration content into fo..." | Re-trigger Greptile

- [Deployment and troubleshooting](./oss/deployment/README.md)
- [Configuration](./oss/configuration/README.md)
- [Changelog](https://github.com/shakacode/react_on_rails/blob/main/CHANGELOG.md)
- [Changelog](./oss/upgrading/changelog.md)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Broken link: changelog.md does not exist

The link ./oss/upgrading/changelog.md was added here, but no such file exists in the repository. Listing docs/oss/upgrading/ shows only upgrading-react-on-rails.md and release-notes/ — there is no changelog.md. This will result in a 404 for any user who clicks it.

The previous link pointed to the real file on GitHub:

Suggested change
- [Changelog](./oss/upgrading/changelog.md)
- [Changelog](https://github.com/shakacode/react_on_rails/blob/main/CHANGELOG.md)

Comment on lines 12 to 18

Note: These versions are not released yet, they are still in development. But they will have these versions when released.

```bash
# Pick one JS package manager command (Pro includes all base package functionality):
yarn add --exact [email protected]
# npm install --save-exact [email protected]
# pnpm add --save-exact [email protected]
# bun add --exact [email protected]

# Then add the Ruby gems:
bundle add react_on_rails --version "16.4.0" --strict
bundle add react_on_rails_pro --version "16.4.0" --strict
yarn add [email protected] [email protected]
bundle add [email protected] [email protected]
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Stale pre-release versions replace current stable versions

This diff replaces the current stable 16.4.0 install commands with very old pre-release versions (15.0.0-alpha.2 / 4.0.0) and even adds a note saying "these versions are not released yet, they are still in development." This will mislead users into attempting to install non-existent or incorrectly versioned packages.

The note and the alpha version numbers should be removed and the instructions should use the current stable version (or a ~> / ^ range). For example, the previous content used:

yarn add --exact [email protected]
bundle add react_on_rails --version "16.4.0" --strict
bundle add react_on_rails_pro --version "16.4.0" --strict

This needs to be corrected before merging to avoid breaking RSC setup instructions for all readers.

Comment on lines +31 to +33
# install yarn
wget https://dl.yarnpkg.com/rpm/yarn.repo -O /etc/yum.repos.d/yarn.repo;
yum -y install yarn;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Installs Node.js 6, which has been EOL since 2019

This script uses https://rpm.nodesource.com/setup_6.x to install Node.js 6. Node 6 reached end-of-life in April 2019. React on Rails now requires Node.js ≥ 20 (updated in README.md and AGENTS_USER_GUIDE.md in this same PR), so this guide will cause deployment failures for any user who follows it.

Additionally, this file was deliberately archived in the previous version of docs/oss/deployment/README.md with a link to the git history rather than being re-published as live documentation.

If this file is being restored, the Node version must be updated to at least 20.x, and the setup_6.x URL should be replaced accordingly.

Comment on lines 23 to 25
```bash
bundle add react_on_rails --strict
bundle exec rails generate react_on_rails:install
rails generate react_on_rails:install
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Missing bundle add step for base gem installation

The base installation snippet was changed from:

bundle add react_on_rails --strict
bundle exec rails generate react_on_rails:install

to just:

rails generate react_on_rails:install

The generator will fail immediately if react_on_rails is not in the Gemfile yet. Without the bundle add step, an agent or developer following this file will hit an unresolvable error at generator time. The bundle add step (or equivalent Gemfile edit + bundle install) must be preserved so the gem is available before the generator runs.

- **Starting a new Pro app from scratch?** Use [Pro Installation](../../pro/installation.md#fresh-installation).
- **Upgrading an existing React on Rails app?** Use [Upgrading from React on Rails to React on Rails Pro](../../pro/upgrading-to-pro.md).
- **Still deciding between OSS and Pro?** Review [React on Rails: OSS vs Pro Feature Comparison](./oss-vs-pro.md).
**Prerequisites:** Ruby 3.0+, Rails 7.0+, Node.js 18+, npm/yarn/pnpm
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Prerequisites inconsistent with updated minimum requirements

This line still lists "Ruby 3.0+, Rails 7.0+, Node.js 18+" as prerequisites, but within this same PR README.md was updated to "Ruby >= 3.2 (CI tested: 3.2 - 3.4)" and AGENTS_USER_GUIDE.md was updated to "Ruby 3.2+" / "Node.js 20+". The guide should reflect the same minimums.

Suggested change
**Prerequisites:** Ruby 3.0+, Rails 7.0+, Node.js 18+, npm/yarn/pnpm
**Prerequisites:** Ruby 3.2+, Rails 7.0+, Node.js 20+, npm/yarn/pnpm

Comment on lines +21 to 23
yarn outdated
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Hardcoded cd client may not match all app layouts

The previous version of this doc explicitly noted: "In current React on Rails apps, that is usually the app root rather than a client/ subdirectory." The new version hardcodes cd client in every example, which will confuse users whose package.json lives at the Rails root (the now-default layout). Consider adding a note that the directory depends on the project's layout, or defaulting to the root.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 19

🧹 Nitpick comments (9)
docs/oss/building-features/how-to-conditionally-server-render-based-on-device-type.md (1)

30-30: Use the canonical docs URL here for consistency.

This line still points to a repo blob while the nearby line already uses the canonical docs site. Consider switching both to https://reactonrails.com/docs/configuration/ to avoid split-link maintenance.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@docs/oss/building-features/how-to-conditionally-server-render-based-on-device-type.md`
at line 30, Replace the repository blob URL
'https://github.com/shakacode/react_on_rails/blob/main/docs/configuration/README.md'
in this file with the canonical docs URL
'https://reactonrails.com/docs/configuration/' so the link matches the nearby
canonical link and avoids split-link maintenance; update any identical
occurrences in the same file to the canonical URL to keep links consistent.
docs/oss/migrating/rsc-preparing-app.md (1)

507-507: Prefer explicit field whitelisting in the as_json example.

Using include: [:specs, :reviews] as-is can normalize over-serialization in migration docs. Consider showing a narrowed only: shape to model safer payload boundaries.

Also applies to: 517-517

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/oss/migrating/rsc-preparing-app.md` at line 507, The example uses
product.as_json(include: [:specs, :reviews]) which encourages broad
serialization; change it to explicitly whitelist fields (e.g., use
product.as_json(only: [...], include: { specs: { only: [...] }, reviews: { only:
[...] } })) so the props payload is limited and predictable; update the props
line (props: { product: ... }) to use as_json with only: and nested include-only
shapes instead of a bare include: list for both occurrences.
docs/oss/building-features/node-renderer/debugging.md (1)

17-24: Add npm/pnpm alternatives (or explicitly label this as repo-maintainer-only workflow).

The checklist is currently Yarn-only. In end-user docs under docs/, command guidance should be package-manager-agnostic unless this section is clearly scoped to internal maintainers.

Based 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/oss/building-features/node-renderer/debugging.md` around lines 17 - 24,
The steps in debugging.md are yarn-specific; update the instructions to be
package-manager-agnostic by adding equivalent npm and pnpm command alternatives
for each yarn command (e.g., for `yarn` add `npm install`/`pnpm install`, for
`yarn build:dev` add `npm run build:dev`/`pnpm run build:dev`, for `yarn start`
add `npm start`/`pnpm start`) and mention the same environment variable usage
(`RENDERER_LOG_LEVEL=debug`) works with Windows-compatible syntax when needed;
alternatively, if this workflow is intended only for repo maintainers,
explicitly label the file as maintainer-only and keep the yarn examples but add
a short note referencing the nps task `nps renderer.debug` and the
`spec/dummy/package.json` script `"node-renderer-debug"` so readers know where
to find the exact commands.
docs/oss/deployment/server-rendering-tips.md (1)

17-17: Use a direct Pro docs target instead of a generic wiki landing page.

Line 17 currently routes to a broad wiki URL, which makes users hunt for the right page. Prefer a direct Node renderer/Pro overview URL to keep this tip actionable.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/oss/deployment/server-rendering-tips.md` at line 17, Replace the generic
wiki link in the sentence "You can enable Node.js server rendering via [React on
Rails Pro]" with a direct React on Rails Pro documentation URL that specifically
covers the Node renderer or the Pro overview (i.e., point the link target to the
React on Rails Pro Node renderer/Pro overview doc in the react_on_rails docs
rather than the wiki landing page) so users land directly on the actionable Pro
documentation.
docs/pro/react-server-components/create-without-ssr.md (1)

16-23: Add npm and pnpm alternatives for these install commands.

The changed install section only shows Yarn commands. End-user docs in docs/ should provide npm, yarn, and pnpm options.

Suggested doc fix
 ```bash
- yarn add --exact [email protected]
+ yarn add --exact [email protected]
+ # or
+ npm install --save-exact [email protected]
+ # or
+ pnpm add --exact [email protected]
  bundle add [email protected] [email protected]
</details>

Based on learnings: End-user documentation under `docs/` should include npm, yarn, and pnpm instructions.

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @docs/pro/react-server-components/create-without-ssr.md around lines 16 - 23,
Update the install commands in
docs/pro/react-server-components/create-without-ssr.md so that the existing Yarn
lines (e.g., "yarn add [email protected] [email protected]"
and "yarn add [email protected] [email protected] [email protected]") are
followed by equivalent npm and pnpm alternatives (use --save-exact or --save
where appropriate for npm and --exact for pnpm) so users see three options
(yarn, npm, pnpm) for each installation step.


</details>

</blockquote></details>
<details>
<summary>docs/oss/getting-started/pro-quick-start.md (1)</summary><blockquote>

`43-50`: **Add package-manager-agnostic installation instructions.**

Lines 43-50 show only Yarn commands for initializing and installing Shakapacker:
```bash
yarn init
yarn add react-on-rails-pro-node-renderer

Based on learnings, "In all end-user documentation under docs/, ensure package-manager-agnostic installation instructions include npm, yarn, and pnpm. Reserve the pnpm-only policy for internal development files."

Please add npm and pnpm alternatives:

📦 Suggested package-manager-agnostic instructions
 ## Step 3: Install Shakapacker

 ```bash
 rails shakapacker:install

-## Step 4: Commit (required by generator)
+## Step 4: Init node application (if needed)
+
+If you don't have a package.json yet:
+
+bash +# npm +npm init -y + +# yarn +yarn init -y + +# pnpm +pnpm init +
+
+## Step 5: Commit (required by generator)


And update subsequent step numbers accordingly.

</details>

Based on learnings: In all end-user documentation under docs/, ensure package-manager-agnostic installation instructions include npm, yarn, and pnpm.

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @docs/oss/getting-started/pro-quick-start.md around lines 43 - 50, Update the
docs fragment that currently shows only Yarn commands under the heading "## Step
4: Commit (required by generator)" by replacing that heading with "## Step 4:
Init node application (if needed)" and adding package-manager-agnostic init
commands for npm and pnpm alongside the existing yarn init (npm init -y, yarn
init -y, pnpm init). Insert a brief conditional note "If you don't have a
package.json yet:" above the three init commands, then renumber the subsequent
heading ("## Step 5: Commit (required by generator)") and any following step
references accordingly to reflect the new step ordering; target the block
containing the yarn init/yarn add lines and the heading text to make these
edits.


</details>

</blockquote></details>
<details>
<summary>docs/oss/building-features/node-renderer/basics.md (1)</summary><blockquote>

`46-51`: **Restore package-manager-agnostic installation instructions.**

Lines 46-51 now show only Yarn commands, removing the previous npm/pnpm/bun options:

```bash
yarn init
yarn add react-on-rails-pro-node-renderer

This violates the established documentation guideline. Based on learnings: "In all end-user documentation under docs/, ensure package-manager-agnostic installation instructions include npm, yarn, and pnpm. Reserve the pnpm-only policy for internal development files."

Please restore package-manager-agnostic instructions:

📦 Suggested package-manager-agnostic instructions
-2. Make sure you have **Node.js** version **14** or higher and **Yarn** installed.
-3. Init node application and install the `react-on-rails-pro-node-renderer` package.
+2. Make sure you have **Node.js** version **14** or higher and a package manager (**npm**, **yarn**, or **pnpm**) installed.
+3. Init node application and install the `react-on-rails-pro-node-renderer` package:
+
    ```sh
+   # npm
+   npm init -y
+   npm install --save-exact react-on-rails-pro-node-renderer
+   
+   # yarn
    yarn init
    yarn add react-on-rails-pro-node-renderer
+   
+   # pnpm
+   pnpm init
+   pnpm add --save-exact react-on-rails-pro-node-renderer
    ```

Based 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/oss/building-features/node-renderer/basics.md` around lines 46 - 51, The
docs currently show only Yarn commands for installing
react-on-rails-pro-node-renderer; restore package-manager-agnostic installation
instructions by replacing the single Yarn block with three subsections (npm,
yarn, pnpm) that include the suggested commands: npm init -y and npm install
--save-exact react-on-rails-pro-node-renderer, yarn init and yarn add
react-on-rails-pro-node-renderer, and pnpm init and pnpm add --save-exact
react-on-rails-pro-node-renderer so the documentation once again covers npm,
yarn, and pnpm for the package installation step.
docs/pro/react-on-rails-pro.md (1)

19-19: Consider adding H2 heading before H3 for proper markdown structure.

Line 19 uses an H3 heading (###) directly after the H1 page title, skipping the H2 level:

# React on Rails Pro          ← H1
...
### Pro: Docs                 ← H3 (skips H2)

While this works visually, it violates markdown heading hierarchy best practices. Consider either:

  1. Change ### Pro: Docs to ## Pro: Docs (making all subsections H2), or
  2. Add an H2 section wrapper like ## Features before the H3 subsections
♻️ Option 1: Promote all subsections to H2
-### Pro: Docs
+## Pro: Docs

-### Pro: React Server Components  
+## Pro: React Server Components

-### Pro: Fragment Caching
+## Pro: Fragment Caching

-### Pro: Integration with Node.js for Server Rendering
+## Pro: Integration with Node.js for Server Rendering
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/pro/react-on-rails-pro.md` at line 19, The document currently uses an H3
heading "### Pro: Docs" directly under the H1 title; update the markdown to
restore proper heading hierarchy by either changing that heading text "### Pro:
Docs" to an H2 ("## Pro: Docs") or by adding an H2 wrapper (for example add "##
Features" or similar above the existing H3 and keep the "### Pro: Docs" as a
subsection); locate the heading string "Pro: Docs" in the file and apply one of
these two fixes consistently for other subsections if present.
docs/oss/building-features/node-renderer/js-configuration.md (1)

97-97: Prefer package-manager-agnostic run instructions in end-user docs.

Line 97 currently documents only yarn start. Please include npm and pnpm equivalents too.

Suggested doc wording
-`yarn start` will run the renderer.
+Run the renderer with your package manager:
+
+- `yarn start`
+- `pnpm start`
+- `npm run start`

Based 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/oss/building-features/node-renderer/js-configuration.md` at line 97, The
docs currently only show "yarn start"; update the end-user instruction to be
package-manager-agnostic by adding the npm and pnpm equivalents alongside the
existing yarn command (e.g., include "npm run start" and "pnpm start") so users
of any package manager can follow the same step; locate the string "yarn start"
in js-configuration.md and replace or expand it to list all three commands.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@AGENTS_USER_GUIDE.md`:
- Around line 35-36: The docs currently list strict prerequisites "ruby -v    #
Should be 3.2+" and "node -v    # Should be 20+" which use CI-floor minimums;
update these validator-floor minimums to "Ruby >= 3.0" and "Node >= 18" instead
(replace the version comments next to the "ruby -v" and "node -v" lines
accordingly) so the AGENTS_USER_GUIDE reflects supported floors rather than
CI-tested floors.

In `@docs/oss/api-reference/generator-details.md`:
- Around line 212-214: The current install note ("Add `gem 'react_on_rails_pro',
'>= 16.3.0'` ... Contact [email protected] for a license") implies a paid
license is required to run locally; update the wording to clarify that adding
the gem is optional for Pro features but a production license
(REACT_ON_RAILS_PRO_LICENSE) is only required for production deployments —
evaluation, development, testing and CI do not require a paid key — and keep the
contact ([email protected]) as the channel for obtaining a production license
or questions; reference the Gemfile gem declaration (`gem 'react_on_rails_pro',
'>= 16.3.0'`) and the environment variable name (`REACT_ON_RAILS_PRO_LICENSE`)
so the change is applied to the same explanatory bullet points.

In `@docs/oss/building-features/i18n.md`:
- Line 139: The docs line currently instructs adding dependencies to
"client/package.json", which is too specific; update the phrase in
docs/oss/building-features/i18n.md (the line containing "Add `react-intl` &
`intl` to `client/package.json`") to the more general wording "Add `react-intl`
& `intl` to your `package.json`" so the guidance applies to both modern
(root-level package.json) and legacy (client/) project structures.

In `@docs/oss/building-features/images.md`:
- Around line 37-44: The documentation wrongly asserts that the "images" alias
exists by default; update the text around the resolve.alias snippet to state
that this is an example showing how to add an alias (not a built-in), e.g.
explain that users must add the resolve.alias entry (images ->
join(process.cwd(), 'app','assets','images')) to their webpack config if they
want to import "images/..." paths, or remove the claim entirely so it no longer
implies a default alias exists. Ensure you reference the resolve: { alias: {
images: join(process.cwd(), 'app', 'assets', 'images') } } example and clarify
it is optional user configuration.

In `@docs/oss/building-features/node-renderer/js-configuration.md`:
- Around line 65-71: The snippet uses ESM imports but still references __dirname
(used in serverBundleCachePath via path.resolve), which is undefined in ES
modules; update the example to derive __dirname from import.meta.url (e.g.,
using fileURLToPath(import.meta.url) and path.dirname) or use new URL-based
dirname resolution so serverBundleCachePath is computed from a valid directory
value when using the reactOnRailsProNodeRenderer example and path.resolve.

In `@docs/oss/core-concepts/react-server-rendering.md`:
- Line 15: Replace the GitHub wiki link used in the sentence referencing React
on Rails Pro — specifically change the URL string
"https://github.com/shakacode/react_on_rails/wiki" to the canonical Pro docs URL
"https://pro.reactonrails.com" in the
docs/oss/core-concepts/react-server-rendering.md content so the Pro destination
is standardized across the docs.

In `@docs/oss/deployment/elastic-beanstalk.md`:
- Around line 28-29: The docs currently instruct installing Node 6 via the curl
pipe and yum commands shown (curl --silent --location
https://rpm.nodesource.com/setup_6.x | sudo bash - and yum -y install nodejs);
replace these with a modern Node 18+ installation method (e.g., use NodeSource
setup_18.x or recommend nvm/official distro packages) and update the yum
installation step accordingly so the guide installs a supported Node version
compatible with React on Rails rather than EOL Node 6.

In `@docs/oss/deployment/README.md`:
- Line 3: Replace the awkward sentence "Shakapacker puts the necessary
precompile steps automatically in the rake precompile step." with a tighter
phrasing such as "Shakapacker automatically runs the required precompile steps
during `rake precompile`." Update the README sentence accordingly to improve
clarity and tone.

In `@docs/oss/deployment/troubleshooting.md`:
- Around line 41-44: Update the Node.js version guidance and broaden
package-manager instructions: change the "Install Node.js 20+" line to note the
minimum supported version 18+ and add the CI-tested range (e.g., "Node.js 18+
(CI-tested: 18–20)"). Replace the Yarn-only install lines ("Install Yarn: npm
install -g yarn" / "Or use system package manager: brew install node yarn") with
package-manager-agnostic options that include npm and pnpm alternatives (e.g.,
npm global install and pnpm global install or recommend using corepack), and
apply the same edits to the second occurrence referenced in the comment (the
block at lines 53–56).

In `@docs/oss/getting-started/tutorial.md`:
- Line 98: The docs use the command "git commit -am" which skips untracked files
and can prevent generated files from being included; update the tutorial step to
explicitly stage files first (e.g., run "git add ." or explicitly list generated
files) before committing, and replace the "git commit -am \"Initial commit\""
line with the two-step staging + commit sequence so fresh app flows include
generated/untracked files.

In `@docs/oss/misc/style.md`:
- Line 25: Update the JSDoc link anchor so it points to the current official
site: replace the outdated and insecure URL "http://usejsdoc.org/" with
"https://jsdoc.app/" in the markdown link entry (the line containing
"[JSDoc](http://usejsdoc.org/)") so the link uses the correct HTTPS domain.

In `@docs/oss/misc/updating-dependencies.md`:
- Around line 13-71: The docs currently show only Yarn commands under the
"Node/Yarn" section; update the user-facing guide to be package-manager-agnostic
by adding npm and pnpm equivalents alongside each Yarn command. For "Checking
for Outdated Packages" add "npm outdated" and "pnpm outdated"; for the
npm-check-updates flow (ncu -u -a) show using npx/npm-run (npx npm-check-updates
-u or npx ncu -u -a) and then npm install and pnpm install as alternatives to
"yarn"; for the "yarn upgrade" and "yarn upgrade [package]" lines add "npm
update" / "npm update [package]" and "pnpm update" / "pnpm update [package]";
for "yarn add" and dev deps add "npm install <pkg>@<version> --save" and "npm
install --save-dev <pkg>@<version>" plus "pnpm add <pkg>@<version>" and "pnpm
add -D <pkg>@<version>" so all examples (headings/commands in this file) show
equivalent commands for npm, yarn, and pnpm.

In `@docs/pro/home-pro.md`:
- Line 3: Update the opening sentence in docs/pro/home-pro.md so it doesn't
undersell React 19: replace the explicit "Now supports React 18" phrasing with a
version-consistent statement (e.g., "Now supports React 18 and 19" or "Now
supports React 18/19") to match later references to React 18/19 and the rest of
the page; ensure the linked CHANGELOG and loadable-components instructions
remain unchanged.

In `@docs/pro/installation.md`:
- Line 101: Update the prerequisite sentence in docs/pro/installation.md to
state that react_on_rails must match the react_on_rails_pro version (not just be
≥16.0.0); reference that the gemspec uses s.add_runtime_dependency
"react_on_rails", ReactOnRails::VERSION (in react_on_rails_pro.gemspec) which
enforces an exact-version match, so clarify the docs to require the same version
(e.g., "react_on_rails must be the same version as react_on_rails_pro, such as
16.4.0").

In `@docs/pro/js-memory-leaks.md`:
- Around line 12-19: Move the useStaticRendering(true) call out of the App
component and invoke it once at module scope before the App component is defined
and before any observer components are imported or rendered; specifically, place
useStaticRendering(true) right after the import of useStaticRendering from
"mobx-react" (so it runs once on module load), and remove the call from inside
the App function to prevent it running on every render.

In `@docs/pro/react-server-components/create-without-ssr.md`:
- Around line 16-17: Remove installation of the base package and install only
the Pro package with an exact/pinned version: replace the yarn command to
install only react-on-rails-pro using the --exact flag (e.g., yarn add --exact
[email protected]) and replace the Bundler line to add only
react_on_rails_pro with a pinned version (e.g., bundle add react_on_rails_pro
--version '=4.0.0' or equivalent), removing react-on-rails from both commands.

In `@docs/pro/react-server-components/purpose-and-benefits.md`:
- Around line 153-173: The snippet is incomplete and mixes module formats:
ensure imports/definitions for serverWebpackConfig, extractLoader, and rules are
present and the module syntax matches the .mjs extension; specifically, replace
any CommonJS require() with ES module imports for serverWebpackConfig and other
helpers, define rules as rscConfig.module.rules (or const rules =
rscConfig.module?.rules || []), and add an extractLoader helper function (e.g.,
function extractLoader(rule, name){ return Array.isArray(rule.use) ?
rule.use.find(l=> (l.loader||'').includes(name)) : null }) so the logic that
finds babel-loader and pushes the react-on-rails-rsc/WebpackLoader operates
correctly; also keep rscConfig.entry assignment unchanged to map 'rsc-bundle' to
rscConfig.entry['server-bundle'].

In `@llms.txt`:
- Line 24: The docs show the generator command "rails generate
react_on_rails:install" but don't state whether the react_on_rails gem must be
added first, causing inconsistency with the Pro sections; update the
installation instructions to either add a preceding step to run "bundle add
react_on_rails" (or ensure Gemfile has gem 'react_on_rails') before the "rails
generate react_on_rails:install" line, or insert a short clarifying note stating
that the generator will install the gem automatically—make the choice consistent
with the Pro instructions and mention "rails generate react_on_rails:install"
and the "react_on_rails" gem explicitly.

In `@README.md`:
- Around line 203-204: Update the documented minimum runtime versions in the
README where it currently reads "Ruby >= 3.2" and "Node.js >= 20" to match the
package/runtime validator floors ("Ruby >= 3.0" and "Node.js >= 18"); keep the
CI-tested ranges (e.g., "CI tested: 3.2 - 3.4" and "CI tested: 20 - 22") as
separate notes rather than changing the minimums so documentation reflects
supported floors used by runtime/package validators.

---

Nitpick comments:
In
`@docs/oss/building-features/how-to-conditionally-server-render-based-on-device-type.md`:
- Line 30: Replace the repository blob URL
'https://github.com/shakacode/react_on_rails/blob/main/docs/configuration/README.md'
in this file with the canonical docs URL
'https://reactonrails.com/docs/configuration/' so the link matches the nearby
canonical link and avoids split-link maintenance; update any identical
occurrences in the same file to the canonical URL to keep links consistent.

In `@docs/oss/building-features/node-renderer/basics.md`:
- Around line 46-51: The docs currently show only Yarn commands for installing
react-on-rails-pro-node-renderer; restore package-manager-agnostic installation
instructions by replacing the single Yarn block with three subsections (npm,
yarn, pnpm) that include the suggested commands: npm init -y and npm install
--save-exact react-on-rails-pro-node-renderer, yarn init and yarn add
react-on-rails-pro-node-renderer, and pnpm init and pnpm add --save-exact
react-on-rails-pro-node-renderer so the documentation once again covers npm,
yarn, and pnpm for the package installation step.

In `@docs/oss/building-features/node-renderer/debugging.md`:
- Around line 17-24: The steps in debugging.md are yarn-specific; update the
instructions to be package-manager-agnostic by adding equivalent npm and pnpm
command alternatives for each yarn command (e.g., for `yarn` add `npm
install`/`pnpm install`, for `yarn build:dev` add `npm run build:dev`/`pnpm run
build:dev`, for `yarn start` add `npm start`/`pnpm start`) and mention the same
environment variable usage (`RENDERER_LOG_LEVEL=debug`) works with
Windows-compatible syntax when needed; alternatively, if this workflow is
intended only for repo maintainers, explicitly label the file as maintainer-only
and keep the yarn examples but add a short note referencing the nps task `nps
renderer.debug` and the `spec/dummy/package.json` script `"node-renderer-debug"`
so readers know where to find the exact commands.

In `@docs/oss/building-features/node-renderer/js-configuration.md`:
- Line 97: The docs currently only show "yarn start"; update the end-user
instruction to be package-manager-agnostic by adding the npm and pnpm
equivalents alongside the existing yarn command (e.g., include "npm run start"
and "pnpm start") so users of any package manager can follow the same step;
locate the string "yarn start" in js-configuration.md and replace or expand it
to list all three commands.

In `@docs/oss/deployment/server-rendering-tips.md`:
- Line 17: Replace the generic wiki link in the sentence "You can enable Node.js
server rendering via [React on Rails Pro]" with a direct React on Rails Pro
documentation URL that specifically covers the Node renderer or the Pro overview
(i.e., point the link target to the React on Rails Pro Node renderer/Pro
overview doc in the react_on_rails docs rather than the wiki landing page) so
users land directly on the actionable Pro documentation.

In `@docs/oss/getting-started/pro-quick-start.md`:
- Around line 43-50: Update the docs fragment that currently shows only Yarn
commands under the heading "## Step 4: Commit (required by generator)" by
replacing that heading with "## Step 4: Init node application (if needed)" and
adding package-manager-agnostic init commands for npm and pnpm alongside the
existing yarn init (npm init -y, yarn init -y, pnpm init). Insert a brief
conditional note "If you don't have a package.json yet:" above the three init
commands, then renumber the subsequent heading ("## Step 5: Commit (required by
generator)") and any following step references accordingly to reflect the new
step ordering; target the block containing the yarn init/yarn add lines and the
heading text to make these edits.

In `@docs/oss/migrating/rsc-preparing-app.md`:
- Line 507: The example uses product.as_json(include: [:specs, :reviews]) which
encourages broad serialization; change it to explicitly whitelist fields (e.g.,
use product.as_json(only: [...], include: { specs: { only: [...] }, reviews: {
only: [...] } })) so the props payload is limited and predictable; update the
props line (props: { product: ... }) to use as_json with only: and nested
include-only shapes instead of a bare include: list for both occurrences.

In `@docs/pro/react-on-rails-pro.md`:
- Line 19: The document currently uses an H3 heading "### Pro: Docs" directly
under the H1 title; update the markdown to restore proper heading hierarchy by
either changing that heading text "### Pro: Docs" to an H2 ("## Pro: Docs") or
by adding an H2 wrapper (for example add "## Features" or similar above the
existing H3 and keep the "### Pro: Docs" as a subsection); locate the heading
string "Pro: Docs" in the file and apply one of these two fixes consistently for
other subsections if present.

In `@docs/pro/react-server-components/create-without-ssr.md`:
- Around line 16-23: Update the install commands in
docs/pro/react-server-components/create-without-ssr.md so that the existing Yarn
lines (e.g., "yarn add [email protected] [email protected]"
and "yarn add [email protected] [email protected] [email protected]") are
followed by equivalent npm and pnpm alternatives (use --save-exact or --save
where appropriate for npm and --exact for pnpm) so users see three options
(yarn, npm, pnpm) for each installation step.
🪄 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: cdb7e3d4-4cf1-43c1-9c54-6b3773fa71c2

📥 Commits

Reviewing files that changed from the base of the PR and between c5288af and 085e515.

📒 Files selected for processing (69)
  • AGENTS_USER_GUIDE.md
  • README.md
  • docs/README.md
  • docs/oss/api-reference/generator-details.md
  • docs/oss/api-reference/redux-store-api.md
  • docs/oss/api-reference/ruby-api-pro.md
  • docs/oss/api-reference/view-helpers-api.md
  • docs/oss/building-features/bundle-caching.md
  • docs/oss/building-features/caching.md
  • docs/oss/building-features/code-splitting.md
  • docs/oss/building-features/extensible-precompile-pattern.md
  • docs/oss/building-features/how-to-conditionally-server-render-based-on-device-type.md
  • docs/oss/building-features/i18n.md
  • docs/oss/building-features/images.md
  • docs/oss/building-features/node-renderer/basics.md
  • docs/oss/building-features/node-renderer/debugging.md
  • docs/oss/building-features/node-renderer/error-reporting-and-tracing.md
  • docs/oss/building-features/node-renderer/heroku.md
  • docs/oss/building-features/node-renderer/js-configuration.md
  • docs/oss/building-features/node-renderer/troubleshooting.md
  • docs/oss/building-features/rails-webpacker-react-integration-options.md
  • docs/oss/building-features/testing-configuration.md
  • docs/oss/building-features/turbolinks.md
  • docs/oss/configuration/README.md
  • docs/oss/configuration/configuration-pro.md
  • docs/oss/core-concepts/client-vs-server-rendering.md
  • docs/oss/core-concepts/how-react-on-rails-works.md
  • docs/oss/core-concepts/react-server-rendering.md
  • docs/oss/core-concepts/render-functions-and-railscontext.md
  • docs/oss/deployment/README.md
  • docs/oss/deployment/capistrano-deployment.md
  • docs/oss/deployment/elastic-beanstalk.md
  • docs/oss/deployment/server-rendering-tips.md
  • docs/oss/deployment/troubleshooting-build-errors.md
  • docs/oss/deployment/troubleshooting.md
  • docs/oss/getting-started/common-issues.md
  • docs/oss/getting-started/comparing-react-on-rails-to-alternatives.md
  • docs/oss/getting-started/comparison-with-alternatives.md
  • docs/oss/getting-started/create-react-on-rails-app.md
  • docs/oss/getting-started/installation-into-an-existing-rails-app.md
  • docs/oss/getting-started/oss-vs-pro.md
  • docs/oss/getting-started/pro-quick-start.md
  • docs/oss/getting-started/quick-start.md
  • docs/oss/getting-started/tutorial.md
  • docs/oss/introduction.md
  • docs/oss/migrating/migrating-to-rsc.md
  • docs/oss/migrating/rsc-component-patterns.md
  • docs/oss/migrating/rsc-context-and-state.md
  • docs/oss/migrating/rsc-data-fetching.md
  • docs/oss/migrating/rsc-preparing-app.md
  • docs/oss/migrating/rsc-third-party-libs.md
  • docs/oss/migrating/rsc-troubleshooting.md
  • docs/oss/misc/style.md
  • docs/oss/misc/updating-dependencies.md
  • docs/oss/upgrading/release-notes/16.1.0.md
  • docs/oss/upgrading/release-notes/16.2.0.md
  • docs/oss/upgrading/upgrading-react-on-rails.md
  • docs/pro/home-pro.md
  • docs/pro/installation.md
  • docs/pro/js-memory-leaks.md
  • docs/pro/profiling-server-side-rendering-code.md
  • docs/pro/react-on-rails-pro.md
  • docs/pro/react-server-components/create-without-ssr.md
  • docs/pro/react-server-components/purpose-and-benefits.md
  • docs/pro/react-server-components/tutorial.md
  • docs/pro/troubleshooting.md
  • docs/pro/updating.md
  • internal/contributor-info/create-react-on-rails-app-smoke-testing.md
  • llms.txt
💤 Files with no reviewable changes (3)
  • docs/pro/react-server-components/tutorial.md
  • docs/oss/core-concepts/render-functions-and-railscontext.md
  • docs/oss/migrating/rsc-third-party-libs.md

Comment on lines +35 to +36
ruby -v # Should be 3.2+
node -v # Should be 20+
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Use validator-floor minimums here, not CI-floor minimums.

Line 35 and Line 36 currently encode Ruby 3.2+ and Node 20+ as strict prerequisites, which can cause agents to recommend unnecessary upgrades for environments that are still supported.

Suggested doc fix
- ruby -v    # Should be 3.2+
- node -v    # Should be 20+
+ ruby -v    # Should be 3.0+ (CI tested: 3.2 - 3.4)
+ node -v    # Should be 18+ (CI tested: 20 - 22)

Based on learnings: In README and related docs, Ruby >= 3.0 and Node >= 18 are intentional support floors, with CI-tested ranges documented separately.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@AGENTS_USER_GUIDE.md` around lines 35 - 36, The docs currently list strict
prerequisites "ruby -v    # Should be 3.2+" and "node -v    # Should be 20+"
which use CI-floor minimums; update these validator-floor minimums to "Ruby >=
3.0" and "Node >= 18" instead (replace the version comments next to the "ruby
-v" and "node -v" lines accordingly) so the AGENTS_USER_GUIDE reflects supported
floors rather than CI-tested floors.

Comment on lines +212 to 214
- Add `gem 'react_on_rails_pro', '>= 16.3.0'` to your Gemfile and run `bundle install`
- Contact [[email protected]](mailto:[email protected]) for a license

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Clarify license wording so install prerequisites don’t imply a paid key is required for local usage.

Line 213 reads like a prerequisite for setup, but Pro evaluation/development/testing/CI flows do not require a production paid license.

Based on learnings: In React on Rails Pro, a license is NOT required for evaluation, development, testing, or CI; only production requires REACT_ON_RAILS_PRO_LICENSE.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/oss/api-reference/generator-details.md` around lines 212 - 214, The
current install note ("Add `gem 'react_on_rails_pro', '>= 16.3.0'` ... Contact
[email protected] for a license") implies a paid license is required to run
locally; update the wording to clarify that adding the gem is optional for Pro
features but a production license (REACT_ON_RAILS_PRO_LICENSE) is only required
for production deployments — evaluation, development, testing and CI do not
require a paid key — and keep the contact ([email protected]) as the channel
for obtaining a production license or questions; reference the Gemfile gem
declaration (`gem 'react_on_rails_pro', '>= 16.3.0'`) and the environment
variable name (`REACT_ON_RAILS_PRO_LICENSE`) so the change is applied to the
same explanatory bullet points.

2. Add `react-intl` & `intl` to your root `package.json`, and remember to run `bundle install`
and your package manager's install command (e.g., `npm install`, `yarn install`, or
`pnpm install`). The minimum supported versions are:
2. Add `react-intl` & `intl` to `client/package.json`, and remember to run `bundle install` and your package manager's install command (e.g., `npm install`, `yarn install`, or `pnpm install`). The minimum supported versions are:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check where package.json files exist in React on Rails example projects

# Check the spec dummy app structure
echo "=== Spec dummy app package.json locations ==="
fd -t f "package.json" react_on_rails/spec/dummy/ 2>/dev/null | head -10

# Check React on Rails tutorial structure  
echo -e "\n=== Common React on Rails project structures in docs ==="
rg -n "package\.json" docs/oss/ -C2 | grep -E "(client/|root)" | head -20

Repository: shakacode/react_on_rails

Length of output: 1297


🏁 Script executed:

cat -n docs/oss/building-features/i18n.md | sed -n '130,155p'

Repository: shakacode/react_on_rails

Length of output: 1090


🏁 Script executed:

# Check if there's documentation about project structure setup
rg -n "package\.json" docs/oss/getting-started/ -A2 -B2 | head -30

Repository: shakacode/react_on_rails

Length of output: 1042


🏁 Script executed:

# Check for any client/ directory structure in modern examples
fd -type d "client" react_on_rails/spec/dummy/ 2>/dev/null
fd -type d "client" react_on_rails/spec/ 2>/dev/null | head -5

Repository: shakacode/react_on_rails

Length of output: 50


🏁 Script executed:

# Search for any references to why client/ directory exists or should exist
rg -n "client.*(directory|structure|subdirectory)" docs/oss/ -i

# Check if any setup instructions recommend creating a client/ directory
rg -n "mkdir.*client|create.*client" docs/oss/ -i

Repository: shakacode/react_on_rails

Length of output: 15463


🏁 Script executed:

# Look at the upgrading docs more carefully to understand the client directory deprecation
cat -n docs/oss/upgrading/upgrading-react-on-rails.md | sed -n '420,435p'

Repository: shakacode/react_on_rails

Length of output: 860


🏁 Script executed:

# Check if any current example or setup instructions reference client/package.json as the primary approach
rg -n "client/package\.json" docs/oss/ | wc -l
rg -n "^[^#]*package\.json" docs/oss/ --no-filename | grep -v client | head -5

Repository: shakacode/react_on_rails

Length of output: 979


Update i18n.md guidance to be universally compatible with both modern and legacy project structures.

The documented instruction to add dependencies to client/package.json is overly specific. While valid for legacy React on Rails setups that retained the /client directory, this is not the default or recommended structure in modern React on Rails projects. The spec/dummy canonical app and Shakapacker (the modern default) use a root-level package.json. The /client directory is optional and explicitly documented as a legacy structure in the upgrading guides.

Recommend reverting to the original wording: "Add react-intl & intl to your package.json" (without specifying client/) so the guidance works universally across both modern and legacy project structures.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/oss/building-features/i18n.md` at line 139, The docs line currently
instructs adding dependencies to "client/package.json", which is too specific;
update the phrase in docs/oss/building-features/i18n.md (the line containing
"Add `react-intl` & `intl` to `client/package.json`") to the more general
wording "Add `react-intl` & `intl` to your `package.json`" so the guidance
applies to both modern (root-level package.json) and legacy (client/) project
structures.

Comment on lines +37 to 44
**images** is a defined alias, so "images/foobar.jpg" would point to the file at
`/client/app/assets/images/foobar.jpg.`

```javascript
resolve: {
resolve: {
alias: {
images: join(process.cwd(), 'app', 'javascript', 'images'),
images: join(process.cwd(), 'app', 'assets', 'images'),
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify whether an `images` alias is actually defined in shipped webpack configs/templates/docs.
set -euo pipefail

echo "== Find webpack config files and templates =="
fd -i 'webpack' .

echo
echo "== Search for alias declarations involving images =="
rg -n --iglob '*webpack*' --iglob '*.mjs' --iglob '*.js' --iglob '*.ts' "alias|images\\s*:" .

echo
echo "== Search docs for statements about default images alias behavior =="
rg -n "images\\s+is\\s+a\\s+defined alias|does not define an `images` alias|app/assets/images|app/javascript/images" docs

Repository: shakacode/react_on_rails

Length of output: 50445


🏁 Script executed:

cat -n ./react_on_rails/spec/dummy/config/webpack/alias.js

Repository: shakacode/react_on_rails

Length of output: 1034


🏁 Script executed:

cat -n ./react_on_rails_pro/spec/dummy/config/webpack/alias.js

Repository: shakacode/react_on_rails

Length of output: 1034


🏁 Script executed:

# Check the templates for alias definitions
find ./react_on_rails/lib/generators -name "alias.js*" -o -name "*alias*" | grep -E '\.(js|ts)' | head -20

Repository: shakacode/react_on_rails

Length of output: 50


🏁 Script executed:

# Search for alias definitions in generator templates
rg -l "alias" ./react_on_rails/lib/generators/react_on_rails/templates --type js --type ts

Repository: shakacode/react_on_rails

Length of output: 50


🏁 Script executed:

# Read the full images.md file to see the context around lines 37-44
cat -n ./docs/oss/building-features/images.md

Repository: shakacode/react_on_rails

Length of output: 1702


🏁 Script executed:

# Check if there are any alias.js or similar files in the generator templates
fd -i "alias" ./react_on_rails/lib/generators/react_on_rails/templates/

Repository: shakacode/react_on_rails

Length of output: 50


🏁 Script executed:

# Search for "images" in all template webpack config files
rg "images" ./react_on_rails/lib/generators/react_on_rails/templates --type js --type ts -A 2 -B 2

Repository: shakacode/react_on_rails

Length of output: 50


🏁 Script executed:

# List all webpack template files
find ./react_on_rails/lib/generators/react_on_rails/templates -name "*webpack*" -type f | head -20

Repository: shakacode/react_on_rails

Length of output: 273


🏁 Script executed:

# Check the commonWebpackConfig template file for any alias definition
cat -n ./react_on_rails/lib/generators/react_on_rails/templates/base/base/config/webpack/commonWebpackConfig.js.tt

Repository: shakacode/react_on_rails

Length of output: 857


🏁 Script executed:

# Check if there's any other webpack config in templates that might define images alias
find ./react_on_rails/lib/generators/react_on_rails/templates -name "*.tt" -o -name "*.js" -o -name "*.ts" | xargs grep -l "images.*alias\|alias.*images" 2>/dev/null

Repository: shakacode/react_on_rails

Length of output: 52


Remove or correct the false "images is a defined alias" claim to prevent broken imports.

The statement on line 37 that "images is a defined alias" is factually incorrect. The code snippet shown (lines 41-45) is an example configuration, not confirmation the alias exists by default. Default webpack configs in the repository—including react_on_rails/spec/dummy/config/webpack/alias.js, react_on_rails_pro/spec/dummy/config/webpack/alias.js, and the template commonWebpackConfig.js.tt—define only React and Assets aliases, not an images alias. Users following this documentation will encounter build-time import failures.

Either clarify that this configuration is optional and must be added by developers, or remove the misleading claim.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/oss/building-features/images.md` around lines 37 - 44, The documentation
wrongly asserts that the "images" alias exists by default; update the text
around the resolve.alias snippet to state that this is an example showing how to
add an alias (not a built-in), e.g. explain that users must add the
resolve.alias entry (images -> join(process.cwd(), 'app','assets','images')) to
their webpack config if they want to import "images/..." paths, or remove the
claim entirely so it no longer implies a default alias exists. Ensure you
reference the resolve: { alias: { images: join(process.cwd(), 'app', 'assets',
'images') } } example and clarify it is optional user configuration.

Comment on lines +65 to 71
import path from 'path';
import { reactOnRailsProNodeRenderer } from 'react-on-rails-pro-node-renderer';

const config = {
// Save bundles to relative "./.node-renderer-bundles" dir of our app root
serverBundleCachePath: path.resolve(__dirname, '../.node-renderer-bundles'),
// Save bundles to relative "./.node-renderer-bundles" dir of our app
serverBundleCachePath: path.resolve(__dirname, './.node-renderer-bundles'),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

In Node.js ES modules, is __dirnameavailable by default? What is the recommended replacement pattern usingimport.meta.url?

💡 Result:

No, dirname is not available by default in Node.js ES modules. It is a CommonJS-specific variable and unavailable in ESM. The recommended replacement uses import.meta.url to derive the directory path. Prior to Node.js v20.11.0 / v21.2.0, the pattern was: import { fileURLToPath } from 'node:url'; import { dirname } from 'node:path'; const filename = fileURLToPath(import.meta.url); const dirname = dirname(filename); Since Node.js v20.11.0 (stable in v22.16.0+ / v24.0.0+), use the built-in import.meta.dirname directly: const dirname = import.meta.dirname; This is equivalent to path.dirname(import.meta.filename) and only available for file: modules. As of 2026-03-30, with Node.js v25+ current, this is the modern recommendation per official docs.

Citations:


🏁 Script executed:

# Find and read the file mentioned in the review
fd -t f "js-configuration.md" --exec head -n 80 {} \;

Repository: shakacode/react_on_rails

Length of output: 7945


🏁 Script executed:

# Check project's Node.js version requirement
fd -t f "package.json" | head -20 | xargs -I {} sh -c 'echo "File: {}" && cat {} | jq ".engines.node // .volta.node // .nvmrc // empty" 2>/dev/null || true'

Repository: shakacode/react_on_rails

Length of output: 1398


🏁 Script executed:

# Also check for .nvmrc or Node version config files
fd -E node_modules -t f "\.(nvmrc|nvmrc|node-version)$|package\.json$" | grep -E "(nvmrc|node-version)" | head -5

Repository: shakacode/react_on_rails

Length of output: 104


🏁 Script executed:

# Check the main project's package.json for Node.js engine requirement
cat packages/react-on-rails/package.json | jq '.engines'

Repository: shakacode/react_on_rails

Length of output: 72


🏁 Script executed:

# Also check the react_on_rails_pro dummy app's .nvmrc for the actual Node version
cat react_on_rails_pro/spec/dummy/.nvmrc

Repository: shakacode/react_on_rails

Length of output: 76


Fix ESM example: __dirname is undefined in this snippet.

Line 65 uses ESM (import ...), but line 70 references __dirname, which is not available in Node.js ES modules and will throw at runtime.

Since the project targets Node.js v22.12.0, use the modern import.meta.dirname pattern:

Suggested doc fix
 import path from 'path';
 import { reactOnRailsProNodeRenderer } from 'react-on-rails-pro-node-renderer';

 const config = {
   // Save bundles to relative "./.node-renderer-bundles" dir of our app
-  serverBundleCachePath: path.resolve(__dirname, './.node-renderer-bundles'),
+  serverBundleCachePath: path.resolve(import.meta.dirname, './.node-renderer-bundles'),
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/oss/building-features/node-renderer/js-configuration.md` around lines 65
- 71, The snippet uses ESM imports but still references __dirname (used in
serverBundleCachePath via path.resolve), which is undefined in ES modules;
update the example to derive __dirname from import.meta.url (e.g., using
fileURLToPath(import.meta.url) and path.dirname) or use new URL-based dirname
resolution so serverBundleCachePath is computed from a valid directory value
when using the reactOnRailsProNodeRenderer example and path.resolve.

Comment on lines +12 to 19
import { useStaticRendering } from "mobx-react";

**Fix:** Register listeners once (outside the render path), or guard with a flag:
const App = (props, railsContext) => {
const { location, serverSide } = railsContext;
const context = {};

```javascript
let listenerRegistered = false;
if (!listenerRegistered) {
process.on('unhandledRejection', (err) => reportError(err));
listenerRegistered = true;
}
useStaticRendering(true);
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

What is the correct usage pattern for mobx-react useStaticRendering in server-side rendering?

💡 Result:

The correct usage pattern for useStaticRendering (also referred to as enableStaticRendering in modern versions) from mobx-react or mobx-react-lite in server-side rendering (SSR) is to call it with true on the server before rendering any observer-wrapped components, and optionally with false on the client after hydration if needed. This prevents MobX observers from subscribing to observables during SSR (to avoid memory leaks and unnecessary re-renders) and ensures proper cleanup after the initial render. Key points: - Import from mobx-react or mobx-react-lite: import { enableStaticRendering } from 'mobx-react-lite' - Call once at app/module level, typically in a way that distinguishes server from client: enableStaticRendering(typeof window === 'undefined') - Do this before any observer components render during SSR. - Purpose: Disables reactive subscriptions in SSR context; components render statically once. Example (common in Next.js _app.js or server entry): import { enableStaticRendering } from 'mobx-react-lite' enableStaticRendering(typeof window === 'undefined') This pattern is confirmed across official MobX docs, npm package README, and GitHub issues/PRs up to 2025-2026.

Citations:


🏁 Script executed:

# Check if the file exists and read the relevant section
if [ -f "docs/pro/js-memory-leaks.md" ]; then
  echo "=== File found, reading lines 8-25 ==="
  sed -n '8,25p' docs/pro/js-memory-leaks.md
else
  echo "File not found at docs/pro/js-memory-leaks.md"
  # Try to find similar files
  find . -name "*memory*" -type f | head -20
fi

Repository: shakacode/react_on_rails

Length of output: 448


🏁 Script executed:

# Search for useStaticRendering references in the codebase
rg -i "usestaticrendering|enablestaticrendering" --type md --type js --type ts

Repository: shakacode/react_on_rails

Length of output: 344


Move useStaticRendering(true) to module level before the App component.

The code example calls useStaticRendering(true) inside the App component, which means it runs on every render. According to MobX SSR documentation, it should be called once at module level before any observer components render.

🔧 Suggested fix
import { useStaticRendering } from "mobx-react";

+// Call once at module level for SSR
+useStaticRendering(true);
+
 const App = (props, railsContext) => {
   const { location, serverSide } = railsContext;
   const context = {};
-
-  useStaticRendering(true);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/pro/js-memory-leaks.md` around lines 12 - 19, Move the
useStaticRendering(true) call out of the App component and invoke it once at
module scope before the App component is defined and before any observer
components are imported or rendered; specifically, place
useStaticRendering(true) right after the import of useStaticRendering from
"mobx-react" (so it runs once on module load), and remove the call from inside
the App function to prevent it running on every render.

Comment on lines +16 to +17
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, locate and read the file to see the full context
cat -n docs/pro/react-server-components/create-without-ssr.md

Repository: shakacode/react_on_rails

Length of output: 20407


Install only react-on-rails-pro in Pro projects; it already includes base package functionality.

Line 16 should not install both react-on-rails and react-on-rails-pro. Pro setups must install only react-on-rails-pro and use the --exact flag to pin the version.

Suggested doc fix
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/pro/react-server-components/create-without-ssr.md` around lines 16 - 17,
Remove installation of the base package and install only the Pro package with an
exact/pinned version: replace the yarn command to install only
react-on-rails-pro using the --exact flag (e.g., yarn add --exact
[email protected]) and replace the Bundler line to add only
react_on_rails_pro with a pinned version (e.g., bundle add react_on_rails_pro
--version '=4.0.0' or equivalent), removing react-on-rails from both commands.

Comment on lines +153 to +173
```javascript
// config/webpack/rscWebpackConfig.mjs
const rscConfig = serverWebpackConfig();

// Configure RSC entry point
rscConfig.entry = {
'rsc-bundle': rscConfig.entry['server-bundle'],
};

// Add RSC loader
rules.forEach((rule) => {
if (Array.isArray(rule.use)) {
const babelLoader = extractLoader(rule, 'babel-loader');
if (babelLoader) {
rule.use.push({
loader: 'react-on-rails-rsc/WebpackLoader',
});
}
}
});
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Locate canonical examples that define these identifiers so the doc snippet can be completed accurately.
set -euo pipefail

echo "== Find occurrences of referenced identifiers =="
rg -n "serverWebpackConfig\\(|extractLoader\\(|rules\\.forEach\\(" docs react_on_rails react_on_rails_pro packages

echo
echo "== Find existing rscWebpackConfig examples =="
rg -n "rscWebpackConfig" docs react_on_rails react_on_rails_pro

Repository: shakacode/react_on_rails

Length of output: 14537


🏁 Script executed:

#!/bin/bash
# View full context around the example in purpose-and-benefits.md
echo "=== Full context in purpose-and-benefits.md (lines 140-180) ==="
sed -n '140,180p' docs/pro/react-server-components/purpose-and-benefits.md

echo
echo "=== Full context in create-without-ssr.md (lines 64-110) for comparison ==="
sed -n '64,110p' docs/pro/react-server-components/create-without-ssr.md

Repository: shakacode/react_on_rails

Length of output: 2883


Webpack RSC configuration example is incomplete and non-runnable.

The snippet references serverWebpackConfig, rules, and extractLoader without providing their definitions or imports. Include the required imports, the extractLoader helper function definition, and the rules variable declaration. See docs/pro/react-server-components/create-without-ssr.md for a complete working example.

Additionally, the file extension .mjs suggests ES modules, but the code uses CommonJS require() syntax—ensure consistency.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/pro/react-server-components/purpose-and-benefits.md` around lines 153 -
173, The snippet is incomplete and mixes module formats: ensure
imports/definitions for serverWebpackConfig, extractLoader, and rules are
present and the module syntax matches the .mjs extension; specifically, replace
any CommonJS require() with ES module imports for serverWebpackConfig and other
helpers, define rules as rscConfig.module.rules (or const rules =
rscConfig.module?.rules || []), and add an extractLoader helper function (e.g.,
function extractLoader(rule, name){ return Array.isArray(rule.use) ?
rule.use.find(l=> (l.loader||'').includes(name)) : null }) so the logic that
finds babel-loader and pushes the react-on-rails-rsc/WebpackLoader operates
correctly; also keep rscConfig.entry assignment unchanged to map 'rsc-bundle' to
rscConfig.entry['server-bundle'].

```bash
bundle add react_on_rails --strict
bundle exec rails generate react_on_rails:install
rails generate react_on_rails:install
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Clarify whether gem installation is needed before running the generator.

The base install instructions show only the generator command, while both Pro install sections (lines 29 and 35) explicitly include bundle add react_on_rails_pro before the generator. This asymmetry may confuse users about whether they need to manually add the react_on_rails gem to their Gemfile before running rails generate react_on_rails:install.

Consider either:

  1. Adding bundle add react_on_rails before line 24 for consistency, OR
  2. Adding a brief note explaining that the generator handles gem installation automatically (if that's the case), OR
  3. Adding a prerequisite note that users should have gem 'react_on_rails' in their Gemfile before running the generator
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@llms.txt` at line 24, The docs show the generator command "rails generate
react_on_rails:install" but don't state whether the react_on_rails gem must be
added first, causing inconsistency with the Pro sections; update the
installation instructions to either add a preceding step to run "bundle add
react_on_rails" (or ensure Gemfile has gem 'react_on_rails') before the "rails
generate react_on_rails:install" line, or insert a short clarifying note stating
that the generator will install the gem automatically—make the choice consistent
with the Pro instructions and mention "rails generate react_on_rails:install"
and the "react_on_rails" gem explicitly.

Comment on lines +203 to +204
- Ruby >= 3.2 (CI tested: 3.2 - 3.4)
- Node.js >= 20 (CI tested: 20 - 22)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Keep documented minimum versions aligned with runtime validator floors.

Line 203 and Line 204 now document Ruby >= 3.2 and Node.js >= 20, which conflicts with the intentional support floors used by package/runtime checks. This can incorrectly tell users their valid environments are unsupported.

Suggested doc fix
-- Ruby >= 3.2 (CI tested: 3.2 - 3.4)
-- Node.js >= 20 (CI tested: 20 - 22)
+- Ruby >= 3.0 (package minimum; CI tested: 3.2 - 3.4)
+- Node.js >= 18 (package minimum; CI tested: 20 - 22)

Based on learnings: In README.md and related docs, Ruby >= 3.0 and Node >= 18 are intentional package-validator floors, while CI-tested ranges are documented separately.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 203 - 204, Update the documented minimum runtime
versions in the README where it currently reads "Ruby >= 3.2" and "Node.js >=
20" to match the package/runtime validator floors ("Ruby >= 3.0" and "Node.js >=
18"); keep the CI-tested ranges (e.g., "CI tested: 3.2 - 3.4" and "CI tested: 20
- 22") as separate notes rather than changing the minimums so documentation
reflects supported floors used by runtime/package validators.

@justin808
Copy link
Copy Markdown
Member Author

Need to start over on this stuff.

@justin808 justin808 closed this Mar 31, 2026
@justin808 justin808 deleted the split/docs-migration-content branch March 31, 2026 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-cleanup Documentation cleanup or migration documentation P3 Parked priority review-needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant