docs: fix Pro imports from react-on-rails to react-on-rails-pro#2252
docs: fix Pro imports from react-on-rails to react-on-rails-pro#2252
Conversation
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]>
WalkthroughThis PR updates Pro documentation to use the unscoped client package Changes
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
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (1)📓 Common learnings⏰ 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)
🔇 Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Code Review✅ Overall AssessmentLGTM - This is an excellent documentation fix that addresses a critical user-facing issue. The changes are thorough, well-structured, and follow project conventions. Strengths1. Comprehensive Coverage ✨
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 📚
4. Follows Project Guidelines 📋
Code Quality AssessmentSecurity Concerns✅ None identified
Performance Considerations✅ Not applicable - Documentation only changes Bug Risk✅ None - These are documentation fixes that will prevent user errors Test Coverage📋 Test Plan Status:
Recommendation: Complete the checklist before merging to ensure all changes are present. Detailed FindingsMinor Observations
Suggestions for EnhancementOptional Improvements (Not blocking)
Impact AssessmentUser Impact: HIGH ✅
Breaking Changes: NONE ✅
Backward Compatibility: MAINTAINED ✅
Final Recommendation✅ APPROVED - Ready to merge This PR:
Before Merging
Great work on the thoroughness of this fix! The troubleshooting section in Additional ContextThis 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. |
There was a problem hiding this comment.
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
📒 Files selected for processing (8)
docs/LICENSING_FAQ.mdreact_on_rails_pro/docs/code-splitting-loadable-components.mdreact_on_rails_pro/docs/code-splitting.mdreact_on_rails_pro/docs/installation.mdreact_on_rails_pro/docs/react-server-components/create-without-ssr.mdreact_on_rails_pro/docs/react-server-components/how-react-server-components-work.mdreact_on_rails_pro/docs/react-server-components/inside-client-components.mdreact_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.mdreact_on_rails_pro/docs/react-server-components/inside-client-components.mdreact_on_rails_pro/docs/updating.mdreact_on_rails_pro/docs/code-splitting-loadable-components.mdreact_on_rails_pro/docs/code-splitting.mdreact_on_rails_pro/docs/react-server-components/how-react-server-components-work.mdreact_on_rails_pro/docs/react-server-components/create-without-ssr.mdreact_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.mdreact_on_rails_pro/docs/react-server-components/inside-client-components.mdreact_on_rails_pro/docs/updating.mdreact_on_rails_pro/docs/code-splitting-loadable-components.mdreact_on_rails_pro/docs/code-splitting.mdreact_on_rails_pro/docs/react-server-components/how-react-server-components-work.mdreact_on_rails_pro/docs/react-server-components/create-without-ssr.mdreact_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.mdreact_on_rails_pro/docs/react-server-components/inside-client-components.mdreact_on_rails_pro/docs/updating.mdreact_on_rails_pro/docs/code-splitting-loadable-components.mdreact_on_rails_pro/docs/react-server-components/how-react-server-components-work.mdreact_on_rails_pro/docs/react-server-components/create-without-ssr.mdreact_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.mdreact_on_rails_pro/docs/react-server-components/inside-client-components.mdreact_on_rails_pro/docs/updating.mdreact_on_rails_pro/docs/code-splitting-loadable-components.mdreact_on_rails_pro/docs/code-splitting.mdreact_on_rails_pro/docs/react-server-components/how-react-server-components-work.mdreact_on_rails_pro/docs/react-server-components/create-without-ssr.mdreact_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.mdreact_on_rails_pro/docs/react-server-components/inside-client-components.mdreact_on_rails_pro/docs/updating.mdreact_on_rails_pro/docs/code-splitting-loadable-components.mdreact_on_rails_pro/docs/code-splitting.mdreact_on_rails_pro/docs/react-server-components/how-react-server-components-work.mdreact_on_rails_pro/docs/react-server-components/create-without-ssr.mdreact_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.mdreact_on_rails_pro/docs/react-server-components/inside-client-components.mdreact_on_rails_pro/docs/updating.mdreact_on_rails_pro/docs/code-splitting-loadable-components.mdreact_on_rails_pro/docs/code-splitting.mdreact_on_rails_pro/docs/react-server-components/how-react-server-components-work.mdreact_on_rails_pro/docs/react-server-components/create-without-ssr.mdreact_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.mdreact_on_rails_pro/docs/react-server-components/inside-client-components.mdreact_on_rails_pro/docs/updating.mdreact_on_rails_pro/docs/react-server-components/how-react-server-components-work.mdreact_on_rails_pro/docs/react-server-components/create-without-ssr.mdreact_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.mdreact_on_rails_pro/docs/code-splitting-loadable-components.mdreact_on_rails_pro/docs/code-splitting.mdreact_on_rails_pro/docs/react-server-components/how-react-server-components-work.mdreact_on_rails_pro/docs/react-server-components/create-without-ssr.mdreact_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.mdreact_on_rails_pro/docs/react-server-components/how-react-server-components-work.mdreact_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.mdreact_on_rails_pro/docs/code-splitting-loadable-components.mdreact_on_rails_pro/docs/code-splitting.mdreact_on_rails_pro/docs/react-server-components/how-react-server-components-work.mdreact_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.mdreact_on_rails_pro/docs/updating.mdreact_on_rails_pro/docs/code-splitting-loadable-components.mdreact_on_rails_pro/docs/code-splitting.mdreact_on_rails_pro/docs/react-server-components/how-react-server-components-work.mdreact_on_rails_pro/docs/react-server-components/create-without-ssr.mdreact_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.mdreact_on_rails_pro/docs/react-server-components/how-react-server-components-work.mdreact_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.mdreact_on_rails_pro/docs/code-splitting.mdreact_on_rails_pro/docs/react-server-components/how-react-server-components-work.mdreact_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.mdreact_on_rails_pro/docs/updating.mdreact_on_rails_pro/docs/code-splitting-loadable-components.mdreact_on_rails_pro/docs/code-splitting.mdreact_on_rails_pro/docs/react-server-components/create-without-ssr.mdreact_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.mdreact_on_rails_pro/docs/code-splitting-loadable-components.mdreact_on_rails_pro/docs/code-splitting.mdreact_on_rails_pro/docs/react-server-components/how-react-server-components-work.mdreact_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.mdreact_on_rails_pro/docs/updating.mdreact_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.mdreact_on_rails_pro/docs/code-splitting-loadable-components.mdreact_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.mdreact_on_rails_pro/docs/code-splitting.mdreact_on_rails_pro/docs/react-server-components/how-react-server-components-work.mdreact_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.mdreact_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.mdreact_on_rails_pro/docs/react-server-components/how-react-server-components-work.mdreact_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-prowith 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
registerServerComponentimports now correctly referencereact-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
registerServerComponentimport 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]>
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 & CorrectnessImport Fixes (19 total across 5 files)
New Documentation Sections
✅ Documentation QualityStrengths:
Minor observations (not blockers):
✅ Best Practices
✅ Test CoveragePer the test plan in PR description:
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 docsPotential Issues & Concerns🟢 Security: No concerns
🟢 Performance: Not applicable
🟢 Bugs: None found
🟢 Breaking Changes: None
RecommendationsRequired Before Merge: None ✅The PR is ready to merge as-is. Optional Enhancements (Future Work):
Impact AssessmentUser Impact: 🟢 High Positive Impact
Risk: 🟢 Very Low
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) |
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]>
Code Review: PR #2252 - Fix Pro Documentation ImportsSummaryThis PR addresses a critical documentation issue where Pro documentation was showing incorrect imports from ✅ Strengths1. Comprehensive Scope
2. Excellent Documentation QualityThe new content in
3. Thorough Migration GuideThe
4. Consistent Formatting
🎯 Code Quality AssessmentDocumentation 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:
User Experience: Excellent ✅
📝 Minor Observations1. Link Reference Update (Already Fixed)The second commit correctly fixes the RSC tutorial link from 2. Link Checker Exclusion (Third Commit)The exclusion of 🔍 Potential Improvements (Optional)1. Consider Adding Search/Replace InstructionsIn # 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 feature2. Version Compatibility NoteConsider adding a note about which versions require the new imports:
🏆 Overall AssessmentQuality: Excellent 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 ChecklistBased on CLAUDE.md requirements:
Ready to merge! 🚀 Reviewed using React on Rails project guidelines from CLAUDE.md |
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
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
Summary
react-on-rails-pro) installation section toinstallation.mdupdating.mdwith troubleshootingLICENSING_FAQ.mdContext
After PR #1841 (Oct 7, 2025) split JS Pro code into a separate
react-on-rails-propackage, 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
react-on-rails-proimportsFixes #2249
🤖 Generated with Claude Code
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.