Skip to content

docs: fix Pro imports from react-on-rails to react-on-rails-pro#2252

Merged
ihabadham merged 3 commits intomasterfrom
ihabadham/fix/pro-docs-imports
Dec 26, 2025
Merged

docs: fix Pro imports from react-on-rails to react-on-rails-pro#2252
ihabadham merged 3 commits intomasterfrom
ihabadham/fix/pro-docs-imports

Conversation

@ihabadham
Copy link
Copy Markdown
Collaborator

@ihabadham ihabadham commented Dec 26, 2025

Summary

  • Fix 19 incorrect imports across 5 Pro documentation files
  • Add client package (react-on-rails-pro) installation section to installation.md
  • Add import migration guide to updating.md with troubleshooting
  • Clarify import requirements in LICENSING_FAQ.md

Context

After PR #1841 (Oct 7, 2025) split JS Pro code into a separate react-on-rails-pro package, Pro documentation was not updated. Users following these docs encounter the "Cannot mix react-on-rails (core) with react-on-rails-pro" error.

Test plan

  • Verify all RSC/code-splitting docs show react-on-rails-pro imports
  • Verify installation.md includes client package section
  • Verify updating.md includes import migration guide
  • Verify LICENSING_FAQ.md clarifies import requirements

Fixes #2249

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Clarified that Pro packages are public; added comprehensive client installation, import, and usage guidance with per-language examples.
    • Updated migration, troubleshooting, and code-splitting/RSC guides and refreshed examples to reference the Pro package paths.
  • Minor Public API
    • Small signature adjustment to the dynamic-import registration helper; update your registration call accordingly.

✏️ Tip: You can customize this high-level summary in your review settings.

After PR #1841 split JS Pro code into a separate package, Pro docs
were not updated. Users following these docs would encounter the
"Cannot mix react-on-rails (core) with react-on-rails-pro" error.

Changes:
- Fix 19 incorrect imports across 5 RSC/code-splitting docs
- Add client package installation section to installation.md
- Add import migration guide to updating.md
- Clarify import requirements in LICENSING_FAQ.md

Fixes #2249

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 26, 2025

Walkthrough

This PR updates Pro documentation to use the unscoped client package react-on-rails-pro, adds client installation and migration guidance, corrects import paths across code-splitting and React Server Components docs, expands the licensing FAQ, and applies minor formatting and lint-style edits.

Changes

Cohort / File(s) Summary
Licensing FAQ
docs/LICENSING_FAQ.md
Expanded "Will package installation or usage change?" with explicit per-language install/import guidance, example import snippets, and link to installation guide.
Client installation & migration
react_on_rails_pro/docs/installation.md, react_on_rails_pro/docs/updating.md
Added client package install instructions (npm/yarn/pnpm), clarified imports from react-on-rails-pro, reorganized migration steps and verification/troubleshooting examples to show Pro import changes.
Code-splitting docs
react_on_rails_pro/docs/code-splitting.md, react_on_rails_pro/docs/code-splitting-loadable-components.md
Replaced example imports from react-on-railsreact-on-rails-pro; minor style/formatting tweaks; small signature/style change in helper arrow function syntax.
React Server Components (RSC) docs
react_on_rails_pro/docs/react-server-components/*
Updated many example imports to react-on-rails-pro (registerServerComponent, RSCRoute, wrapServerComponentRenderer, ReactOnRails), standardized quotes, fixed typos, and adjusted formatting in examples.
CI/link-check config
/.lychee.toml
Added an exclusion pattern to skip checks for https://yourmechanic.com (and optional www).

Sequence Diagram(s)

(omitted — changes are documentation and import-path updates without new multi-component control-flow)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • justin808
  • AbanoubGhadban
  • alexeyr-ci2

Poem

🐇 I hopped through docs both near and far,
Found each import and fixed its star.
Now -pro leads the import line,
Clear steps, clean paths — all docs align.
🥕📚

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title 'docs: fix Pro imports from react-on-rails to react-on-rails-pro' clearly and concisely summarizes the main change—correcting import paths across Pro documentation files.
Linked Issues check ✅ Passed All requirements from issue #2249 are met: 19 imports corrected across 5 files, client package installation guide added to installation.md, import migration guidance with troubleshooting added to updating.md, and LICENSING_FAQ.md clarified regarding import requirements.
Out of Scope Changes check ✅ Passed All changes are directly scoped to the objectives: import path corrections, installation documentation, migration guidance, licensing clarification, and a URL exclusion in lychee.toml for link checking.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ihabadham/fix/pro-docs-imports

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between df2a556 and 2b724b0.

📒 Files selected for processing (1)
  • .lychee.toml
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /CHANGELOG_PRO.md : Update `/CHANGELOG_PRO.md` for user-visible changes in the Pro-only react_on_rails_pro gem and npm packages
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1875
File: lib/react_on_rails/utils.rb:112-124
Timestamp: 2025-10-23T17:22:01.074Z
Learning: In React on Rails, when Pro is installed but not licensed, the intended behavior is to raise an error on boot. The `react_on_rails_pro?` method validates licenses and should raise errors early (including during path resolution in methods like `server_bundle?`) to enforce licensing requirements rather than failing later with obscure errors.
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /CHANGELOG.md : Update `/CHANGELOG.md` for user-visible changes in the open-source react_on_rails gem and npm package (features, bug fixes, breaking changes, deprecations, performance improvements)
Learnt from: alexeyr-ci2
Repo: shakacode/react_on_rails PR: 1732
File: spec/dummy/client/app-react16/startup/ReduxSharedStoreApp.client.jsx:40-44
Timestamp: 2025-04-26T21:55:55.874Z
Learning: In the react_on_rails project, files under `app-react16` directories are copied/moved to corresponding `/app` directories during the conversion process (removing the `-react16` suffix), which affects their relative import paths at runtime.
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /{CHANGELOG.md,CHANGELOG_PRO.md} : Use format `[PR 1818](https://github.com/shakacode/react_on_rails/pull/1818) by [username](https://github.com/username)` in changelog entries (no hash in PR number)
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1781
File: node_package/src/ClientSideRenderer.ts:82-95
Timestamp: 2025-09-15T21:24:48.207Z
Learning: In React on Rails, the force_load feature includes both explicit `data-force-load="true"` usage and the ability to hydrate components during the page loading state (`document.readyState === 'loading'`). Both capabilities require a Pro license, so the condition `!railsContext.rorPro && (isComponentForceLoaded || document.readyState === 'loading')` correctly gates both scenarios.
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1644
File: lib/react_on_rails/helper.rb:190-197
Timestamp: 2025-02-18T13:08:01.477Z
Learning: RSC support validation in React on Rails Pro is handled through a chain of validations:
1. Pro version check in `run_stream_inside_fiber`
2. RSC support check during pack generation via `ReactOnRailsPro.configuration.enable_rsc_support`
3. RSC support validation during component registration
This makes additional validation in the helper methods unnecessary.
Learnt from: justin808
Repo: shakacode/react_on_rails PR: 1770
File: lib/generators/react_on_rails/templates/base/base/app/javascript/src/HelloWorld/ror_components/HelloWorld.client.jsx:2-2
Timestamp: 2025-09-16T08:01:11.146Z
Learning: React on Rails uses webpack CSS Modules configuration with namedExports: true, which requires the import syntax `import * as style from './file.module.css'` rather than the default export pattern. This configuration enables better tree shaking and bundle size optimization for CSS modules.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: dummy-app-integration-tests (3.4, 22, latest)
  • GitHub Check: rspec-package-tests (3.4, latest)
  • GitHub Check: examples (3.4, latest)
  • GitHub Check: build-dummy-app-webpack-test-bundles
  • GitHub Check: build
  • GitHub Check: pro-lint-js-and-ruby
  • GitHub Check: build-dummy-app-webpack-test-bundles
  • GitHub Check: markdown-link-check
  • GitHub Check: claude-review
🔇 Additional comments (1)
.lychee.toml (1)

74-74: Technically correct exclusion pattern, but verify this change is intentional.

The regex pattern and comment are correct, and the placement under bot-blocking sites is appropriate. However, this link checker configuration change is not mentioned in the PR objectives, which focus exclusively on fixing Pro imports from react-on-rails to react-on-rails-pro in documentation files.

Please confirm whether:

  • This is a side fix discovered while updating the documentation (e.g., one of the updated docs links to yourmechanic.com and caused link check failures)
  • Or this was accidentally included and should be split into a separate PR

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.

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Dec 26, 2025

Code Review

✅ Overall Assessment

LGTM - This is an excellent documentation fix that addresses a critical user-facing issue. The changes are thorough, well-structured, and follow project conventions.


Strengths

1. Comprehensive Coverage

  • Fixed all 19 incorrect imports across 5 documentation files
  • Added missing client package installation instructions to installation.md
  • Created detailed migration guide in updating.md with troubleshooting
  • Clarified import requirements in LICENSING_FAQ.md

2. Consistency

All imports correctly changed from:

// Before
import ReactOnRails from 'react-on-rails';
import { RSCRoute } from 'react-on-rails/RSCRoute';
import registerServerComponent from 'react-on-rails/registerServerComponent/client';

// After
import ReactOnRails from 'react-on-rails-pro';
import { RSCRoute } from 'react-on-rails-pro/RSCRoute';
import registerServerComponent from 'react-on-rails-pro/registerServerComponent/client';

3. User-Friendly Documentation 📚

  • Clear "Important" callouts explaining why Pro users must use react-on-rails-pro
  • Excellent troubleshooting section in updating.md covering common errors
  • Specific error message guidance ("Cannot mix react-on-rails (core) with react-on-rails-pro")
  • Example code blocks are clear and actionable

4. Follows Project Guidelines 📋

  • ✅ No changelog update (correct - per CLAUDE.md, documentation fixes don't need changelog entries)
  • ✅ Formatting appears consistent with existing docs
  • ✅ Links to related documentation preserved

Code Quality Assessment

Security Concerns

None identified

  • Appropriate security warning about never committing license tokens to version control
  • Recommends using environment variables/secret management systems

Performance Considerations

Not applicable - Documentation only changes

Bug Risk

None - These are documentation fixes that will prevent user errors

Test Coverage

📋 Test Plan Status:
The PR includes a test plan checklist:

  • Verify all RSC/code-splitting docs show react-on-rails-pro imports
  • Verify installation.md includes client package section
  • Verify updating.md includes import migration guide
  • Verify LICENSING_FAQ.md clarifies import requirements

Recommendation: Complete the checklist before merging to ensure all changes are present.


Detailed Findings

Minor Observations

  1. Code formatting changes in code-splitting.md

    • The PR includes some Prettier formatting changes (spacing, quotes)
    • This is fine and follows CLAUDE.md guidance that "Prettier is the SOLE authority"
    • Example: _Last updated June 13, 2019_ formatting changes
  2. Path correction in inside-client-components.md

    • Changed server.rscserver in import path
    • This appears to be a correction: react-on-rails-pro/registerServerComponent/server
    • Good catch!
  3. Comprehensive troubleshooting section

    • updating.md has excellent error-specific guidance
    • Each common error has clear fix instructions
    • This will significantly reduce support burden

Suggestions for Enhancement

Optional Improvements (Not blocking)

  1. Consider adding a validation script (future work)

    • Could add a CI job or script to validate all Pro docs only reference react-on-rails-pro
    • Would prevent regression of this issue
    • Example: grep -r "from 'react-on-rails'" react_on_rails_pro/docs/ | grep -v "react-on-rails-pro"
  2. Cross-reference with actual code (optional verification)

    • The Pro dummy app in react_on_rails_pro/spec/dummy/client/ already uses correct imports
    • These docs now match the working examples ✅

Impact Assessment

User Impact: HIGH

  • Fixes documentation that would cause errors for new Pro users
  • Prevents "Cannot mix react-on-rails (core) with react-on-rails-pro" errors
  • Critical for users following official docs

Breaking Changes: NONE

  • Documentation only
  • No code changes
  • No API changes

Backward Compatibility: MAINTAINED

  • Migration guide helps existing users upgrade
  • Clear before/after examples

Final Recommendation

✅ APPROVED - Ready to merge

This PR:

Before Merging

  • ✅ Verify the test plan checklist is complete
  • ✅ Ensure Prettier formatting passes (if CI includes formatting checks)

Great work on the thoroughness of this fix! The troubleshooting section in updating.md is particularly well done and will help users self-serve when they encounter issues.


Additional Context

This PR addresses issue #2249, which documents how Pro documentation became outdated after PR #1841 split the JS Pro code into a separate package. The fix ensures users following official documentation will use the correct imports and avoid runtime errors.

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

🧹 Nitpick comments (2)
react_on_rails_pro/docs/react-server-components/how-react-server-components-work.md (1)

1-449: Markdown linting issues flagged by static analysis.

The linter reports potential issues (MD036 at line 280, MD038 at line 344, and others), but these appear minor. If emphasis-instead-of-heading patterns are present, consider converting them to proper markdown headings for consistency. The no-space-in-code issue (MD038) should be reviewed for any inline code spans that may need adjustment.

These are documentation style matters and can be addressed in a follow-up if desired.

react_on_rails_pro/docs/code-splitting.md (1)

26-26: Add language identifiers to fenced code blocks.

Lines 26 and 62 contain fenced code blocks without language identifiers. Consider adding language tags (e.g., ```js, ```bash) for proper syntax highlighting and accessibility. This is flagged by markdownlint (MD040).

- ```
+ ```js
  yarn add react-loadable webpack-conditional-loader
- ```
+ ```

Similar changes should be applied to line 62.

Also applies to: 62-62

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5618568 and 66ebda5.

📒 Files selected for processing (8)
  • docs/LICENSING_FAQ.md
  • react_on_rails_pro/docs/code-splitting-loadable-components.md
  • react_on_rails_pro/docs/code-splitting.md
  • react_on_rails_pro/docs/installation.md
  • react_on_rails_pro/docs/react-server-components/create-without-ssr.md
  • react_on_rails_pro/docs/react-server-components/how-react-server-components-work.md
  • react_on_rails_pro/docs/react-server-components/inside-client-components.md
  • react_on_rails_pro/docs/updating.md
🧰 Additional context used
🧠 Learnings (28)
📓 Common learnings
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /CHANGELOG_PRO.md : Update `/CHANGELOG_PRO.md` for user-visible changes in the Pro-only react_on_rails_pro gem and npm packages
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1875
File: lib/react_on_rails/utils.rb:112-124
Timestamp: 2025-10-23T17:22:01.074Z
Learning: In React on Rails, when Pro is installed but not licensed, the intended behavior is to raise an error on boot. The `react_on_rails_pro?` method validates licenses and should raise errors early (including during path resolution in methods like `server_bundle?`) to enforce licensing requirements rather than failing later with obscure errors.
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /CHANGELOG.md : Update `/CHANGELOG.md` for user-visible changes in the open-source react_on_rails gem and npm package (features, bug fixes, breaking changes, deprecations, performance improvements)
Learnt from: alexeyr-ci2
Repo: shakacode/react_on_rails PR: 1732
File: spec/dummy/client/app-react16/startup/ReduxSharedStoreApp.client.jsx:40-44
Timestamp: 2025-04-26T21:55:55.874Z
Learning: In the react_on_rails project, files under `app-react16` directories are copied/moved to corresponding `/app` directories during the conversion process (removing the `-react16` suffix), which affects their relative import paths at runtime.
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /{CHANGELOG.md,CHANGELOG_PRO.md} : Use format `[PR 1818](https://github.com/shakacode/react_on_rails/pull/1818) by [username](https://github.com/username)` in changelog entries (no hash in PR number)
Learnt from: justin808
Repo: shakacode/react_on_rails PR: 1770
File: lib/generators/react_on_rails/templates/base/base/app/javascript/src/HelloWorld/ror_components/HelloWorld.client.jsx:2-2
Timestamp: 2025-09-16T08:01:11.146Z
Learning: React on Rails uses webpack CSS Modules configuration with namedExports: true, which requires the import syntax `import * as style from './file.module.css'` rather than the default export pattern. This configuration enables better tree shaking and bundle size optimization for CSS modules.
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1781
File: node_package/src/ClientSideRenderer.ts:82-95
Timestamp: 2025-09-15T21:24:48.207Z
Learning: In React on Rails, the force_load feature includes both explicit `data-force-load="true"` usage and the ability to hydrate components during the page loading state (`document.readyState === 'loading'`). Both capabilities require a Pro license, so the condition `!railsContext.rorPro && (isComponentForceLoaded || document.readyState === 'loading')` correctly gates both scenarios.
Learnt from: Romex91
Repo: shakacode/react_on_rails PR: 1697
File: package-scripts.yml:28-28
Timestamp: 2025-02-12T16:38:06.537Z
Learning: The file `node_package/lib/ReactOnRails.full.js` is autogenerated during the build process and should not be present in the repository.
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1644
File: lib/react_on_rails/helper.rb:190-197
Timestamp: 2025-02-18T13:08:01.477Z
Learning: RSC support validation in React on Rails Pro is handled through a chain of validations:
1. Pro version check in `run_stream_inside_fiber`
2. RSC support check during pack generation via `ReactOnRailsPro.configuration.enable_rsc_support`
3. RSC support validation during component registration
This makes additional validation in the helper methods unnecessary.
Learnt from: alexeyr-ci
Repo: shakacode/react_on_rails PR: 1644
File: node_package/src/ReactOnRailsRSC.ts:87-87
Timestamp: 2024-12-12T13:07:09.929Z
Learning: When handling errors in 'node_package/src/ReactOnRailsRSC.ts', include the error stack in error messages in development and test environments to aid debugging.
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /CHANGELOG_PRO.md : Update `/CHANGELOG_PRO.md` for user-visible changes in the Pro-only react_on_rails_pro gem and npm packages

Applied to files:

  • docs/LICENSING_FAQ.md
  • react_on_rails_pro/docs/react-server-components/inside-client-components.md
  • react_on_rails_pro/docs/updating.md
  • react_on_rails_pro/docs/code-splitting-loadable-components.md
  • react_on_rails_pro/docs/code-splitting.md
  • react_on_rails_pro/docs/react-server-components/how-react-server-components-work.md
  • react_on_rails_pro/docs/react-server-components/create-without-ssr.md
  • react_on_rails_pro/docs/installation.md
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /CHANGELOG.md : Update `/CHANGELOG.md` for user-visible changes in the open-source react_on_rails gem and npm package (features, bug fixes, breaking changes, deprecations, performance improvements)

Applied to files:

  • docs/LICENSING_FAQ.md
  • react_on_rails_pro/docs/react-server-components/inside-client-components.md
  • react_on_rails_pro/docs/updating.md
  • react_on_rails_pro/docs/code-splitting-loadable-components.md
  • react_on_rails_pro/docs/code-splitting.md
  • react_on_rails_pro/docs/react-server-components/how-react-server-components-work.md
  • react_on_rails_pro/docs/react-server-components/create-without-ssr.md
  • react_on_rails_pro/docs/installation.md
📚 Learning: 2025-10-23T17:22:01.074Z
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1875
File: lib/react_on_rails/utils.rb:112-124
Timestamp: 2025-10-23T17:22:01.074Z
Learning: In React on Rails, when Pro is installed but not licensed, the intended behavior is to raise an error on boot. The `react_on_rails_pro?` method validates licenses and should raise errors early (including during path resolution in methods like `server_bundle?`) to enforce licensing requirements rather than failing later with obscure errors.

Applied to files:

  • docs/LICENSING_FAQ.md
  • react_on_rails_pro/docs/react-server-components/inside-client-components.md
  • react_on_rails_pro/docs/updating.md
  • react_on_rails_pro/docs/code-splitting-loadable-components.md
  • react_on_rails_pro/docs/react-server-components/how-react-server-components-work.md
  • react_on_rails_pro/docs/react-server-components/create-without-ssr.md
  • react_on_rails_pro/docs/installation.md
📚 Learning: 2025-12-16T19:45:54.357Z
Learnt from: alexeyr-ci2
Repo: shakacode/react_on_rails PR: 2183
File: docs/building-features/react-helmet.md:6-12
Timestamp: 2025-12-16T19:45:54.357Z
Learning: 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 (package.json, scripts, CI configs, developer guides like CLAUDE.md/WARP.md).

Applied to files:

  • docs/LICENSING_FAQ.md
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /{CHANGELOG.md,CHANGELOG_PRO.md} : DO NOT add changelog entries for: linting, formatting, refactoring, tests, or documentation fixes - only user-visible changes

Applied to files:

  • docs/LICENSING_FAQ.md
📚 Learning: 2025-04-26T21:55:55.874Z
Learnt from: alexeyr-ci2
Repo: shakacode/react_on_rails PR: 1732
File: spec/dummy/client/app-react16/startup/ReduxSharedStoreApp.client.jsx:40-44
Timestamp: 2025-04-26T21:55:55.874Z
Learning: In the react_on_rails project, files under `app-react16` directories are copied/moved to corresponding `/app` directories during the conversion process (removing the `-react16` suffix), which affects their relative import paths at runtime.

Applied to files:

  • docs/LICENSING_FAQ.md
  • react_on_rails_pro/docs/react-server-components/inside-client-components.md
  • react_on_rails_pro/docs/updating.md
  • react_on_rails_pro/docs/code-splitting-loadable-components.md
  • react_on_rails_pro/docs/code-splitting.md
  • react_on_rails_pro/docs/react-server-components/how-react-server-components-work.md
  • react_on_rails_pro/docs/react-server-components/create-without-ssr.md
  • react_on_rails_pro/docs/installation.md
📚 Learning: 2025-09-16T08:01:11.146Z
Learnt from: justin808
Repo: shakacode/react_on_rails PR: 1770
File: lib/generators/react_on_rails/templates/base/base/app/javascript/src/HelloWorld/ror_components/HelloWorld.client.jsx:2-2
Timestamp: 2025-09-16T08:01:11.146Z
Learning: React on Rails uses webpack CSS Modules configuration with namedExports: true, which requires the import syntax `import * as style from './file.module.css'` rather than the default export pattern. This configuration enables better tree shaking and bundle size optimization for CSS modules.

Applied to files:

  • docs/LICENSING_FAQ.md
  • react_on_rails_pro/docs/react-server-components/inside-client-components.md
  • react_on_rails_pro/docs/updating.md
  • react_on_rails_pro/docs/code-splitting-loadable-components.md
  • react_on_rails_pro/docs/code-splitting.md
  • react_on_rails_pro/docs/react-server-components/how-react-server-components-work.md
  • react_on_rails_pro/docs/react-server-components/create-without-ssr.md
  • react_on_rails_pro/docs/installation.md
📚 Learning: 2025-09-15T21:24:48.207Z
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1781
File: node_package/src/ClientSideRenderer.ts:82-95
Timestamp: 2025-09-15T21:24:48.207Z
Learning: In React on Rails, the force_load feature includes both explicit `data-force-load="true"` usage and the ability to hydrate components during the page loading state (`document.readyState === 'loading'`). Both capabilities require a Pro license, so the condition `!railsContext.rorPro && (isComponentForceLoaded || document.readyState === 'loading')` correctly gates both scenarios.

Applied to files:

  • docs/LICENSING_FAQ.md
  • react_on_rails_pro/docs/react-server-components/inside-client-components.md
  • react_on_rails_pro/docs/updating.md
  • react_on_rails_pro/docs/code-splitting-loadable-components.md
  • react_on_rails_pro/docs/code-splitting.md
  • react_on_rails_pro/docs/react-server-components/how-react-server-components-work.md
  • react_on_rails_pro/docs/react-server-components/create-without-ssr.md
  • react_on_rails_pro/docs/installation.md
📚 Learning: 2025-02-18T13:08:01.477Z
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1644
File: lib/react_on_rails/helper.rb:190-197
Timestamp: 2025-02-18T13:08:01.477Z
Learning: RSC support validation in React on Rails Pro is handled through a chain of validations:
1. Pro version check in `run_stream_inside_fiber`
2. RSC support check during pack generation via `ReactOnRailsPro.configuration.enable_rsc_support`
3. RSC support validation during component registration
This makes additional validation in the helper methods unnecessary.

Applied to files:

  • docs/LICENSING_FAQ.md
  • react_on_rails_pro/docs/react-server-components/inside-client-components.md
  • react_on_rails_pro/docs/updating.md
  • react_on_rails_pro/docs/react-server-components/how-react-server-components-work.md
  • react_on_rails_pro/docs/react-server-components/create-without-ssr.md
  • react_on_rails_pro/docs/installation.md
📚 Learning: 2025-07-08T05:57:29.630Z
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1745
File: node_package/src/RSCRequestTracker.ts:8-14
Timestamp: 2025-07-08T05:57:29.630Z
Learning: The global `generateRSCPayload` function in React on Rails Pro (RORP) is provided by the framework during rendering requests, not implemented in application code. The `declare global` statements are used to document the expected interface that RORP will inject at runtime.

Applied to files:

  • react_on_rails_pro/docs/react-server-components/inside-client-components.md
  • react_on_rails_pro/docs/code-splitting-loadable-components.md
  • react_on_rails_pro/docs/code-splitting.md
  • react_on_rails_pro/docs/react-server-components/how-react-server-components-work.md
  • react_on_rails_pro/docs/react-server-components/create-without-ssr.md
  • react_on_rails_pro/docs/installation.md
📚 Learning: 2025-02-18T13:08:01.477Z
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1644
File: lib/react_on_rails/helper.rb:190-197
Timestamp: 2025-02-18T13:08:01.477Z
Learning: RSC support validation is handled in deeper level calls of the React on Rails Pro codebase, so it doesn't need to be validated again in the `rsc_payload_react_component` helper method.

Applied to files:

  • react_on_rails_pro/docs/react-server-components/inside-client-components.md
  • react_on_rails_pro/docs/react-server-components/how-react-server-components-work.md
  • react_on_rails_pro/docs/react-server-components/create-without-ssr.md
📚 Learning: 2025-02-13T16:50:47.848Z
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1644
File: node_package/src/clientStartup.ts:18-21
Timestamp: 2025-02-13T16:50:47.848Z
Learning: In the react_on_rails module, the `reactOnRailsPageUnloaded` function in clientStartup.ts is intentionally kept private as it's only used internally as a callback for `onPageUnloaded`.

Applied to files:

  • react_on_rails_pro/docs/react-server-components/inside-client-components.md
  • react_on_rails_pro/docs/code-splitting-loadable-components.md
  • react_on_rails_pro/docs/code-splitting.md
  • react_on_rails_pro/docs/react-server-components/how-react-server-components-work.md
  • react_on_rails_pro/docs/react-server-components/create-without-ssr.md
📚 Learning: 2025-02-12T16:38:06.537Z
Learnt from: Romex91
Repo: shakacode/react_on_rails PR: 1697
File: package-scripts.yml:28-28
Timestamp: 2025-02-12T16:38:06.537Z
Learning: The file `node_package/lib/ReactOnRails.full.js` is autogenerated during the build process and should not be present in the repository.

Applied to files:

  • react_on_rails_pro/docs/react-server-components/inside-client-components.md
  • react_on_rails_pro/docs/updating.md
  • react_on_rails_pro/docs/code-splitting-loadable-components.md
  • react_on_rails_pro/docs/code-splitting.md
  • react_on_rails_pro/docs/react-server-components/how-react-server-components-work.md
  • react_on_rails_pro/docs/react-server-components/create-without-ssr.md
  • react_on_rails_pro/docs/installation.md
📚 Learning: 2025-06-09T07:58:02.646Z
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1696
File: node_package/src/RSCPayloadGenerator.ts:124-168
Timestamp: 2025-06-09T07:58:02.646Z
Learning: In React Server Components (RSC) implementations, explicit error handling in RSC payload generation streams (like in RSCPayloadGenerator.ts) is not needed because errors will propagate to client components that fetch the RSC payloads (such as RSCRoute components). React's built-in error handling mechanisms and ErrorBoundary components are sufficient for handling these errors at the component level, which allows for better user experience with appropriate error UI fallbacks.

Applied to files:

  • react_on_rails_pro/docs/react-server-components/inside-client-components.md
  • react_on_rails_pro/docs/react-server-components/how-react-server-components-work.md
  • react_on_rails_pro/docs/react-server-components/create-without-ssr.md
📚 Learning: 2025-04-09T12:56:10.756Z
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1696
File: node_package/src/RSCPayloadContainer.ts:0-0
Timestamp: 2025-04-09T12:56:10.756Z
Learning: In the react_on_rails codebase, RSC payloads are already stringified using `JSON.stringify()` before being processed by the `escapeScript` function, which handles escaping of special characters. The function only needs to handle specific HTML markers like comments and closing script tags.

Applied to files:

  • react_on_rails_pro/docs/react-server-components/inside-client-components.md
  • react_on_rails_pro/docs/code-splitting.md
  • react_on_rails_pro/docs/react-server-components/how-react-server-components-work.md
  • react_on_rails_pro/docs/react-server-components/create-without-ssr.md
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to react_on_rails/spec/dummy/e2e/playwright/e2e/**/*.spec.js : Use Playwright E2E tests in `react_on_rails/spec/dummy/e2e/playwright/` for React component integration testing. Tests automatically start Rails server on port 5017 before running

Applied to files:

  • react_on_rails_pro/docs/react-server-components/inside-client-components.md
  • react_on_rails_pro/docs/updating.md
  • react_on_rails_pro/docs/code-splitting-loadable-components.md
  • react_on_rails_pro/docs/code-splitting.md
  • react_on_rails_pro/docs/react-server-components/create-without-ssr.md
  • react_on_rails_pro/docs/installation.md
📚 Learning: 2025-02-13T19:09:15.991Z
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1644
File: node_package/src/RSCWebpackLoader.ts:0-0
Timestamp: 2025-02-13T19:09:15.991Z
Learning: In React Server Components webpack loader, using `new Function('return import("react-server-dom-webpack/node-loader")')()` is necessary as a workaround to bypass TypeScript compilation issues with direct dynamic imports.

Applied to files:

  • react_on_rails_pro/docs/react-server-components/inside-client-components.md
  • react_on_rails_pro/docs/code-splitting-loadable-components.md
  • react_on_rails_pro/docs/code-splitting.md
  • react_on_rails_pro/docs/react-server-components/how-react-server-components-work.md
  • react_on_rails_pro/docs/react-server-components/create-without-ssr.md
📚 Learning: 2024-12-12T13:07:09.929Z
Learnt from: alexeyr-ci
Repo: shakacode/react_on_rails PR: 1644
File: node_package/src/ReactOnRailsRSC.ts:87-87
Timestamp: 2024-12-12T13:07:09.929Z
Learning: When handling errors in 'node_package/src/ReactOnRailsRSC.ts', include the error stack in error messages in development and test environments to aid debugging.

Applied to files:

  • react_on_rails_pro/docs/react-server-components/inside-client-components.md
  • react_on_rails_pro/docs/updating.md
  • react_on_rails_pro/docs/react-server-components/how-react-server-components-work.md
📚 Learning: 2024-07-27T10:08:35.868Z
Learnt from: theforestvn88
Repo: shakacode/react_on_rails PR: 1620
File: spec/dummy/client/app/startup/HelloTurboStream.jsx:3-3
Timestamp: 2024-07-27T10:08:35.868Z
Learning: The `RailsContext` import in `spec/dummy/client/app/startup/HelloTurboStream.jsx` is used later in the project, as clarified by the user theforestvn88.

Applied to files:

  • react_on_rails_pro/docs/react-server-components/inside-client-components.md
  • react_on_rails_pro/docs/code-splitting-loadable-components.md
  • react_on_rails_pro/docs/code-splitting.md
📚 Learning: 2025-06-11T12:34:58.182Z
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1696
File: node_package/src/RSCProvider.tsx:0-0
Timestamp: 2025-06-11T12:34:58.182Z
Learning: `RSCProvider` intentionally keeps failed `getServerComponent` promises cached (even if rejected) to avoid repeated fetch attempts; callers must use `refetchComponent` to retry.

Applied to files:

  • react_on_rails_pro/docs/react-server-components/inside-client-components.md
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to {package.json,webpack.config.js,packages/*/package.json,react_on_rails_pro/package.json} : When resolving merge conflicts in build configuration files, verify file paths are correct by running `grep -r 'old/path' .` and test affected scripts like `pnpm run prepack` before continuing the merge

Applied to files:

  • react_on_rails_pro/docs/updating.md
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to sig/react_on_rails/**/*.rbs : RBS signatures in `sig/react_on_rails/` should be added for new Ruby files in `lib/react_on_rails/`, included in Steepfile, validated with `bundle exec rake rbs:validate`, and type-checked with `bundle exec rake rbs:steep`

Applied to files:

  • react_on_rails_pro/docs/updating.md
  • react_on_rails_pro/docs/code-splitting.md
  • react_on_rails_pro/docs/react-server-components/how-react-server-components-work.md
  • react_on_rails_pro/docs/react-server-components/create-without-ssr.md
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Install Playwright browsers with `cd react_on_rails/spec/dummy && pnpm playwright install --with-deps` before running E2E tests

Applied to files:

  • react_on_rails_pro/docs/updating.md
  • react_on_rails_pro/docs/installation.md
📚 Learning: 2025-02-13T16:50:26.861Z
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1644
File: node_package/src/turbolinksUtils.ts:34-36
Timestamp: 2025-02-13T16:50:26.861Z
Learning: In React on Rails, when checking for Turbolinks version 5 using `turbolinksVersion5()`, always ensure `Turbolinks` exists first by checking `turbolinksInstalled()` to prevent TypeError when accessing properties.

Applied to files:

  • react_on_rails_pro/docs/updating.md
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to **/config/webpack/**/*.js : Use `namedExport: false` and `exportLocalsConvention: 'camelCase'` for CSS Modules loader options in Shakapacker 9.0+ if existing code uses `import styles from './file.module.css'` pattern

Applied to files:

  • react_on_rails_pro/docs/code-splitting.md
  • react_on_rails_pro/docs/react-server-components/how-react-server-components-work.md
  • react_on_rails_pro/docs/react-server-components/create-without-ssr.md
📚 Learning: 2025-04-09T13:02:16.009Z
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1696
File: node_package/src/transformRSCNodeStream.ts:3-31
Timestamp: 2025-04-09T13:02:16.009Z
Learning: In the React Server Components (RSC) stream processing implementation, all chunks end with a newline character (`\n`), so the `lastIncompleteChunk` variable is expected to be empty by the time the stream ends, making a flush handler unnecessary in the Transform stream.

Applied to files:

  • react_on_rails_pro/docs/react-server-components/create-without-ssr.md
📚 Learning: 2025-12-16T19:45:57.926Z
Learnt from: alexeyr-ci2
Repo: shakacode/react_on_rails PR: 2183
File: docs/building-features/react-helmet.md:6-12
Timestamp: 2025-12-16T19:45:57.926Z
Learning: User-facing documentation in the `docs/` directory should be package-manager-agnostic and show installation examples for npm, yarn, and pnpm to accommodate users' different package manager choices. The pnpm-only policy applies to internal development files (package.json, scripts, CI configs, developer guides like CLAUDE.md/WARP.md), not to end-user documentation.

Applied to files:

  • react_on_rails_pro/docs/installation.md
🪛 markdownlint-cli2 (0.18.1)
react_on_rails_pro/docs/code-splitting.md

5-5: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


26-26: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


62-62: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


280-280: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


344-344: Spaces inside code span elements

(MD038, no-space-in-code)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: markdown-link-check
  • GitHub Check: claude-review
🔇 Additional comments (10)
react_on_rails_pro/docs/code-splitting-loadable-components.md (1)

170-170: ✓ Import paths correctly updated to react-on-rails-pro.

Both client and server bundle examples now import ReactOnRails from the correct package. Changes are consistent and complete.

Also applies to: 194-194

docs/LICENSING_FAQ.md (1)

22-34: ✓ Clear and helpful guidance on Pro package imports.

The new section (lines 22-34) effectively clarifies the separation between Ruby gems and JavaScript packages, with a concrete import example and proper guidance to avoid mixing packages.

react_on_rails_pro/docs/installation.md (1)

75-122: ✓ Comprehensive client package installation guidance added.

The new "Client Package Installation" section (lines 75-122) provides clear multi-package-manager support (npm, yarn, pnpm) and correctly emphasizes importing from react-on-rails-pro. The Pro-exclusive imports section with examples is helpful for users migrating.

react_on_rails_pro/docs/react-server-components/inside-client-components.md (1)

35-35: ✓ Import paths consistently updated to react-on-rails-pro throughout.

All references to ReactOnRails, RSCRoute, registerServerComponent, and wrapServerComponentRenderer correctly import from react-on-rails-pro with proper sub-paths. The environment-specific imports (server vs. client) are clearly demonstrated.

Also applies to: 54-54, 75-75, 96-97, 111-112, 138-138, 162-162, 194-194, 280-280, 299-299

react_on_rails_pro/docs/react-server-components/create-without-ssr.md (1)

322-322: ✓ Import paths correctly updated in server and client bundles.

Both registerServerComponent imports now correctly reference react-on-rails-pro, with proper environment-specific sub-paths. The examples clearly show the difference between server-bundle (passing component) and client-bundle (passing component name) registration.

Also applies to: 332-332

react_on_rails_pro/docs/react-server-components/how-react-server-components-work.md (1)

229-236: ✓ Import path correctly updated to react-on-rails-pro.

The registerServerComponent import now references the correct Pro package. Multi-line plugin configuration (lines 118-123) is properly formatted for readability.

react_on_rails_pro/docs/updating.md (3)

26-31: ✓ Migration steps clearly guide users through package updates.

The package comparison table (lines 26-29) and "Important" note (line 31) establish clear expectations. Step 3 (lines 105-123) properly adds the client package and updates the node renderer package name with clear diffs.

Also applies to: 105-123


125-162: ✓ Comprehensive import statement updates guide Pro users.

Step 4 (lines 125-162) provides clear before/after examples for all major import paths: ReactOnRails, RSCRoute, registerServerComponent, wrapServerComponentRenderer, and node renderer require statements. The examples cover both client and node renderer integrations (Sentry, Honeybadger).


196-245: ✓ Expanded verification and troubleshooting cover migration gaps.

The verification section (lines 196-204) now checks both client and node renderer packages. The new troubleshooting section (lines 236-245) specifically addresses the mixing error and provides clear guidance to use react-on-rails-pro exclusively.

react_on_rails_pro/docs/code-splitting.md (1)

202-202: ✓ Import path updated to react-on-rails-pro.

The server entry point now correctly imports from react-on-rails-pro. The function signature formatting improvement (line 160) is a minor style enhancement.

The RSC docs use tutorial.md as entry point, not index.md.

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Dec 26, 2025

Code Review Summary

Overall Assessment: LGTM - Excellent documentation fix

This PR successfully addresses issue #2249 by fixing 19 incorrect imports across Pro documentation that would have caused the "Cannot mix react-on-rails (core) with react-on-rails-pro" error for users.


What I Reviewed

✅ Code Quality & Correctness

Import Fixes (19 total across 5 files)

  • ✅ All react-on-rails imports updated to react-on-rails-pro
  • ✅ All Pro-exclusive paths updated (RSCRoute, registerServerComponent, wrapServerComponentRenderer)
  • ✅ Verified no incorrect imports remain in RSC/code-splitting docs
  • ✅ Migration guide correctly shows before/after examples in diff blocks

New Documentation Sections

  • installation.md: Added comprehensive client package installation section (lines 75-122)
    • Clear instructions for npm/yarn/pnpm
    • Important callout about importing from react-on-rails-pro
    • Pro-exclusive import examples
  • updating.md: Added detailed import migration guide (lines 126-162)
    • Step-by-step migration instructions
    • Covers client code, Pro features, and node renderer
    • Troubleshooting section for common errors
  • LICENSING_FAQ.md: Clarified import requirements with code example

✅ Documentation Quality

Strengths:

  • Clear, actionable instructions
  • Consistent formatting and style
  • Good use of code blocks and examples
  • Helpful troubleshooting sections
  • Security warnings appropriately placed

Minor observations (not blockers):

  • The formatting changes in code-splitting.md (Prettier auto-formatting) are appropriate and improve readability
  • The "Last updated June 13, 2019" timestamp in code-splitting.md might be outdated, but that's pre-existing

✅ Best Practices

  • ✅ Follows project's documentation conventions
  • ✅ Uses consistent terminology throughout
  • ✅ Security best practice: Warns against committing license tokens
  • ✅ Cross-references between docs (installation.md ↔ updating.md)
  • ✅ Package manager agnostic (shows npm/yarn/pnpm examples)

✅ Test Coverage

Per the test plan in PR description:

  • ✅ All RSC/code-splitting docs show react-on-rails-pro imports
  • ✅ installation.md includes client package section
  • ✅ updating.md includes import migration guide
  • ✅ LICENSING_FAQ.md clarifies import requirements

Verification:

# Confirmed no incorrect imports remain:
grep -r "from 'react-on-rails'" react_on_rails_pro/docs/react-server-components/
# Returns: No matches (correct!)

# Confirmed correct imports are present:
grep -r "from 'react-on-rails-pro" react_on_rails_pro/docs/
# Returns: 15+ occurrences across RSC/code-splitting docs

Potential Issues & Concerns

🟢 Security: No concerns

  • Properly warns about license token security
  • No sensitive data exposed
  • Follows secure credential management best practices

🟢 Performance: Not applicable

  • Documentation-only changes
  • No runtime impact

🟢 Bugs: None found

  • All imports syntactically correct
  • Package names match actual npm/gem packages
  • File paths in imports are accurate

🟢 Breaking Changes: None

  • Documentation-only changes
  • Fixes incorrect documentation to match actual behavior

Recommendations

Required Before Merge: None ✅

The PR is ready to merge as-is.

Optional Enhancements (Future Work):

  1. Consider adding a warning banner to deprecated docs: If code-splitting.md is deprecated (mentions this at top), consider adding a more prominent warning directing users to the loadable-components approach
  2. Version timeline clarity: The "Last updated June 13, 2019" timestamp in code-splitting.md could be confusing given recent changes (though this is pre-existing)
  3. Link validation: Ensure all internal doc links work (e.g., [Installation Guide](../react_on_rails_pro/docs/installation.md))

Impact Assessment

User Impact: 🟢 High Positive Impact

  • Prevents user confusion and errors when following Pro documentation
  • Clear upgrade path for existing customers
  • Comprehensive installation guide for new customers

Risk: 🟢 Very Low

  • Documentation-only changes
  • No code changes
  • Fixes incorrect documentation to match actual behavior

Completeness:Comprehensive


Final Verdict

✅ APPROVED - Ready to merge

This is a well-executed documentation fix that:

Great work addressing this systematically!


Reviewed by: Claude Code (Sonnet 4.5)
Review Date: 2025-12-26

Site returns 403/503 to automated requests, causing flaky CI.

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Dec 26, 2025

Code Review: PR #2252 - Fix Pro Documentation Imports

Summary

This PR addresses a critical documentation issue where Pro documentation was showing incorrect imports from react-on-rails instead of react-on-rails-pro after the JS Pro code split in PR #1841. This would cause users to encounter the "Cannot mix react-on-rails (core) with react-on-rails-pro" error when following the docs.


✅ Strengths

1. Comprehensive Scope

  • Fixes all 19 incorrect imports across 5 documentation files
  • Adds missing client package installation instructions
  • Includes import migration guide for upgrading users
  • Updates LICENSING_FAQ.md with clear usage instructions

2. Excellent Documentation Quality

The new content in installation.md is particularly strong:

  • Clear installation instructions for npm/yarn/pnpm
  • Important callout explaining Pro users should only import from react-on-rails-pro
  • Concrete code examples showing correct usage
  • Pro-exclusive imports clearly documented

3. Thorough Migration Guide

The updating.md additions provide:

  • Clear before/after comparisons using diff blocks
  • All affected import paths covered (client code, node renderer, integrations)
  • Troubleshooting section specifically addressing the "Cannot mix" error
  • Verification steps to confirm successful migration

4. Consistent Formatting

  • All code examples use proper syntax highlighting
  • Diff blocks clearly show old vs new patterns
  • Consistent use of code fencing and language tags

🎯 Code Quality Assessment

Documentation Accuracy: Excellent

All imports are now technically correct and match the actual package structure as verified in the issue #2249.

Completeness: Excellent

The PR addresses all four issues identified:

  1. ✅ Fixed 19 incorrect imports
  2. ✅ Added client package installation section
  3. ✅ Added import migration guide
  4. ✅ Clarified LICENSING_FAQ.md

User Experience: Excellent

  • New users get clear installation and usage instructions
  • Upgrading users get step-by-step migration guide
  • Troubleshooting section helps users self-diagnose common issues

📝 Minor Observations

1. Link Reference Update (Already Fixed)

The second commit correctly fixes the RSC tutorial link from index.md to tutorial.md. Good catch!

2. Link Checker Exclusion (Third Commit)

The exclusion of yourmechanic.com in .lychee.toml is reasonable given it returns 403/503 to automated requests. This is a valid CI hygiene fix.


🔍 Potential Improvements (Optional)

1. Consider Adding Search/Replace Instructions

In updating.md, you could add a helpful tip for users with many files to update:

# Find all files that need updating
grep -r "from 'react-on-rails'" --include="*.js" --include="*.jsx" --include="*.ts" --include="*.tsx"

# Or use your IDE's global find/replace feature

2. Version Compatibility Note

Consider adding a note about which versions require the new imports:

Note: If you're upgrading from version 16.1.x or earlier (GitHub Packages distribution), follow this guide. New installations on version 16.2.0+ should follow the standard Installation Guide.


🏆 Overall Assessment

Quality: Excellent
Impact: High (Fixes critical user-facing documentation)
Risk: Very Low (Documentation-only changes)

Recommendation: APPROVE ✅

This PR should be merged as-is. It's well-researched, comprehensive, and will prevent user confusion. The documentation changes are critical for Pro users following the official guides.


📋 Pre-Merge Checklist

Based on CLAUDE.md requirements:

Ready to merge! 🚀


Reviewed using React on Rails project guidelines from CLAUDE.md

@ihabadham ihabadham merged commit 473c576 into master Dec 26, 2025
28 of 30 checks passed
@ihabadham ihabadham deleted the ihabadham/fix/pro-docs-imports branch December 26, 2025 15:05
ihabadham added a commit that referenced this pull request Feb 26, 2026
react_on_rails_pro.rb relied on Bundler.require auto-loading
react_on_rails via the user's Gemfile rather than requiring it
explicitly. This worked as long as users listed both gems, but broke
when docs were updated (PR #2252) to say only add react_on_rails_pro.

Two errors surfaced on boot:
- NoMethodError: undefined method `strip_heredoc' (license_public_key.rb)
- NoMethodError: undefined method `configure' for module ReactOnRails

Fix: explicitly require "react_on_rails" in react_on_rails_pro.rb.
This mirrors the JS package split design already in place — Pro users
should get everything from a single entry point.

Fixes #2491
AbanoubGhadban pushed a commit that referenced this pull request Mar 7, 2026
react_on_rails_pro.rb relied on Bundler.require auto-loading
react_on_rails via the user's Gemfile rather than requiring it
explicitly. This worked as long as users listed both gems, but broke
when docs were updated (PR #2252) to say only add react_on_rails_pro.

Two errors surfaced on boot:
- NoMethodError: undefined method `strip_heredoc' (license_public_key.rb)
- NoMethodError: undefined method `configure' for module ReactOnRails

Fix: explicitly require "react_on_rails" in react_on_rails_pro.rb.
This mirrors the JS package split design already in place — Pro users
should get everything from a single entry point.

Fixes #2491
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pro documentation shows incorrect imports from 'react-on-rails' instead of 'react-on-rails-pro'

1 participant