Skip to content

Docs: Add RSC landing, ExecJS limitations, debugging, and benchmarks pages#2785

Merged
justin808 merged 9 commits intomainfrom
jg/2781-add-docs-pages
Mar 23, 2026
Merged

Docs: Add RSC landing, ExecJS limitations, debugging, and benchmarks pages#2785
justin808 merged 9 commits intomainfrom
jg/2781-add-docs-pages

Conversation

@justin808
Copy link
Copy Markdown
Member

@justin808 justin808 commented Mar 21, 2026

Summary

  • Add RSC landing page (docs/pro/react-server-components/index.md) — top-level introduction to React Server Components support, linking to tutorial, migration guide, and deep dives
  • Add ExecJS Limitations page (docs/oss/core-concepts/execjs-limitations.md) — documents timer/async constraints, common errors, workarounds, and migration path to Node renderer
  • Add Debugging Guide (docs/oss/building-features/debugging.md) — SSR debugging workflows, hydration mismatch diagnosis, log locations, and configuration tips
  • Add Performance Benchmarks page (docs/oss/core-concepts/performance-benchmarks.md) — ExecJS vs Node renderer comparison, bundle splitting impact, streaming SSR benefits, and real-world results
  • Add cross-references from existing docs (client-vs-server-rendering, react-server-rendering, troubleshooting, oss-vs-pro) to the new pages

Closes #2781

Test plan

  • Verify all internal links resolve correctly
  • Confirm new pages follow existing doc formatting conventions
  • CI passes

🤖 Generated with Claude Code


Note

Low Risk
Low risk: documentation-only changes plus minor wording/link updates; main risk is broken or incorrect doc links/claims.

Overview
Adds new documentation pages for debugging SSR/hydration issues (including recommended ReactOnRails.configure flags), ExecJS SSR limitations (timers/async/browser APIs and workarounds), and SSR performance benchmarks comparing ExecJS vs the Pro Node renderer.

Introduces a Pro React Server Components landing page that links into tutorials/migration/deep-dives, and updates several existing docs to cross-link to the new pages, fix a component-registration console snippet (registeredComponents()), and standardize Node renderer performance claims to 3–10x with a benchmark reference.

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

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive debugging guide for SSR, hydration mismatches, log inspection, and debug flags for enhanced server-side diagnostics.
    • Documented ExecJS runtime limitations (timers, async, browser globals, pool-size caveats) and Node renderer migration guidance.
    • Added performance benchmarks comparing rendering approaches, streaming SSR, and bundle impacts.
    • Introduced React Server Components docs for Pro with streaming, integration, and migration guidance.
    • Minor cross-reference and troubleshooting updates.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 21, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds four new documentation pages (ExecJS limitations, debugging workflow, performance benchmarks, Pro React Server Components landing) and small cross-reference updates across existing docs; all edits are documentation-only and focus on SSR constraints, debugging flags, performance comparisons, and RSC guidance.

Changes

Cohort / File(s) Summary
ExecJS & Performance Core Concepts
docs/oss/core-concepts/execjs-limitations.md, docs/oss/core-concepts/performance-benchmarks.md
Added ExecJS limitations doc covering timers, async, missing DOM/Node APIs, MRI pool notes, debug flags, and migration path to Node renderer; added performance benchmarks comparing ExecJS vs Node renderer, streaming SSR, bundle-splitting, and RSC impact.
Debugging Guide (OSS)
docs/oss/building-features/debugging.md
New debugging workflow documenting ReactOnRails.configure flags (trace, logging_on_server, replay_console, raise_on_prerender_error), common SSR error patterns, hydration-mismatch causes/fixes, inspection steps, logs locations, component registration check, and renderer log env var.
Pro: React Server Components Landing
docs/pro/react-server-components/index.md
New RSC landing page describing RSC basics, Node renderer integration, streaming and auto-bundling behavior, selective hydration, supported features/requirements, and links to getting-started and migration guides.
Cross-reference updates
docs/oss/core-concepts/client-vs-server-rendering.md, docs/oss/core-concepts/react-server-rendering.md, docs/oss/deployment/troubleshooting.md, docs/oss/getting-started/oss-vs-pro.md
Inserted links to the new ExecJS and debugging pages, updated a troubleshooting console snippet (registeredComponents()), and adjusted a Pro RSC link to the new index.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 I hopped through docs at break of dawn,

Tracing timers where SSR dreams yawn,
Logs and streams in a carrot-lined row,
Hydration fixed — the burrow aglow,
A tiny clap for every doc we've drawn ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main changes: adding four new documentation pages (RSC landing, ExecJS limitations, debugging, and benchmarks), which aligns perfectly with the changeset.
Linked Issues check ✅ Passed The pull request fulfills all four primary objectives from issue #2781: RSC landing page added, ExecJS limitations documented, debugging guide provided, and performance benchmarks included. Cross-references updated as required.
Out of Scope Changes check ✅ Passed All changes are within scope of issue #2781: four new documentation files, updates to existing docs for cross-linking, and API name correction (getComponents→registeredComponents). No unrelated changes present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jg/2781-add-docs-pages

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.

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: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/oss/building-features/debugging.md`:
- Around line 78-80: Add a fenced code language identifier to the markdown
snippet that shows the hydration warning so markdownlint MD040 is satisfied:
update the code block that currently starts with ``` followed by the warning
text `Warning: Text content did not match. Server: "March 21" Client: "March
22"` to use ```text (i.e., add "text" after the opening backticks) so the fenced
block is explicitly language-specified.

In `@docs/oss/core-concepts/execjs-limitations.md`:
- Around line 19-22: Several fenced code blocks containing plain error messages
(for example the blocks starting with "ReferenceError: setTimeout is not
defined", "ReferenceError: window is not defined", and "ReferenceError:
TextEncoder is not defined") lack a language tag and trigger markdownlint MD040;
update each of those triple-backtick fences to include a language specifier (use
"text") so they become ```text ... ``` to satisfy markdownlint and preserve the
exact block content in execjs-limitations.md (locate these by searching for the
shown error strings and update the surrounding ``` fences).
🪄 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: 1fa81e17-cae6-4dad-a34c-381350259383

📥 Commits

Reviewing files that changed from the base of the PR and between 3281515 and e6981f9.

📒 Files selected for processing (8)
  • docs/oss/building-features/debugging.md
  • docs/oss/core-concepts/client-vs-server-rendering.md
  • docs/oss/core-concepts/execjs-limitations.md
  • docs/oss/core-concepts/performance-benchmarks.md
  • docs/oss/core-concepts/react-server-rendering.md
  • docs/oss/deployment/troubleshooting.md
  • docs/oss/getting-started/oss-vs-pro.md
  • docs/pro/react-server-components/index.md

Comment thread docs/oss/building-features/debugging.md Outdated
Comment thread docs/oss/core-concepts/execjs-limitations.md Outdated
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: e6981f980a

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

Comment thread docs/oss/core-concepts/performance-benchmarks.md Outdated
Comment thread docs/oss/core-concepts/performance-benchmarks.md Outdated
Comment thread docs/oss/building-features/debugging.md Outdated
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Mar 21, 2026

Greptile Summary

This PR adds four new documentation pages (RSC landing, ExecJS Limitations, Debugging Guide, Performance Benchmarks) and adds cross-reference links from four existing docs. All internal links resolve to existing files, and the new pages are well-structured with appropriate code examples and formatting consistent with the rest of the docs.

Key findings:

  • All 30+ internal relative links across the new pages were verified — every target file exists
  • logging_on_server and replay_console defaults documented as true are confirmed correct against the source code
  • Factual inconsistency in execjs-limitations.md: the claim "Node.js generally provides better performance" than mini_racer conflicts with multiple existing docs (e.g., oss-vs-pro.md and comparison-with-alternatives.md) that consistently describe mini_racer as the OSS standard runtime
  • Internal contradiction in performance-benchmarks.md: the architecture column describes the Node.js ExecJS runtime as "Spawns Node.js per eval" (overhead), yet the "Typical speedup" row claims it is faster than mini_racer's in-process V8 isolate — these two statements are mutually contradictory and should be reconciled

Confidence Score: 4/5

  • Safe to merge after resolving the mini_racer vs Node.js performance claim inconsistency — everything else is well-structured and link-verified.
  • Documentation-only PR with well-structured pages and all links verified. One concrete factual inconsistency spans two new files: the relative performance of mini_racer vs the ExecJS Node.js runtime. The new docs claim Node.js is faster, but existing docs consistently position mini_racer as the recommended OSS runtime, and the new benchmark table's own architecture description contradicts the speedup claim. This should be confirmed and corrected before merging to avoid misleading users.
  • docs/oss/core-concepts/execjs-limitations.md and docs/oss/core-concepts/performance-benchmarks.md — the mini_racer vs Node.js performance claims need to be reconciled with each other and with existing documentation.

Important Files Changed

Filename Overview
docs/oss/building-features/debugging.md New 204-line debugging guide covering SSR configuration, common SSR errors, hydration mismatch diagnosis, log locations, webpack config debugging, and Node Renderer logging. All internal links resolve. Content is accurate and consistent with existing docs.
docs/oss/core-concepts/execjs-limitations.md New 151-line ExecJS limitations page covering timers, async, DOM, TextEncoder, pool size, and migration to Node Renderer. Contains a likely-incorrect claim that "Node.js generally provides better performance" than mini_racer, which contradicts multiple existing docs and the internal performance benchmark table also added in this PR.
docs/oss/core-concepts/performance-benchmarks.md New 121-line performance benchmarks page. The ExecJS comparison table has an internal contradiction: mini_racer is labeled as "Baseline" but described as "V8 isolate in Ruby process" (faster architecture), while Node.js ExecJS is described as "Spawns Node.js per eval" yet claimed to be "~1-2x over mini_racer" (faster). These two claims are contradictory and conflict with existing docs that position mini_racer as the recommended runtime.
docs/pro/react-server-components/index.md New 90-line RSC landing page. Well-structured introduction to RSC support in React on Rails Pro, with all tutorial, migration guide, and deep-dive links verified to exist. Clear requirements section and good "getting started" bifurcation for new vs. migrating users.
docs/oss/core-concepts/client-vs-server-rendering.md Single-line addition linking to the new ExecJS Limitations page. Clean, correct cross-reference.
docs/oss/core-concepts/react-server-rendering.md Two-line addition linking to the new ExecJS Limitations page. Appropriate placement at the end of the existing list of constraints.
docs/oss/deployment/troubleshooting.md Two-line addition cross-referencing the new Debugging Guide under the Advanced Debugging section. Well-placed and accurate.
docs/oss/getting-started/oss-vs-pro.md Link update for the RSC row — now points to the new index.md landing page instead of the how-react-server-components-work.md deep-dive. Correct change.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[New RSC Landing Page\ndocs/pro/react-server-components/index.md] --> B[Tutorial Series]
    A --> C[Migration Guide\ndocs/oss/migrating/]
    A --> D[Deep Dives\nhow-rsc-works, rendering-flow, etc.]

    E[New ExecJS Limitations Page\ndocs/oss/core-concepts/execjs-limitations.md] --> F[Debugging Guide\ndocs/oss/building-features/debugging.md]
    E --> G[Configuration Reference\ndocs/oss/configuration/README.md]
    E --> H[Node Renderer Basics\nbuilding-features/node-renderer/basics.md]

    I[New Performance Benchmarks Page\ndocs/oss/core-concepts/performance-benchmarks.md] --> E
    I --> A

    J[Updated: client-vs-server-rendering.md] -->|cross-ref| E
    K[Updated: react-server-rendering.md] -->|cross-ref| E
    L[Updated: troubleshooting.md] -->|cross-ref| F
    M[Updated: oss-vs-pro.md] -->|RSC link updated| A
Loading

Last reviewed commit: "Add missing docs pag..."

Comment thread docs/oss/core-concepts/execjs-limitations.md Outdated
Comment thread docs/oss/core-concepts/performance-benchmarks.md Outdated
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Mar 21, 2026

test comment please ignore

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Mar 21, 2026

PR Review: Add RSC landing, ExecJS limitations, debugging, and benchmarks pages

Overall, this is a solid set of docs that fills real gaps. All cross-reference links resolve to existing files, the structure is consistent with existing docs, and the content is clearly written. A few factual issues to address before merging:

Critical: Incorrect ExecJS performance claim

performance-benchmarks.md states:

The Node Renderer's persistent process avoids the overhead of re-evaluating the server bundle on each request (ExecJS re-creates the context)

This is factually wrong. Looking at ruby_embedded_java_script.rb, React on Rails uses ConnectionPool to maintain pre-compiled ExecJS contexts across requests. The bundle is evaluated once per pool slot via ExecJS.compile() at pool creation time, and then only eval() is called per request — not a full re-compilation. The Node Renderer's real advantages are async support, multi-worker concurrency, and avoiding IPC overhead — not that ExecJS re-creates its context per request.

Performance table: misleading architecture description

The table row for "ExecJS (Node.js runtime)" says "Spawns Node.js per eval". ExecJS with the Node.js runtime spawns a persistent Node.js subprocess and communicates via pipes — it does not spawn a new process per eval. Something like "Persistent subprocess via IPC" would be more accurate.

Performance table: benchmarks appear reversed

The "Typical speedup" column shows mini_racer as "Baseline" and ExecJS (Node.js runtime) as "~1-2x over mini_racer", implying Node.js runtime is faster. This is typically the opposite: mini_racer embeds V8 directly in the Ruby process (avoiding subprocess IPC overhead) and is generally faster than ExecJS with the Node.js runtime. If there is data supporting this claim, it should be cited; otherwise the comparison should be corrected or removed.

Minor: webpack-specific command in debugging.md

The command bin/webpack --config-dump is webpack-specific and will not work for Rspack users. Since the project supports both bundlers, the guide should note the caveat or include the Rspack equivalent.

Minor: registeredComponents() returns a Map, not a list

In debugging.md: "This returns a list of all components that have been registered" — the actual return type is Map<string, RegisteredComponent> (confirmed in the TypeScript source). Not a blocker, but worth correcting for accuracy.

Comment thread docs/oss/core-concepts/performance-benchmarks.md Outdated
Comment thread docs/oss/core-concepts/performance-benchmarks.md Outdated
Comment thread docs/oss/core-concepts/performance-benchmarks.md Outdated
Comment thread docs/oss/building-features/debugging.md Outdated
Comment thread docs/oss/building-features/debugging.md Outdated
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.

🧹 Nitpick comments (1)
docs/oss/core-concepts/performance-benchmarks.md (1)

18-18: Qualify or source the generalized percentage claims.

Line 18 (10-100x) and Line 33 (40-70%) read as broad guarantees. Please add benchmark context (workload/hardware/app profile) or citations to keep expectations calibrated.

Also applies to: 33-33

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

In `@docs/oss/core-concepts/performance-benchmarks.md` at line 18, Update the
generalized performance claims in the table and surrounding text (specifically
the "10-100x" and "40-70%" entries) to include benchmark context and sources:
either replace the raw ranges with qualified phrasing (e.g., "up to 10–100x
depending on workload and hardware" or "typical improvements of 40–70% in
I/O-bound workloads") and add a short parenthetical describing workload,
hardware, and profiler used (or link to a benchmark citation). Ensure the table
cells containing "10-100x" and the paragraph mentioning "40-70%" cite the
benchmark source or a footnote that links to the benchmark data, and keep the
language non-absolute (use "typical", "up to", or "in our tests").
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@docs/oss/core-concepts/performance-benchmarks.md`:
- Line 18: Update the generalized performance claims in the table and
surrounding text (specifically the "10-100x" and "40-70%" entries) to include
benchmark context and sources: either replace the raw ranges with qualified
phrasing (e.g., "up to 10–100x depending on workload and hardware" or "typical
improvements of 40–70% in I/O-bound workloads") and add a short parenthetical
describing workload, hardware, and profiler used (or link to a benchmark
citation). Ensure the table cells containing "10-100x" and the paragraph
mentioning "40-70%" cite the benchmark source or a footnote that links to the
benchmark data, and keep the language non-absolute (use "typical", "up to", or
"in our tests").

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 68e44f00-afe0-41c6-b341-14d12be5f4c6

📥 Commits

Reviewing files that changed from the base of the PR and between e6981f9 and 2785673.

📒 Files selected for processing (3)
  • docs/oss/building-features/debugging.md
  • docs/oss/core-concepts/execjs-limitations.md
  • docs/oss/core-concepts/performance-benchmarks.md
✅ Files skipped from review due to trivial changes (2)
  • docs/oss/core-concepts/execjs-limitations.md
  • docs/oss/building-features/debugging.md

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Mar 21, 2026

Documentation PR Review

Overall this is a well-structured addition of four documentation pages that fill real gaps (debugging guide, ExecJS limitations, benchmarks, RSC landing page). The cross-referencing is good. A few issues need attention before merging:

Factual Issues

1. mini_racer vs Node.js runtime performance claim is reversed (execjs-limitations.md, line 9)

The document states "Node.js generally provides better performance" than mini_racer, but this is backwards. mini_racer runs V8 directly inside the Ruby process (no subprocess or IPC overhead), while the ExecJS Node.js runtime communicates via stdin/stdout IPC with a subprocess. In practice, mini_racer is faster for SSR. This claim is also inconsistent with the table in performance-benchmarks.md, which sets mini_racer as the Baseline and Node.js runtime at "~1-2x over mini_racer" (implying Node.js is faster). Both files need to agree on the facts.

2. Selective hydration attribution to React 19 (performance-benchmarks.md)

"With streaming SSR and React 19, components hydrate independently"

Selective hydration was introduced in React 18 alongside renderToPipeableStream. React 19 improved RSC support but was not when selective hydration shipped. This should read "React 18+" or just reference renderToPipeableStream without a version claim.

3. Non-existent debugging command (debugging.md, line 158-159)

# Install the binstub (one-time): rake shakapacker:binstubs
bin/shakapacker-config --doctor

bin/shakapacker-config does not appear to exist in Shakapacker. The binstub task is shakapacker:install:binstubs and the correct diagnostic tool for React on Rails is bundle exec rake react_on_rails:doctor. This command will fail for users who try it.

Minor Points

  • docs/pro/react-server-components/index.md — The "Requirements" section lists "React 19" but the "Selective Hydration" subsection says React 19 enables independent hydration, which as noted is a React 18 feature. Worth reviewing the React version requirements for consistency.
  • performance-benchmarks.md — Code splitting is described as a "Pro feature" in the context of bundle analysis, which is accurate for Loadable Components SSR, but standard Webpack/Rspack code splitting via dynamic import() also works in OSS. A clarifying note that this refers specifically to server-side Loadable Components support would help.

Comment thread docs/oss/core-concepts/execjs-limitations.md Outdated
Comment thread docs/oss/core-concepts/performance-benchmarks.md Outdated
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: 27856738f4

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

Comment thread docs/pro/react-server-components/index.md Outdated
Comment thread docs/oss/building-features/debugging.md Outdated
Comment thread docs/oss/core-concepts/performance-benchmarks.md
Comment thread docs/oss/building-features/debugging.md Outdated
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: 1

🧹 Nitpick comments (1)
docs/oss/core-concepts/performance-benchmarks.md (1)

18-18: Qualify or cite broad benchmark ranges to avoid over-claiming.

10-100x and 40-70% are impactful numbers; adding a short methodology note or source link would make these claims more durable and defensible.

✍️ Suggested wording tweak
-| Typical speedup   | Baseline                      | Comparable                    | 10-100x over ExecJS        |
+| Typical speedup   | Baseline                      | Comparable                    | Often significantly faster (workload-dependent) |
...
-For applications with many routes and components, code splitting typically reduces initial bundle size by 40-70%, depending on how much code is shared across routes.
+For applications with many routes and components, code splitting can substantially reduce initial bundle size, depending on route structure and shared dependencies.
+If available, include measurements from your app (for example, before/after webpack-bundle-analyzer reports).

Also applies to: 33-33

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

In `@docs/oss/core-concepts/performance-benchmarks.md` at line 18, The table row
showing "10-100x over ExecJS" (and related "40-70%" elsewhere) needs a short
methodology note and/or citation added to qualify the claim: update the table
cell text to include a parenthetical like "(see methodology footnote)" or add a
superscript link marker, then add a brief footnote or endnote below the table
that states the benchmark methodology (hardware, workload, dataset, measurement
method) and a source link or reference to the test results; ensure the same
treatment is applied to the "40-70%" number so both figures are qualified and a
reader can verify the origin.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/oss/core-concepts/performance-benchmarks.md`:
- Line 45: The table header row uses unhyphenated compound adjectives; update
phrases like "Full Page Load" to "Full-page Load" and any other occurrences such
as "Server Side" or "Server Side Rendering" to "Server-side" / "Server-side
rendering" for consistent compound-adjective hyphenation (edit the table header
line containing "Rendering Strategy | TTFB | Full Page Load" and the other
matching occurrence).

---

Nitpick comments:
In `@docs/oss/core-concepts/performance-benchmarks.md`:
- Line 18: The table row showing "10-100x over ExecJS" (and related "40-70%"
elsewhere) needs a short methodology note and/or citation added to qualify the
claim: update the table cell text to include a parenthetical like "(see
methodology footnote)" or add a superscript link marker, then add a brief
footnote or endnote below the table that states the benchmark methodology
(hardware, workload, dataset, measurement method) and a source link or reference
to the test results; ensure the same treatment is applied to the "40-70%" number
so both figures are qualified and a reader can verify the origin.
🪄 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: 2329b690-8cc6-48c6-bc1a-f127df5fe26d

📥 Commits

Reviewing files that changed from the base of the PR and between 2785673 and 197ce1b.

📒 Files selected for processing (2)
  • docs/oss/core-concepts/execjs-limitations.md
  • docs/oss/core-concepts/performance-benchmarks.md
✅ Files skipped from review due to trivial changes (1)
  • docs/oss/core-concepts/execjs-limitations.md

Comment thread docs/oss/core-concepts/performance-benchmarks.md
Comment thread docs/oss/building-features/debugging.md Outdated
Comment thread docs/oss/core-concepts/execjs-limitations.md
Comment thread docs/oss/core-concepts/performance-benchmarks.md Outdated
Comment thread docs/oss/core-concepts/execjs-limitations.md Outdated
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Mar 22, 2026

Documentation-only PR with no runtime risk. Four issues flagged via inline comments:

  1. bin/shakapacker-config --doctor may not exist (debugging.md line 159) — the --doctor flag is undocumented; verify before shipping.
  2. Missing replay_console in config block (execjs-limitations.md lines 124-129) — the block omits the setting but the text below promises its effect.
  3. Selective hydration is React 18+, not React 19 (performance-benchmarks.md line 55) — pinning it to React 19 is incorrect and raises unnecessary upgrade concerns.
  4. Unsourced 10-100x performance claim (execjs-limitations.md line 151) — the only cited real-world result (Popmenu 73% improvement ~3.7x) does not support 100x. Needs a source or should be softened.

Comment thread docs/oss/core-concepts/performance-benchmarks.md Outdated
Comment thread docs/oss/core-concepts/performance-benchmarks.md Outdated
justin808 and others added 4 commits March 22, 2026 12:35
- Align Node renderer speedup claim to "10-100x" (was "Several times"),
  matching oss-vs-pro.md and other pages
- Add missing clearTimeout to ExecJS unsupported timer list
- Fix misleading server-bundle manifest grep in debugging guide (server
  bundles default to ssr-generated/, not public/packs/)
- Fix incorrect ReactOnRails.getComponents() API name in
  troubleshooting.md (correct: registeredComponents())
- Qualify Node renderer timer/module capabilities with required config
  (stubTimers defaults on, supportModules defaults off)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replace unsupported "10-100x over ExecJS" with data-backed "3-10x"
  range and link to Popmenu case study for evidence
- Clarify that node renderer requires separate npm package install,
  not "included with Pro"

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The selective hydration section described benefits as if they work by
default, but React on Rails uses defer scripts by default which defeat
selective hydration. Added a note about the required
generated_component_packs_loading_strategy = :async configuration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix hardcoded server-bundle.js filename in debugging.md (defaults to "")
- Fix DOM id example: use UUID format matching random_dom_id default
- Fix doctor task description: runs diagnostics, not config dump
- Fix timer error messages: RoR injects stubs, so ReferenceError won't occur
- Align SSR speedup claims to data-backed "3-10x" across all pages
- Soften unsourced 40-70% bundle reduction claim

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@justin808 justin808 force-pushed the jg/2781-add-docs-pages branch from 1dab611 to fcbb24a Compare March 22, 2026 22:35
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Mar 22, 2026

Overall this is a well-structured documentation addition. The new pages are accurate, well-organized, and cross-referenced properly. A few items to address.

Issue 1: Incomplete 10-100x to 3-10x update — two files missed

The PR correctly updates the performance claim in several files, but two instances were missed:

  • docs/oss/core-concepts/react-server-rendering.md line 39 — the tip block still reads "improves SSR performance by 10-100x". This sits directly adjacent to the newly added ExecJS cross-reference, making the inconsistency visible.

  • docs/oss/getting-started/quick-start.md line 193 — a tip block a few lines above the updated line still reads "a Node renderer for 10-100x faster SSR". The update corrected one mention on that page but left another in the same file.

Additionally, docs/pro/node-renderer.md line 20, docs/pro/home-pro.md line 25, and docs/oss/deployment/server-rendering-tips.md line 4 still say 10-100x. These may be intentional if the revision only targets OSS getting-started docs, but worth confirming.

Issue 2: RSC version constraint will become stale

In docs/pro/react-server-components/index.md the requirement reads: "React 19.0.x (19.1.x and later are not yet supported)". This will silently become inaccurate when support expands. Consider linking to a canonical compatibility table or the Pro changelog instead, or adding a note like "check the release notes for the latest compatibility status".

Minor Notes

  • The getComponents() to registeredComponents() fix in troubleshooting.md is correct and consistent with the new debugging.md.
  • generated_component_packs_loading_strategy = :async in performance-benchmarks.md is accurate (verified against the codebase).
  • All cross-linked files were verified to exist (migrating-to-rsc.md, RSC tutorial series, docs/pro/installation.md).
  • The benchmark table uses "Typical speedup" which appropriately signals approximate figures.

Comment thread docs/oss/core-concepts/react-server-rendering.md Outdated
Comment thread docs/pro/react-server-components/index.md
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: fcbb24a317

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

In most cases, you should use the `prerender: false` (default behavior) with the provided helper method to render the React component from your Rails views. In some cases, such as when SEO is vital, or many users will not have JavaScript enabled, you can enable server-rendering by passing `prerender: true` to your helper, or you can simply change the default in `config/initializers/react_on_rails`.

Now the server will interpret your JavaScript. The default is to use [ExecJS](https://github.com/rails/execjs) and pass the resulting HTML to the client. By default, ExecJS uses the Node.js runtime. You can use alternative runtimes as outlined in [ExecJS readme](https://github.com/rails/execjs/blob/master/README.md).
Now the server will interpret your JavaScript. The default is to use [ExecJS](https://github.com/rails/execjs) and pass the resulting HTML to the client. By default, ExecJS uses the Node.js runtime. You can use alternative runtimes as outlined in [ExecJS readme](https://github.com/rails/execjs/blob/master/README.md). For details on ExecJS constraints with timers, async, and browser APIs, see [ExecJS Limitations](./execjs-limitations.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.

P2 Badge Stop stating that ExecJS defaults to Node.js

Fresh evidence: this commit repeats the same default-runtime claim in a second SSR guide. React on Rails never selects ExecJS.runtime; RubyEmbeddedJavaScript#create_js_context just calls ExecJS.compile, so apps with mini_racer or another installed ExecJS runtime will not be using Node here. That sends readers to the wrong runtime-specific troubleshooting path, especially because the very next note discusses a mini_racer-only TextEncoder failure.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Duplicate of the ExecJS runtime detection comment on execjs-limitations.md. Tracking the broader ExecJS accuracy review in a follow-up issue.

Comment thread docs/oss/building-features/debugging.md
- **Largest Contentful Paint (LCP):** When the main content becomes visible
- **Total Blocking Time (TBT):** Time the main thread is blocked during page load
- **Client bundle size:** Total JavaScript downloaded by the browser
- **Server render time:** Time spent in the SSR process (logged by React on Rails when `logging_on_server` is enabled)
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 Remove the claim that Rails logs include SSR timings

This measurement guidance points readers to a metric React on Rails does not emit. logging_on_server only replays captured console lines to Rails.logger in RubyEmbeddedJavaScript#parse_result_and_replay_console_messages, and the Pro streaming helpers only add disconnect warnings; neither path records per-request render durations. Users following this section will waste time hunting through Rails logs for "server render time" instead of adding their own instrumentation or using the node renderer's timing logs.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Valid point — logging_on_server replays console messages, not render durations. Tracking in a follow-up issue to clarify what metrics are actually available.

Aligns the SSR tip block in react-server-rendering.md with the 3-10x
figure used consistently across all other docs pages.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Mar 22, 2026

test

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Mar 22, 2026

Documentation Guide

React on Rails is one product with two tiers: open source for Rails + React integration, and Pro when you need higher SSR throughput, deeper RSC support, or maintainer-backed help.

Choose the path that matches your app

Starting a new Rails + React app

Adding React to an existing Rails app

Already using React on Rails OSS?

Evaluating Rails + React options

Dive deeper when you need it

Pro features

Friendly evaluation policy

  • You can try React on Rails Pro without a license while evaluating.
  • If your organization is budget-constrained, contact us about free licenses.

Need more help?

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Mar 22, 2026

CLAUDE.md

Tool-specific guidance for Claude Code in this repository.

Source of Truth

AGENTS.md is the canonical policy for:

  • Commands, tests, and lint workflow
  • Formatting and style requirements
  • Git/PR safety boundaries
  • Project directory boundaries

If this file conflicts with AGENTS.md, follow AGENTS.md.

Behavioral Defaults

  • When confident in your changes, commit and push without asking for permission. Always monitor CI after pushing.

Git Safety

  • NEVER force-push (--force, --force-with-lease) unless the user explicitly requests it. Force-pushing destroys commit history that may represent significant prior work.
  • NEVER git reset --hard on a branch that has existing commits (yours or others'). This destroys work.
  • When you need to start fresh or test something without affecting an existing branch, use a git worktree (git worktree add) or create a new branch instead of resetting the current one.
  • If a rebase has conflicts, abort and ask the user how to proceed rather than force-pushing a rewritten history.

Claude-Specific Workflow

Use these docs for Claude-oriented operational guidance:

  • .claude/docs/avoiding-ci-failure-cycles.md
  • .claude/docs/replicating-ci-failures.md
  • .claude/docs/playwright-e2e-testing.md
  • .claude/docs/merge-conflict-workflow.md
  • .claude/docs/pr-splitting-strategy.md
  • .claude/docs/changelog-guidelines.md
  • .claude/docs/project-architecture.md
  • .claude/docs/rails-engine-nuances.md
  • .claude/docs/debugging-webpack.md
  • .claude/docs/rbs-type-checking.md
  • .claude/docs/conductor-compatibility.md
  • .claude/docs/testing-build-scripts.md
  • .claude/docs/main-health-monitoring.md
  • .claude/docs/managing-file-paths.md

For Pro-package specifics, also read react_on_rails_pro/CLAUDE.md.

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Mar 22, 2026

AGENTS.md

Instructions for AI coding agents working on the React on Rails codebase.

React on Rails is a Ruby gem + npm package that integrates React with Ruby on Rails, providing server-side rendering (SSR) via Node.js or ExecJS. This is a monorepo: the open-source gem lives at react_on_rails/, the npm package at packages/react-on-rails/, and the Pro package at react_on_rails_pro/.

Reusable Workflows

  • AGENTS.md: canonical entry point for agent instructions and workflow discovery
  • .claude/commands/: Claude Code slash commands
  • .agents/workflows/: shared prompt templates and reusable workflows for Codex, GPT, and other non-Claude tools
  • When the user asks to address PR review comments outside Claude slash commands, follow .agents/workflows/address-review.md

Canonical Agent Policy

AGENTS.md is the canonical source for repository-wide agent rules:

  • Commands and test/lint workflow
  • Code style and formatting expectations
  • Git/PR boundaries and safety rules
  • Directory and documentation boundaries

Other agent-facing docs (for example CLAUDE.md) should contain only tool-specific workflow notes and link back here.
If there is a conflict, AGENTS.md wins.

Commands

# Install dependencies
bundle && pnpm install

# Build TypeScript → JavaScript
pnpm run build

# Lint (MANDATORY before every commit)
bundle exec rubocop                  # Ruby — must pass with zero offenses
pnpm run lint                        # JS/TS via ESLint
pnpm start format.listDifferent      # Check Prettier formatting
rake lint                            # All linting (Ruby + JS + formatting)

# Auto-fix formatting
rake autofix                         # Preferred for all formatting

# Run tests
rake run_rspec:gem                   # Ruby unit tests (gem code)
rake run_rspec:dummy                 # Ruby integration tests (dummy Rails app)
pnpm run test                        # JavaScript/TypeScript tests
rake                                 # Full suite (lint + all tests except examples)

# Type checking
pnpm run type-check                  # TypeScript
bundle exec rake rbs:validate        # RBS signatures

# Additional test subsets
rake run_rspec                       # All Ruby tests
rake all_but_examples                # All tests except generated examples
rake run_rspec:shakapacker_examples_basic  # Single example test

# Full initial setup
bundle && pnpm install && rake shakapacker_examples:gen_all && rake node_package && rake

# CI/workflow linting
actionlint                           # GitHub Actions lint
yamllint .github/                    # YAML lint (do NOT run RuboCop on .yml files)

# Dependency version updates
rake shakapacker:update_version[9.6.1]  # Update shakapacker across the monorepo

Updating Shakapacker

Use rake shakapacker:update_version[VERSION] to update shakapacker across the entire monorepo. This single command updates all Gemfiles, package.json files, Gemfile.lock files, and pnpm-lock.yaml. Do not manually edit individual version references — always use the rake task to keep everything in sync.

The task handles Ruby version switching for apps that require a different Ruby version (set RUBY_VERSION_MANAGER to rvm, rbenv, asdf, or mise if needed; defaults to rvm). It continues gracefully if a single lock file update fails (e.g., due to a missing Ruby version).

Testing

  • Prefer local testing over CI iteration — don't push "hopeful" fixes. Apply the 15-minute rule: if 15 more minutes of local testing would catch the issue before CI does, spend the 15 minutes.
  • Never claim a test is "fixed" without running it locally first. Use "This SHOULD fix..." or "Proposed fix (UNTESTED)" for unverified changes.
  • Ruby: RSpec. Unit tests in react_on_rails/spec/react_on_rails/, integration tests via a dummy Rails app in react_on_rails/spec/dummy/.
  • JavaScript/TypeScript: Jest. Tests in packages/react-on-rails/tests/.
  • E2E: Playwright. Tests in react_on_rails/spec/dummy/e2e/playwright/e2e/. Run with cd react_on_rails/spec/dummy && pnpm test:e2e.
  • The dummy app (react_on_rails/spec/dummy/) is a full Rails application used for integration testing. Many tests require it.

Run specific test files:

bundle exec rspec react_on_rails/spec/react_on_rails/path/to/spec.rb
cd react_on_rails/spec/dummy && bundle exec rspec spec/path/to/spec.rb

Project Structure

Directory Purpose
react_on_rails/lib/react_on_rails/ Ruby gem source — helpers, configuration, SSR pool, engine
react_on_rails/lib/generators/ Rails generators for react_on_rails:install
react_on_rails/spec/ RSpec tests (unit + integration via dummy app)
react_on_rails/spec/dummy/ Full Rails app for integration testing and E2E
packages/react-on-rails/src/ TypeScript source — client-side React integration
packages/react-on-rails/tests/ Jest tests for the npm package
react_on_rails_pro/ Pro package (separate gem + npm, own lint config)
rakelib/ Rake task definitions
docs/oss/ OSS documentation — published to the ShakaCode website
docs/pro/ Pro documentation — installation, configuration, RSC, node renderer, caching
internal/contributor-info/ Internal contributor docs (not published to the website)
internal/planning/ Internal planning docs, drafts, and historical analysis
internal/react_on_rails_pro/contributors-info/ Internal Pro contributor docs (not published to the website)
analysis/ Investigation and analysis documents (kebab-case .md files)

Code Style

Ruby (RuboCop)

Line length max 120 characters. Run bundle exec rubocop [file] to check.

Line length — break long chains:

# Bad
content = pack_content.gsub(/import.*from.*['"];/, "").gsub(/ReactOnRails\.register.*/, "")

# Good
content = pack_content.gsub(/import.*from.*['"];/, "")
                      .gsub(/ReactOnRails\.register.*/, "")

Named subjects in RSpec:

# Bad
subject { instance.method_name(arg) }

# Good
subject(:method_result) { instance.method_name(arg) }

Security violations — scope disable comments tightly:

# rubocop:disable Security/Eval
expect { evaluate(sanitized_content) }.not_to raise_error
# rubocop:enable Security/Eval

JavaScript/TypeScript

Prettier handles all formatting. Never manually format — run rake autofix instead.

Git Workflow

Branch naming: type/descriptive-name (e.g., fix/ssr-hydration-mismatch)

Commit messages: Explain why, not what. One logical change per commit.

PR creation: Use gh pr create with a clear title, summary, and test plan.

Review Workflow

For small, focused PRs (roughly 5 files changed or fewer and one clear purpose):

  • Use at most one AI reviewer that leaves inline comments. Additional AI tools should be summary-only or used manually.
  • Wait for the first full review pass to finish before pushing follow-up commits.
  • Batch review fixes into one follow-up push when practical. Do not create a new commit for each minor comment.
  • Treat as blocking only: correctness bugs, failing tests, regressions, and clear inconsistencies with adjacent code. Nits and style suggestions are optional unless a maintainer asks for them.
  • Verify language, runtime, and library claims locally before changing code in response to AI review comments.
  • Deduplicate repeated bot comments before acting on them. Fix the underlying issue once, then resolve the duplicates.
  • Rebase or merge main once, near the end of the review cycle. For CHANGELOG.md conflicts, prefer resolving them as the final step before merge.
  • When asking an agent to address review comments, instruct it to classify comments into blocking, optional, and noise, then apply only the blocking items plus any explicitly selected optional items.

Boundaries

Always

  • Run bundle exec rubocop before committing — CI will reject violations
  • Use pnpm for all JS operations — never npm or yarn
  • Use bundle exec for Ruby commands
  • Ensure all files end with a newline
  • Let Prettier and RuboCop handle formatting — never format manually

Ask First

  • Destructive git operations (force push, reset --hard, branch deletion)
  • Changes to CI workflows (.github/workflows/)
  • Changes to build configuration (package.json scripts, webpack config)
  • Modifying the Pro package (react_on_rails_pro/)

Never

  • Skip pre-commit hooks (--no-verify)
  • Commit secrets, credentials, or .env files
  • Commit package-lock.json, yarn.lock, or other non-pnpm lock files
  • Add files to the docs/ root — OSS docs go in docs/oss/ subdirectories (getting-started/, core-concepts/, building-features/, configuration/, api-reference/, deployment/, migrating/, upgrading/, misc/); Pro docs go in docs/pro/
  • Force push to main or master

Key Concept: File Suffixes vs. RSC Directive

React on Rails has two independent systems that both use "client" and "server" terminology. Do not confuse them.

1. Bundle Placement (.client. / .server. file suffixes)

A React on Rails auto-bundling feature that controls which webpack bundle imports a file. This exists independently of React Server Components and is used with or without RSC:

  • Component.client.jsx → imported only in the client bundle (browser)
  • Component.server.jsx → imported only in the server bundle (and RSC bundle when RSC enabled)
  • Component.jsx (no suffix) → imported in both bundles

This controls where the source file is loaded, nothing more. A .server.jsx file is NOT a React Server Component — it is simply a file that webpack includes in the server bundle (and the RSC bundle when RSC is enabled). These suffixes only make sense for client components, as server components exist only in the RSC bundle.

2. RSC Classification ('use client' directive)

The 'use client' directive is part of the React Server Components architecture. It marks a component as a React Client Component. Components without it are treated as React Server Components.

When auto-bundling is enabled with RSC support (Pro feature), React on Rails uses this directive to control:

  • Registration: 'use client'ReactOnRails.register(), no 'use client'registerServerComponent()
  • RSC bundling: The RSC webpack loader uses this directive to decide whether a component is included in the RSC bundle or replaced with a client reference in that bundle

The client_entrypoint? method in packs_generator.rb checks for this directive.

They Are Orthogonal

A .client.jsx file can be a React Server Component (if it lacks 'use client'), and a .server.jsx file can be a React Client Component (if it has 'use client'). In practice, paired .client./.server. files should have consistent 'use client' status because the client and server must agree on the component's RSC role for hydration to work.

Changelog

Update /CHANGELOG.md for user-visible changes only (features, bug fixes, breaking changes, deprecations, performance improvements). Do not add entries for linting, formatting, refactoring, tests, or doc fixes.

  • Format: [PR 1818](https://github.com/shakacode/react_on_rails/pull/1818) by [username](https://github.com/username) (no hash before PR number)
  • Pro-only changes use an inline **[Pro]** tag prefix within the standard category sections (e.g., - **[Pro]** **Feature name**: Description...); do NOT create separate #### Pro subsections

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Mar 22, 2026

Code Review

This PR adds four documentation pages (debugging guide, ExecJS limitations, performance benchmarks, RSC landing) plus cross-reference updates. Overall the content is accurate and well-structured. A few items worth discussing:

All internal links verified - every relative path in the new files resolves to an existing file in the repo.

All technical claims verified:

  • logging_on_server: true and replay_console: true are the correct defaults (confirmed in configuration.rb)
  • server_bundle_output_path defaulting to ssr-generated/ is confirmed
  • Timer stub behavior (silent when trace: false, console.error with stack trace when trace: true) matches ruby_embedded_java_script.rb
  • server_renderer_pool_size must be 1 on MRI - confirmed in config docs
  • RENDERER_STUB_TIMERS and RENDERER_SUPPORT_MODULES env vars exist in the node renderer package

Issues worth addressing:

  1. execjs-limitations.md - fetch example is misleading

The async section shows fetch() inside an async component with the comment Never completes in ExecJS. But fetch is itself a browser API that is also unavailable in ExecJS (same as window/document) - it is not merely async. A user might think the fix is to make their fetch call synchronous, when fetch is simply not available at all. The example would be clearer using a plain await somePromise instead, or by adding a note that fetch is doubly unavailable.

  1. performance-benchmarks.md - title/content mismatch

The page is titled Performance Benchmarks but contains no actual benchmark numbers - only qualitative descriptors (Baseline, 3-10x over ExecJS), one real-world case study (Popmenu 73%), and a Frigade blog reference. Consider renaming to Performance Characteristics or Performance Overview, or adding a note that the 3-10x figure is an observed range from production deployments rather than a controlled benchmark.

  1. docs/pro/react-server-components/index.md line 49 - version constraint will go stale

React 19.0.x (19.1.x and later are not yet supported) is a patch-level constraint that will become outdated quickly (19.1.x is already released). The same wording is in docs/oss/api-reference/generator-details.md. Consider linking to the CHANGELOG or a compatibility matrix rather than hardcoding it in the landing page.

Minor nits (not blocking):

  • debugging.md line 13: the trace config comment mentions stack traces for setTimeout/setInterval calls but this is ExecJS-specific; adding (ExecJS only) would prevent confusion for Node renderer users.
  • execjs-limitations.md line 108: the pool size section does not distinguish between mini_racer and Node.js ExecJS runtime. Both share the MRI constraint but for different underlying reasons.


```javascript
// This component will render before data loads
async function UserProfile({ userId }) {
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 comment "Never completes in ExecJS" frames this as an async/await problem, but fetch is also a browser API that is unavailable in ExecJS entirely (same as window/document). A user might conclude the fix is to make the fetch synchronous, when fetch doesn't exist at all in ExecJS.

Consider replacing fetch with a plain promise to keep the example focused on the async limitation:

Suggested change
async function UserProfile({ userId }) {
const data = await loadUserData(userId); // Promise never resolves in ExecJS

Or add a note: "fetch is also unavailable in ExecJS (it's a browser API) — this example fails for two reasons: fetch is undefined, and even if it weren't, the Promise would never resolve."

@@ -0,0 +1,127 @@
# Performance Benchmarks
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 page title "Performance Benchmarks" sets an expectation of reproducible, controlled benchmark data. However the content only has qualitative comparisons ("3-10x over ExecJS", "Baseline", "Comparable"), one production case study (Popmenu), and an external blog post. There are no actual numbers from a controlled benchmark run.

Consider renaming to "Performance Characteristics" or "Performance Overview" to better match the content, or add a callout noting that figures like "3-10x" are observed ranges from production deployments and not controlled benchmarks.

Suggested change
# Performance Benchmarks
# Performance Characteristics


- React on Rails Pro v4.0.0 or higher
- React 19.0.x (19.1.x and later are not yet supported)
- React on Rails v16.0.0 or higher
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 patch-level version constraint will go stale quickly — React 19.1.x is already released. The same wording also appears in docs/oss/api-reference/generator-details.md. Hardcoding this in the landing page means users will see incorrect requirements after support is extended.

Consider linking to a maintained reference instead, e.g.:

Suggested change
- React on Rails v16.0.0 or higher
- React 19.0.x or later (see [CHANGELOG](../../../CHANGELOG.md) for current compatibility)

Or at minimum, make it clear this is a current snapshot: "As of React on Rails Pro v4.0, React 19.0.x is supported; 19.1.x is not yet validated."

@justin808 justin808 merged commit fded819 into main Mar 23, 2026
14 checks passed
@justin808 justin808 deleted the jg/2781-add-docs-pages branch March 23, 2026 00:49
justin808 added a commit that referenced this pull request Mar 23, 2026
## Summary

Fixes #2804

Audits and corrects ExecJS technical claims across four docs pages added
in #2785:

- **Runtime auto-detection**: Corrected "By default, ExecJS uses the
Node.js runtime" — ExecJS actually auto-detects via `best_available`,
preferring mini_racer and Bun over Node.js
- **Node.js process model**: Changed "Persistent subprocess via IPC" to
"New process per eval call" — ExecJS's `ExternalRuntime` spawns a fresh
Node.js process per evaluation via `IO.popen`
- **Timer polyfill behavior**: Corrected debugging page claim that users
see `setTimeout is not defined` errors — React on Rails polyfills timers
as silent no-ops (or console.error with `trace: true`)
- **SSR timing logging**: Removed incorrect claim that
`logging_on_server` logs render durations — it actually replays console
messages to `Rails.logger`
- **pool_size explanation**: Improved accuracy of why `pool_size=1` is
required on MRI, citing the actual threading/deadlock cause and linking
to #1438

## Test plan

- [ ] Verify all four docs pages render correctly in the documentation
site
- [ ] Confirm no broken markdown links
- [ ] Cross-reference claims against ExecJS source code and React on
Rails `RubyEmbeddedJavaScript`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Docs-only changes; risk is limited to potentially confusing readers if
any updated ExecJS/runtime claims are still inaccurate.
> 
> **Overview**
> Updates OSS docs to correct several ExecJS-related technical claims
across debugging, rendering, limitations, and performance pages.
> 
> Clarifies that ExecJS *auto-selects* the best available runtime
(override via `EXECJS_RUNTIME`), explains that timer APIs are stubbed as
no-ops during SSR (with `clearInterval` runtime-dependent) and how
`trace`/`replay_console`/`logging_on_server` surface warnings, fixes the
Node.js runtime process model description, and refines guidance on SSR
timing measurement and why MRI requires `server_renderer_pool_size = 1`
(deadlock explanation + issue link).
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
5296d8b. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Documentation**
* Clarified ExecJS runtime auto-detection: it now prefers the best
available runtime (may choose mini_racer or Bun over Node) and can be
overridden via an environment variable.
* Clarified SSR timer behavior: common timer functions are stubbed as
no-ops, some clear operations may vary by runtime, and trace/logging
settings emit warnings that can be replayed to browser devtools and
Rails logs.
* Updated guidance on renderer/process behavior, server render timing
measurement, and server-render pool-size considerations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
justin808 added a commit that referenced this pull request Mar 25, 2026
## Summary

- Stamp `### [16.5.0.rc.0]` version header with today's date
- Add 10 new changelog entries for PRs merged since v16.4.0
- Fix incomplete PR 2818 entry (missing author link)

### New entries added

**Added:**
- `create-react-on-rails-app --pro` support (PR 2818)
- Global prerender env override `REACT_ON_RAILS_PRERENDER_OVERRIDE` (PR
2816)
- `react_on_rails:sync_versions` rake task (PR 2797)
- Pro/RSC setup checks in `react_on_rails:doctor` (PR 2674)

**Changed:**
- [Pro] Canonical env var for worker count is now
`RENDERER_WORKERS_COUNT` (PR 2611)

**Improved:**
- Smoother `create-react-on-rails-app` and install generator flows (PR
2650)
- Pro upgrade hint after install (PR 2642)

**Fixed:**
- Preserve runtime env vars across `Bundler.with_unbundled_env` (PR
2836)
- Fix doctor prerender check and ExecJS display for Pro/RSC apps (PR
2773)
- Fix doctor false positives for custom layouts (PR 2612)

### Skipped PRs (not user-visible)

Docs-only: #2845, #2842, #2826, #2830, #2820, #2809, #2803, #2785,
#2801, #2791, #2789, #2788, #2772, #2778, #2780, #2784, #2671, #2676,
#2662, #2657, #2669
CI/internal tooling: #2825, #2817, #2819, #2812, #2815, #2810, #2808,
#2807, #2634, #2798, #2761, #2760, #2658, #2639, #2667, #2656

## Test plan

- [x] Verified version header and diff links are correct
- [x] Verified all entries follow changelog formatting conventions
- [x] Verified file ends with newline
- [ ] After merge, run `rake release` to publish 16.5.0.rc.0

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Documentation-only change updating `CHANGELOG.md` with a new
`16.5.0.rc.0` section and compare links; no runtime code is modified.
> 
> **Overview**
> Adds a new `16.5.0.rc.0` (2026-03-25) section to `CHANGELOG.md`,
consolidating recent PR entries under **Added/Changed/Improved/Fixed**
and correcting the previously incomplete `--pro` CLI entry author
attribution.
> 
> Updates the bottom compare links so `[unreleased]` now compares from
`v16.5.0.rc.0` and adds a link definition for `[16.5.0.rc.0]`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
481a71c. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

## Release Notes - v16.5.0.rc.0

* **New Features**
  * Added sync_versions task for streamlined version management
  * Expanded doctor checks for Pro and RSC support

* **Improvements**
  * Enhanced generator workflow and Pro upgrade guidance
  * Improved environment variable handling and preservation

* **Bug Fixes**
* Fixed detection issues with doctor tools and ExecJS/prerender
functionality

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
justin808 added a commit that referenced this pull request Mar 30, 2026
…pages (#2785)

- Add RSC landing page (`docs/pro/react-server-components/index.md`) —
top-level introduction to React Server Components support, linking to
tutorial, migration guide, and deep dives
- Add ExecJS Limitations page
(`docs/oss/core-concepts/execjs-limitations.md`) — documents timer/async
constraints, common errors, workarounds, and migration path to Node
renderer
- Add Debugging Guide (`docs/oss/building-features/debugging.md`) — SSR
debugging workflows, hydration mismatch diagnosis, log locations, and
configuration tips
- Add Performance Benchmarks page
(`docs/oss/core-concepts/performance-benchmarks.md`) — ExecJS vs Node
renderer comparison, bundle splitting impact, streaming SSR benefits,
and real-world results
- Add cross-references from existing docs (client-vs-server-rendering,
react-server-rendering, troubleshooting, oss-vs-pro) to the new pages

Closes #2781

- [ ] Verify all internal links resolve correctly
- [ ] Confirm new pages follow existing doc formatting conventions
- [ ] CI passes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk: documentation-only changes plus minor wording/link updates;
main risk is broken or incorrect doc links/claims.
>
> **Overview**
> Adds new documentation pages for **debugging SSR/hydration issues**
(including recommended `ReactOnRails.configure` flags), **ExecJS SSR
limitations** (timers/async/browser APIs and workarounds), and **SSR
performance benchmarks** comparing ExecJS vs the Pro Node renderer.
>
> Introduces a Pro **React Server Components** landing page that links
into tutorials/migration/deep-dives, and updates several existing docs
to cross-link to the new pages, fix a component-registration console
snippet (`registeredComponents()`), and standardize Node renderer
performance claims to *3–10x* with a benchmark reference.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
cb657d0. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

* **Documentation**
* Added a comprehensive debugging guide for SSR, hydration mismatches,
log inspection, and debug flags for enhanced server-side diagnostics.
* Documented ExecJS runtime limitations (timers, async, browser globals,
pool-size caveats) and Node renderer migration guidance.
* Added performance benchmarks comparing rendering approaches, streaming
SSR, and bundle impacts.
* Introduced React Server Components docs for Pro with streaming,
integration, and migration guidance.
  * Minor cross-reference and troubleshooting updates.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
justin808 added a commit that referenced this pull request Mar 30, 2026
## Summary

Fixes #2804

Audits and corrects ExecJS technical claims across four docs pages added
in #2785:

- **Runtime auto-detection**: Corrected "By default, ExecJS uses the
Node.js runtime" — ExecJS actually auto-detects via `best_available`,
preferring mini_racer and Bun over Node.js
- **Node.js process model**: Changed "Persistent subprocess via IPC" to
"New process per eval call" — ExecJS's `ExternalRuntime` spawns a fresh
Node.js process per evaluation via `IO.popen`
- **Timer polyfill behavior**: Corrected debugging page claim that users
see `setTimeout is not defined` errors — React on Rails polyfills timers
as silent no-ops (or console.error with `trace: true`)
- **SSR timing logging**: Removed incorrect claim that
`logging_on_server` logs render durations — it actually replays console
messages to `Rails.logger`
- **pool_size explanation**: Improved accuracy of why `pool_size=1` is
required on MRI, citing the actual threading/deadlock cause and linking
to #1438

## Test plan

- [ ] Verify all four docs pages render correctly in the documentation
site
- [ ] Confirm no broken markdown links
- [ ] Cross-reference claims against ExecJS source code and React on
Rails `RubyEmbeddedJavaScript`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Docs-only changes; risk is limited to potentially confusing readers if
any updated ExecJS/runtime claims are still inaccurate.
> 
> **Overview**
> Updates OSS docs to correct several ExecJS-related technical claims
across debugging, rendering, limitations, and performance pages.
> 
> Clarifies that ExecJS *auto-selects* the best available runtime
(override via `EXECJS_RUNTIME`), explains that timer APIs are stubbed as
no-ops during SSR (with `clearInterval` runtime-dependent) and how
`trace`/`replay_console`/`logging_on_server` surface warnings, fixes the
Node.js runtime process model description, and refines guidance on SSR
timing measurement and why MRI requires `server_renderer_pool_size = 1`
(deadlock explanation + issue link).
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
5296d8b. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Documentation**
* Clarified ExecJS runtime auto-detection: it now prefers the best
available runtime (may choose mini_racer or Bun over Node) and can be
overridden via an environment variable.
* Clarified SSR timer behavior: common timer functions are stubbed as
no-ops, some clear operations may vary by runtime, and trace/logging
settings emit warnings that can be replayed to browser devtools and
Rails logs.
* Updated guidance on renderer/process behavior, server render timing
measurement, and server-render pool-size considerations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
justin808 added a commit that referenced this pull request Apr 6, 2026
…pages (#2785)

- Add RSC landing page (`docs/pro/react-server-components/index.md`) —
top-level introduction to React Server Components support, linking to
tutorial, migration guide, and deep dives
- Add ExecJS Limitations page
(`docs/oss/core-concepts/execjs-limitations.md`) — documents timer/async
constraints, common errors, workarounds, and migration path to Node
renderer
- Add Debugging Guide (`docs/oss/building-features/debugging.md`) — SSR
debugging workflows, hydration mismatch diagnosis, log locations, and
configuration tips
- Add Performance Benchmarks page
(`docs/oss/core-concepts/performance-benchmarks.md`) — ExecJS vs Node
renderer comparison, bundle splitting impact, streaming SSR benefits,
and real-world results
- Add cross-references from existing docs (client-vs-server-rendering,
react-server-rendering, troubleshooting, oss-vs-pro) to the new pages

Closes #2781

- [ ] Verify all internal links resolve correctly
- [ ] Confirm new pages follow existing doc formatting conventions
- [ ] CI passes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk: documentation-only changes plus minor wording/link updates;
main risk is broken or incorrect doc links/claims.
>
> **Overview**
> Adds new documentation pages for **debugging SSR/hydration issues**
(including recommended `ReactOnRails.configure` flags), **ExecJS SSR
limitations** (timers/async/browser APIs and workarounds), and **SSR
performance benchmarks** comparing ExecJS vs the Pro Node renderer.
>
> Introduces a Pro **React Server Components** landing page that links
into tutorials/migration/deep-dives, and updates several existing docs
to cross-link to the new pages, fix a component-registration console
snippet (`registeredComponents()`), and standardize Node renderer
performance claims to *3–10x* with a benchmark reference.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
cb657d0. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

* **Documentation**
* Added a comprehensive debugging guide for SSR, hydration mismatches,
log inspection, and debug flags for enhanced server-side diagnostics.
* Documented ExecJS runtime limitations (timers, async, browser globals,
pool-size caveats) and Node renderer migration guidance.
* Added performance benchmarks comparing rendering approaches, streaming
SSR, and bundle impacts.
* Introduced React Server Components docs for Pro with streaming,
integration, and migration guidance.
  * Minor cross-reference and troubleshooting updates.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
justin808 added a commit that referenced this pull request Apr 6, 2026
## Summary

Fixes #2804

Audits and corrects ExecJS technical claims across four docs pages added
in #2785:

- **Runtime auto-detection**: Corrected "By default, ExecJS uses the
Node.js runtime" — ExecJS actually auto-detects via `best_available`,
preferring mini_racer and Bun over Node.js
- **Node.js process model**: Changed "Persistent subprocess via IPC" to
"New process per eval call" — ExecJS's `ExternalRuntime` spawns a fresh
Node.js process per evaluation via `IO.popen`
- **Timer polyfill behavior**: Corrected debugging page claim that users
see `setTimeout is not defined` errors — React on Rails polyfills timers
as silent no-ops (or console.error with `trace: true`)
- **SSR timing logging**: Removed incorrect claim that
`logging_on_server` logs render durations — it actually replays console
messages to `Rails.logger`
- **pool_size explanation**: Improved accuracy of why `pool_size=1` is
required on MRI, citing the actual threading/deadlock cause and linking
to #1438

## Test plan

- [ ] Verify all four docs pages render correctly in the documentation
site
- [ ] Confirm no broken markdown links
- [ ] Cross-reference claims against ExecJS source code and React on
Rails `RubyEmbeddedJavaScript`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Docs-only changes; risk is limited to potentially confusing readers if
any updated ExecJS/runtime claims are still inaccurate.
> 
> **Overview**
> Updates OSS docs to correct several ExecJS-related technical claims
across debugging, rendering, limitations, and performance pages.
> 
> Clarifies that ExecJS *auto-selects* the best available runtime
(override via `EXECJS_RUNTIME`), explains that timer APIs are stubbed as
no-ops during SSR (with `clearInterval` runtime-dependent) and how
`trace`/`replay_console`/`logging_on_server` surface warnings, fixes the
Node.js runtime process model description, and refines guidance on SSR
timing measurement and why MRI requires `server_renderer_pool_size = 1`
(deadlock explanation + issue link).
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
5296d8b. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Documentation**
* Clarified ExecJS runtime auto-detection: it now prefers the best
available runtime (may choose mini_racer or Bun over Node) and can be
overridden via an environment variable.
* Clarified SSR timer behavior: common timer functions are stubbed as
no-ops, some clear operations may vary by runtime, and trace/logging
settings emit warnings that can be replayed to browser devtools and
Rails logs.
* Updated guidance on renderer/process behavior, server render timing
measurement, and server-render pool-size considerations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: Add missing content pages (RSC landing, ExecJS, debugging, benchmarks)

1 participant