-
-
Notifications
You must be signed in to change notification settings - Fork 638
Update spec/dummy for React 19 compatibility #2127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
- Upgrade react-redux from ^8.0.2 to ^9.2.0 for React 19 support
- Upgrade redux from ^4.0.1 to ^5.0.1 (required by react-redux 9.x)
- Upgrade redux-thunk from ^2.2.0 to ^3.1.0 (required by redux 5.x)
- Replace react-helmet@^6.1.0 with @dr.pogodin/react-helmet@^3.0.4
(thread-safe React 19 compatible fork)
Code changes:
- Update redux-thunk imports to use named export: { thunk }
- Update react-helmet SSR to use HelmetProvider with context prop
- Remove @types/react-helmet (new package has built-in types)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
Add HelmetProvider wrapper to client-side entry points for ReactHelmet components. The @dr.pogodin/react-helmet package requires HelmetProvider to wrap all Helmet components, on both server and client sides. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
WalkthroughReplaces default Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Req as HTTP Request
participant SSR as Server (renderer)
participant Provider as HelmetProvider (per-request)
participant App as React App / Component
Note over SSR,Provider: per-request helmetContext created and used
Req->>SSR: incoming page request
SSR->>Provider: create helmetContext = {}
SSR->>App: render App inside Provider(context=helmetContext)
App-->>Provider: components record head data into context
SSR->>Provider: read helmetContext (title/meta/link/style)
Provider-->>SSR: extracted head tags
SSR->>Req: respond with HTML including extracted helmet tags
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1)**/*📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧠 Learnings (10)📓 Common learnings📚 Learning: 2025-11-25T08:05:17.804ZApplied to files:
📚 Learning: 2025-11-25T08:05:17.804ZApplied to files:
📚 Learning: 2025-04-26T21:55:55.874ZApplied to files:
📚 Learning: 2025-02-12T16:38:06.537ZApplied to files:
📚 Learning: 2025-11-25T08:05:17.804ZApplied to files:
📚 Learning: 2025-01-23T18:20:45.824ZApplied to files:
📚 Learning: 2025-11-25T08:05:17.804ZApplied to files:
📚 Learning: 2025-09-16T08:01:11.146ZApplied to files:
📚 Learning: 2025-11-25T08:05:17.804ZApplied to files:
⏰ 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). (11)
🔇 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: React 19 Compatibility UpdateI've reviewed this PR and overall it looks solid. The changes correctly update the spec/dummy app to React 19 and handle the necessary dependency migrations. Here's my detailed feedback: ✅ What's Good1. Dependency Updates Are Correct
2. Code Changes Are Thorough
3. Documentation Added
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
react_on_rails/spec/dummy/client/app-react16/startup/ReduxApp.client.jsx (1)
8-32: Thunk update is correct; consider React 19 render API for this legacy entryThe move to
import { thunk } from 'redux-thunk'andapplyMiddleware(thunk)for store creation is consistent with the rest of the PR and the upgraded Redux stack. However, this entrypoint still usesReactDOM.render/ReactDOM.hydrate, which are removed in React 19; if this “react16” example is actually executed against the React 19 dependency fromspec/dummy/package.json, you may want to mirror the newer client entry’screateRoot/hydrateRootpattern or clearly scope this bundle to a React 16 build.Please double-check how this
app-react16bundle is built/loaded in your test matrix to ensure it doesn’t accidentally run against React 19’s removedReactDOM.renderAPI.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
react_on_rails/spec/dummy/Gemfile.lockis excluded by!**/*.lock
📒 Files selected for processing (10)
react_on_rails/spec/dummy/client/app-react16/startup/ReduxApp.client.jsx(2 hunks)react_on_rails/spec/dummy/client/app/components/ReactHelmet.jsx(1 hunks)react_on_rails/spec/dummy/client/app/startup/ReactHelmetApp.client.jsx(1 hunks)react_on_rails/spec/dummy/client/app/startup/ReactHelmetApp.server.jsx(2 hunks)react_on_rails/spec/dummy/client/app/startup/ReactHelmetAppBroken.client.jsx(1 hunks)react_on_rails/spec/dummy/client/app/startup/ReactHelmetAppBroken.server.jsx(2 hunks)react_on_rails/spec/dummy/client/app/startup/ReduxApp.client.jsx(2 hunks)react_on_rails/spec/dummy/client/app/startup/ReduxApp.server.jsx(2 hunks)react_on_rails/spec/dummy/client/app/stores/SharedReduxStore.jsx(2 hunks)react_on_rails/spec/dummy/package.json(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*
📄 CodeRabbit inference engine (CLAUDE.md)
ALWAYS ensure files end with a newline character before committing/pushing
Files:
react_on_rails/spec/dummy/client/app/startup/ReduxApp.client.jsxreact_on_rails/spec/dummy/package.jsonreact_on_rails/spec/dummy/client/app-react16/startup/ReduxApp.client.jsxreact_on_rails/spec/dummy/client/app/startup/ReduxApp.server.jsxreact_on_rails/spec/dummy/client/app/startup/ReactHelmetAppBroken.client.jsxreact_on_rails/spec/dummy/client/app/stores/SharedReduxStore.jsxreact_on_rails/spec/dummy/client/app/startup/ReactHelmetAppBroken.server.jsxreact_on_rails/spec/dummy/client/app/startup/ReactHelmetApp.server.jsxreact_on_rails/spec/dummy/client/app/components/ReactHelmet.jsxreact_on_rails/spec/dummy/client/app/startup/ReactHelmetApp.client.jsx
🧠 Learnings (12)
📓 Common learnings
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T08:05:17.804Z
Learning: Applies to /CHANGELOG.md : Update `/CHANGELOG.md` for user-visible changes (features, bug fixes, breaking changes, deprecations, performance improvements) to the open-source React on Rails gem and npm package
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T08:05:17.804Z
Learning: Applies to /CHANGELOG*.md : Use changelog format: `[PR 1818](https://github.com/shakacode/react_on_rails/pull/1818) by [username](https://github.com/username)` (no hash in PR number)
📚 Learning: 2024-10-08T20:53:47.076Z
Learnt from: theforestvn88
Repo: shakacode/react_on_rails PR: 1620
File: spec/dummy/client/app/startup/HelloTurboStream.jsx:3-3
Timestamp: 2024-10-08T20:53:47.076Z
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/spec/dummy/client/app/startup/ReduxApp.client.jsxreact_on_rails/spec/dummy/client/app-react16/startup/ReduxApp.client.jsxreact_on_rails/spec/dummy/client/app/startup/ReduxApp.server.jsxreact_on_rails/spec/dummy/client/app/startup/ReactHelmetAppBroken.client.jsxreact_on_rails/spec/dummy/client/app/stores/SharedReduxStore.jsxreact_on_rails/spec/dummy/client/app/startup/ReactHelmetAppBroken.server.jsxreact_on_rails/spec/dummy/client/app/startup/ReactHelmetApp.server.jsxreact_on_rails/spec/dummy/client/app/components/ReactHelmet.jsxreact_on_rails/spec/dummy/client/app/startup/ReactHelmetApp.client.jsx
📚 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:
react_on_rails/spec/dummy/client/app/startup/ReduxApp.client.jsxreact_on_rails/spec/dummy/package.jsonreact_on_rails/spec/dummy/client/app-react16/startup/ReduxApp.client.jsxreact_on_rails/spec/dummy/client/app/startup/ReduxApp.server.jsxreact_on_rails/spec/dummy/client/app/startup/ReactHelmetAppBroken.client.jsxreact_on_rails/spec/dummy/client/app/stores/SharedReduxStore.jsxreact_on_rails/spec/dummy/client/app/startup/ReactHelmetAppBroken.server.jsxreact_on_rails/spec/dummy/client/app/startup/ReactHelmetApp.server.jsxreact_on_rails/spec/dummy/client/app/components/ReactHelmet.jsxreact_on_rails/spec/dummy/client/app/startup/ReactHelmetApp.client.jsx
📚 Learning: 2025-11-25T08:05:17.804Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T08:05:17.804Z
Learning: Applies to /CHANGELOG.md : Update `/CHANGELOG.md` for user-visible changes (features, bug fixes, breaking changes, deprecations, performance improvements) to the open-source React on Rails gem and npm package
Applied to files:
react_on_rails/spec/dummy/client/app/startup/ReduxApp.client.jsxreact_on_rails/spec/dummy/package.jsonreact_on_rails/spec/dummy/client/app-react16/startup/ReduxApp.client.jsxreact_on_rails/spec/dummy/client/app/startup/ReduxApp.server.jsxreact_on_rails/spec/dummy/client/app/startup/ReactHelmetAppBroken.client.jsxreact_on_rails/spec/dummy/client/app/stores/SharedReduxStore.jsxreact_on_rails/spec/dummy/client/app/startup/ReactHelmetAppBroken.server.jsxreact_on_rails/spec/dummy/client/app/startup/ReactHelmetApp.server.jsxreact_on_rails/spec/dummy/client/app/components/ReactHelmet.jsxreact_on_rails/spec/dummy/client/app/startup/ReactHelmetApp.client.jsx
📚 Learning: 2025-01-23T18:20:45.824Z
Learnt from: alexeyr-ci
Repo: shakacode/react_on_rails PR: 1687
File: spec/dummy/package.json:0-0
Timestamp: 2025-01-23T18:20:45.824Z
Learning: When adding or updating dependencies in spec/dummy/package.json, maintain version consistency with other package.json files in the codebase to avoid potential version conflicts.
Applied to files:
react_on_rails/spec/dummy/package.json
📚 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:
react_on_rails/spec/dummy/package.jsonreact_on_rails/spec/dummy/client/app-react16/startup/ReduxApp.client.jsxreact_on_rails/spec/dummy/client/app/startup/ReduxApp.server.jsxreact_on_rails/spec/dummy/client/app/startup/ReactHelmetAppBroken.client.jsxreact_on_rails/spec/dummy/client/app/stores/SharedReduxStore.jsxreact_on_rails/spec/dummy/client/app/startup/ReactHelmetApp.server.jsxreact_on_rails/spec/dummy/client/app/components/ReactHelmet.jsxreact_on_rails/spec/dummy/client/app/startup/ReactHelmetApp.client.jsx
📚 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/spec/dummy/package.json
📚 Learning: 2025-11-25T08:05:17.804Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T08:05:17.804Z
Learning: The `react_on_rails_pro/` directory has its own Prettier/ESLint configuration and must be linted separately
Applied to files:
react_on_rails/spec/dummy/package.json
📚 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/spec/dummy/package.jsonreact_on_rails/spec/dummy/client/app/startup/ReactHelmetAppBroken.client.jsxreact_on_rails/spec/dummy/client/app/startup/ReactHelmetAppBroken.server.jsxreact_on_rails/spec/dummy/client/app/startup/ReactHelmetApp.server.jsxreact_on_rails/spec/dummy/client/app/startup/ReactHelmetApp.client.jsx
📚 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/spec/dummy/client/app/startup/ReactHelmetAppBroken.client.jsxreact_on_rails/spec/dummy/client/app/startup/ReactHelmetAppBroken.server.jsxreact_on_rails/spec/dummy/client/app/components/ReactHelmet.jsxreact_on_rails/spec/dummy/client/app/startup/ReactHelmetApp.client.jsx
📚 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/spec/dummy/client/app/startup/ReactHelmetApp.server.jsx
📚 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:
react_on_rails/spec/dummy/client/app/startup/ReactHelmetApp.server.jsx
🧬 Code graph analysis (6)
react_on_rails/spec/dummy/client/app/startup/ReduxApp.client.jsx (3)
react_on_rails/spec/dummy/client/app-react16/startup/ReduxApp.client.jsx (3)
store(32-32)combinedReducer(27-27)combinedProps(28-28)react_on_rails/spec/dummy/client/app/startup/ReduxApp.server.jsx (3)
store(31-31)combinedReducer(26-26)combinedProps(27-27)react_on_rails/spec/dummy/client/app/stores/SharedReduxStore.jsx (1)
combinedReducer(13-13)
react_on_rails/spec/dummy/client/app-react16/startup/ReduxApp.client.jsx (2)
react_on_rails/spec/dummy/client/app/startup/ReduxApp.client.jsx (3)
store(37-37)combinedReducer(32-32)combinedProps(33-33)react_on_rails/spec/dummy/client/app/stores/SharedReduxStore.jsx (1)
combinedReducer(13-13)
react_on_rails/spec/dummy/client/app/stores/SharedReduxStore.jsx (3)
react_on_rails/spec/dummy/client/app-react16/startup/ReduxApp.client.jsx (1)
combinedReducer(27-27)react_on_rails/spec/dummy/client/app/startup/ReduxApp.client.jsx (1)
combinedReducer(32-32)react_on_rails/spec/dummy/client/app/startup/ReduxApp.server.jsx (1)
combinedReducer(26-26)
react_on_rails/spec/dummy/client/app/startup/ReactHelmetAppBroken.server.jsx (2)
packages/react-on-rails/src/ReactDOMServer.cts (1)
renderToString(4-4)react_on_rails/spec/dummy/client/app/components/ReactHelmet.jsx (1)
ReactHelmet(8-16)
react_on_rails/spec/dummy/client/app/startup/ReactHelmetApp.server.jsx (1)
react_on_rails/spec/dummy/client/app/startup/ReactHelmetAppBroken.server.jsx (5)
helmetContext(21-21)helmetContext(27-27)componentHtml(22-26)props(20-34)renderedHtml(29-32)
react_on_rails/spec/dummy/client/app/startup/ReactHelmetApp.client.jsx (1)
react_on_rails/spec/dummy/client/app/startup/ReactHelmetAppBroken.client.jsx (1)
props(10-14)
⏰ 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). (6)
- GitHub Check: build-dummy-app-webpack-test-bundles (3.2, 20, minimum)
- GitHub Check: build-dummy-app-webpack-test-bundles (3.4, 22, latest)
- GitHub Check: build
- GitHub Check: build-dummy-app-webpack-test-bundles (3.4, 22, latest)
- GitHub Check: build
- GitHub Check: claude-review
🔇 Additional comments (12)
react_on_rails/spec/dummy/client/app/components/ReactHelmet.jsx (1)
2-7: Helmet import and provider expectations look goodSwitching to
@dr.pogodin/react-helmetand documenting that this component must be wrapped in aHelmetProvideraligns with the rest of the PR; no further changes needed here.Please confirm your local build/SSR tests that exercise Helmet continue to pass with
@dr.pogodin/react-helmetas configured inspec/dummy/package.json.react_on_rails/spec/dummy/client/app/startup/ReduxApp.server.jsx (1)
9-31: Server Redux store now uses namedthunkconsistentlyThe switch to
import { thunk } from 'redux-thunk'andapplyMiddleware(thunk)(createStore)(...)keeps the server-side store in sync with the client and shared store setups.Please rely on your server-rendering tests to confirm redux-thunk behavior is unchanged after the move to the named
thunkexport.react_on_rails/spec/dummy/client/app/stores/SharedReduxStore.jsx (1)
2-15: Shared Redux store thunk wiring matches other entrypointsUsing the named
thunkexport inapplyMiddleware(thunk)(createStore)(...)keeps the shared store aligned with the client/server Redux setups and the upgraded redux-thunk version.Confirm any consumers of this shared store behave as before (especially async action flows) after the thunk import change.
react_on_rails/spec/dummy/client/app/startup/ReactHelmetAppBroken.client.jsx (1)
3-14: Client ReactHelmet is correctly wrapped in HelmetProviderWrapping
ReactHelmetin<HelmetProvider>on the client matches the expectations documented inReactHelmet.jsxand the usage pattern for@dr.pogodin/react-helmet; the export signature remains compatible.Please confirm client-side Helmet behavior (e.g., title updates) still works as expected when exercising this “broken” example in the dummy app.
react_on_rails/spec/dummy/client/app/startup/ReactHelmetAppBroken.server.jsx (1)
6-32: Server ‘broken’ Helmet example now follows HelmetProvider SSR patternUsing
HelmetProviderwith a per-requesthelmetContextand derivingtitlefromhelmet.title.toString()matches the recommended SSR usage for@dr.pogodin/react-helmet, while preserving the intentionally “broken” single-argument signature described in the comments.Please exercise the server-side dummy route that uses this startup file to confirm that both the intended error path (due to the non-generator signature) and the captured
<title>still behave as expected under React 19.react_on_rails/spec/dummy/client/app/startup/ReduxApp.client.jsx (1)
8-37: All redux-thunk imports consistently use named export patternVerification confirms the review comment is accurate:
- All 4 files with redux-thunk imports use
import { thunk } from 'redux-thunk'(named import)- No default imports remain
- All store creation calls properly wire middleware:
applyMiddleware(thunk)- File under review (lines 8 and 37) follows the same consistent pattern as other entrypoints
react_on_rails/spec/dummy/client/app/startup/ReactHelmetApp.server.jsx (4)
19-21: LGTM! Thread-safe per-request context pattern.The per-request
helmetContextinitialization correctly enables thread-safe helmet data capture for server-side rendering, consistent with the@dr.pogodin/react-helmetAPI pattern.
23-33: LGTM! Correct server-side rendering with HelmetProvider.The rendering logic properly:
- Wraps the component tree with
HelmetProviderpassing the per-request context- Uses inline
Helmetto set the page title- Renders the
HelloWorldcomponent with forwarded propsThis pattern aligns with the reference implementation in
ReactHelmetAppBroken.server.jsx.
35-39: LGTM! Safe helmet data extraction.The helmet extraction correctly:
- Retrieves helmet data from the context after rendering
- Includes a null check to prevent runtime errors
- Converts
helmet.titleto string with a safe fallbackThis matches the pattern in
ReactHelmetAppBroken.server.jsx.
4-5: All imports are valid and correctly used.The verification confirms:
HelloWorld.jsxexists at the expected pathreact_on_rails/spec/dummy/client/app/startup/HelloWorld.jsxHelmetandHelmetProviderare correctly exported from@dr.pogodin/react-helmetper the library's API- The usage in the file is correct:
HelmetProviderwraps components with an optionalcontextobject for SSR, andHelmetwraps head elements like<title>. This aligns exactly with the library's documentation- The file properly ends with a newline
react_on_rails/spec/dummy/client/app/startup/ReactHelmetApp.client.jsx (2)
3-3: Import aligns with client-side helmet usage pattern.The
HelmetProviderimport from@dr.pogodin/react-helmetis correct for client-side rendering. Note: Library API verification requested in the server file review (ReactHelmetApp.server.jsx) applies here as well.
9-14: LGTM! Correct client-side HelmetProvider wrapper.The client-side implementation correctly:
- Wraps
ReactHelmetwithHelmetProvider(no context prop needed for client rendering)- Forwards props to the wrapped component
- Matches the pattern in
ReactHelmetAppBroken.client.jsxThis completes the client-side migration to
@dr.pogodin/react-helmet.
| "@dr.pogodin/react-helmet": "^3.0.4", | ||
| "react": "^19.0.0", | ||
| "react-dom": "^19.0.0", | ||
| "react-on-rails": "link:.yalc/react-on-rails", | ||
| "react-redux": "^8.0.2", | ||
| "react-redux": "^9.2.0", | ||
| "react-router-dom": "^6.0.0", | ||
| "redux": "^4.0.1", | ||
| "redux-thunk": "^2.2.0", | ||
| "redux": "^5.0.1", | ||
| "redux-thunk": "^3.1.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Script executed:
#!/bin/bash
# Find all package.json files in the repository
fd package.json -t fRepository: shakacode/react_on_rails
<shell_result>
Repository: shakacode/react_on_rails
Exit code: 0
stdout:
package.json
packages/react-on-rails/package.json
packages/react-on-rails-pro/package.json
packages/react-on-rails-pro-node-renderer/package.json
react_on_rails/spec/dummy/package.json
react_on_rails/spec/react_on_rails/fixtures/absolute_path_package.json
react_on_rails/spec/react_on_rails/fixtures/beta_package.json
react_on_rails/spec/react_on_rails/fixtures/git_package.json
react_on_rails/spec/react_on_rails/fixtures/normal_package.json
react_on_rails/spec/react_on_rails/fixtures/pro_package.json
react_on_rails/spec/react_on_rails/fixtures/pro_semver_caret_package.json
react_on_rails/spec/react_on_rails/fixtures/relative_path_package.json
react_on_rails/spec/react_on_rails/fixtures/semver_caret_package.json
react_on_rails/spec/react_on_rails/fixtures/semver_exact_package.json
react_on_rails/spec/react_on_rails/fixtures/semver_range_package.json
react_on_rails/spec/react_on_rails/fixtures/semver_tilde_package.json
react_on_rails/spec/react_on_rails/fixtures/similar_packages_package.json
react_on_rails/spec/react_on_rails/fixtures/yalc_package.json
react_on_rails_pro/package.json
react_on_rails_pro/spec/dummy/package.json
react_on_rails_pro/spec/execjs-compatible-dummy/package.json
</shell_result>
Script executed:
#!/bin/bash
# Extract React/Redux/Helmet versions from key package.json files
echo "=== Root package.json ==="
cat package.json | jq '.dependencies // empty | {react: .react, "react-dom": .["react-dom"], "react-redux": .["react-redux"], redux: .redux, "redux-thunk": .["redux-thunk"], "@dr.pogodin/react-helmet": .["@dr.pogodin/react-helmet"]} | del(.[] | select(. == null))' 2>/dev/null || echo "No dependencies section"
echo -e "\n=== packages/react-on-rails/package.json ==="
cat packages/react-on-rails/package.json | jq '.peerDependencies // empty | {react: .react, "react-dom": .["react-dom"], "react-redux": .["react-redux"], redux: .redux, "redux-thunk": .["redux-thunk"], "@dr.pogodin/react-helmet": .["@dr.pogodin/react-helmet"]} | del(.[] | select(. == null))' 2>/dev/null || echo "No peerDependencies section"
echo -e "\n=== react_on_rails/spec/dummy/package.json ==="
cat react_on_rails/spec/dummy/package.json | jq '.dependencies // empty | {react: .react, "react-dom": .["react-dom"], "react-redux": .["react-redux"], redux: .redux, "redux-thunk": .["redux-thunk"], "@dr.pogodin/react-helmet": .["@dr.pogodin/react-helmet"]} | del(.[] | select(. == null))' 2>/dev/null || echo "No dependencies section"
echo -e "\n=== react_on_rails_pro/package.json ==="
cat react_on_rails_pro/package.json | jq '.dependencies // empty | {react: .react, "react-dom": .["react-dom"], "react-redux": .["react-redux"], redux: .redux, "redux-thunk": .["redux-thunk"], "@dr.pogodin/react-helmet": .["@dr.pogodin/react-helmet"]} | del(.[] | select(. == null))' 2>/dev/null || echo "No dependencies section"
echo -e "\n=== react_on_rails_pro/spec/dummy/package.json ==="
cat react_on_rails_pro/spec/dummy/package.json | jq '.dependencies // empty | {react: .react, "react-dom": .["react-dom"], "react-redux": .["react-redux"], redux: .redux, "redux-thunk": .["redux-thunk"], "@dr.pogodin/react-helmet": .["@dr.pogodin/react-helmet"]} | del(.[] | select(. == null))' 2>/dev/null || echo "No dependencies section"Repository: shakacode/react_on_rails
<shell_result>
Repository: shakacode/react_on_rails
Exit code: 0
stdout:
=== Root package.json ===
=== packages/react-on-rails/package.json ===
{
"react": ">= 16",
"react-dom": ">= 16"
}
=== react_on_rails/spec/dummy/package.json ===
{
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-redux": "^9.2.0",
"redux": "^5.0.1",
"redux-thunk": "^3.1.0",
"@dr.pogodin/react-helmet": "^3.0.4"
}
=== react_on_rails_pro/package.json ===
=== react_on_rails_pro/spec/dummy/package.json ===
{
"react": "19.0.0",
"react-dom": "19.0.0",
"react-redux": "^9.2.0",
"redux": "^5.0.1",
"redux-thunk": "^3.1.0"
}
</shell_result>
Script executed:
#!/bin/bash
# Check if CHANGELOG.md was updated
echo "=== Recent CHANGELOG.md entries ==="
head -50 CHANGELOG.md
echo -e "\n=== Check git diff for CHANGELOG.md ==="
git diff HEAD~1 CHANGELOG.md 2>/dev/null | head -30 || echo "Cannot get git diff"Repository: shakacode/react_on_rails
<shell_result>
Repository: shakacode/react_on_rails
Exit code: 0
stdout:
=== Recent CHANGELOG.md entries ===
# Change Log
All notable changes to this project's source code will be documented in this file. Items under `Unreleased` is upcoming features that will be out in the next version.
Migration instructions for the major updates can be found [here](https://www.shakacode.com/react-on-rails/docs/guides/upgrading-react-on-rails#upgrading-to-version-9.md). Some smaller migration information can be found here.
## Want to Save Time Updating?
If you need help upgrading `react_on_rails`, `webpacker` to `shakapacker`, or JS packages, contact [email protected]. We can upgrade your project and improve your development and customer experiences, allowing you to focus on building new features or fixing bugs instead.
For an overview of working with us, see our [Client Engagement Model](https://www.shakacode.com/blog/client-engagement-model/) article and [how we bill for time](https://www.shakacode.com/blog/shortcut-jira-trello-github-toggl-time-and-task-tracking/).
If you think ShakaCode can help your project, [click here](https://meetings.hubspot.com/justingordon/30-minute-consultation) to book a call with [Justin Gordon](mailto:[email protected]), the creator of React on Rails and Shakapacker.
## Contributors
Please follow the recommendations outlined at [keepachangelog.com](http://keepachangelog.com/). Please use the existing headings and styling as a guide.
After a release, please make sure to run `bundle exec rake update_changelog`. This will add a heading for the latest version and update the links at the end of the file.
## Versions
### [Unreleased]
Changes since the last non-beta release.
#### Added
- **Service Dependency Checking for bin/dev**: Added optional `.dev-services.yml` configuration to validate required external services (Redis, PostgreSQL, Elasticsearch, etc.) are running before `bin/dev` starts the development server. Provides clear error messages with start commands and install hints when services are missing. Zero impact if not configured - backwards compatible with all existing installations. [PR 2098](https://github.com/shakacode/react_on_rails/pull/2098) by [justin808](https://github.com/justin808).
#### Changed
- **Monorepo Structure Reorganization**: Restructured the monorepo to use two top-level product directories (`react_on_rails/` and `react_on_rails_pro/`) instead of mixing source files at the root level. This improves organization and clarity for contributors working on either the open-source or Pro versions. **Important for contributors**: If you have an existing clone of the repository, you may need to update your IDE exclusion patterns and paths. See the updated `CLAUDE.md` for current project structure. [PR 2114](https://github.com/shakacode/react_on_rails/pull/2114) by [justin808](https://github.com/justin808).
- **Package Manager Migration to pnpm (Contributors Only)**: Migrated the monorepo from Yarn Classic to pnpm for improved dependency management and faster installs. **This only affects contributors** - end users can continue using any package manager (npm, yarn, pnpm) with their applications. Contributors should reinstall dependencies with `pnpm install` after pulling this change. [PR 2121](https://github.com/shakacode/react_on_rails/pull/2121) by [justin808](https://github.com/justin808).
#### Improved
- **Automatic Precompile Hook Coordination in bin/dev**: The `bin/dev` command now automatically runs Shakapacker's `precompile_hook` once before starting development processes and sets `SHAKAPACKER_SKIP_PRECOMPILE_HOOK=true` to prevent duplicate execution in spawned webpack processes.
- Eliminates the need for manual coordination, sleep hacks, and duplicate task calls in Procfile.dev
- Users can configure expensive build tasks (like locale generation or ReScript compilation) once in `config/shakapacker.yml` and `bin/dev` handles coordination automatically
- Includes warning for Shakapacker versions below 9.4.0 (the `SHAKAPACKER_SKIP_PRECOMPILE_HOOK` environment variable is only supported in 9.4.0+)
- The `SHAKAPACKER_SKIP_PRECOMPILE_HOOK` environment variable is set for all spawned processes, making it available for custom scripts that need to detect when `bin/dev` is managing the precompile hook
- Addresses [2091](https://github.com/shakacode/react_on_rails/issues/2091) by [justin808](https://github.com/justin808)
- **Idempotent Locale Generation**: The `react_on_rails:locale` rake task is now idempotent, automatically skipping generation when locale files are already up-to-date. This makes it safe to call multiple times (e.g., in Shakapacker's `precompile_hook`) without duplicate work. Added `force=true` option to override timestamp checking. [PR 2090](https://github.com/shakacode/react_on_rails/pull/2090) by [justin808](https://github.com/justin808).
### [v16.2.0.beta.12] - 2025-11-20
#### Added
=== Check git diff for CHANGELOG.md ===
</shell_result>
Script executed:
#!/bin/bash
# Check lines 35-45 in spec/dummy/package.json to see the devDependencies
sed -n '35,45p' react_on_rails/spec/dummy/package.jsonRepository: shakacode/react_on_rails
<shell_result>
Repository: shakacode/react_on_rails
Exit code: 0
stdout:
"@babel/preset-react": "^7.10.4",
"@playwright/test": "^1.55.1",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.1",
"@rescript/react": "^0.13.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"babel-loader": "8.2.4",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"compression-webpack-plugin": "9",
"css-loader": "^6.5.1",
"expose-loader": "^1.0.3",
</shell_result>
Based on my verification, I've identified real cross-package inconsistencies and a missing CHANGELOG entry. Here's the rewritten review comment:
Version inconsistencies exist across spec/dummy packages; React 19 upgrade missing from CHANGELOG
Cross-package comparison reveals:
react_on_rails/spec/dummy/package.json: React^19.0.0, React-Redux^9.2.0, Redux^5.0.1, redux-thunk^3.1.0, @dr.pogodin/react-helmet^3.0.4react_on_rails_pro/spec/dummy/package.json: React19.0.0(exact version, not caret), React-Redux^9.2.0, Redux^5.0.1, redux-thunk^3.1.0, @dr.pogodin/react-helmet missing
The semver mismatch (^19.0.0 vs 19.0.0) and missing Helmet dependency between the two spec/dummy packages should be reconciled. Additionally, per project guidelines, the React 19 upgrade and dependency bumps should be documented in CHANGELOG.md under the Unreleased section.
🤖 Prompt for AI Agents
In react_on_rails/spec/dummy/package.json around lines 21-28 there is a
semver/dep mismatch vs react_on_rails_pro/spec/dummy/package.json (this file
uses "react": "^19.0.0" and includes "@dr.pogodin/react-helmet": "^3.0.4", while
the pro package uses "react": "19.0.0" and omits Helmet); make the versions
consistent across both spec/dummy package.json files (choose careted or exact
for react and apply the same style to react-dom), add the missing
@dr.pogodin/react-helmet dependency to
react_on_rails_pro/spec/dummy/package.json with the same version, and add a
brief entry under the Unreleased section of CHANGELOG.md documenting the React
19 upgrade and dependency bumps.
|
/run-skipped-ci |
|
🚀 Full CI Mode Enabled ✅ Triggered all workflows for full CI coverage Note: Added the To disable full CI mode, use the View progress in the Actions tab. |
…ct-helmet Changes: - Fix ReactHelmetApp.server.jsx to wrap ReactHelmet component instead of duplicating component logic inline - Migrate react_on_rails_pro/spec/dummy to @dr.pogodin/react-helmet (React 19 compatible) - Update Pro shakapacker from 9.3.0 to 9.4.0 for consistency with open source - Add HelmetProvider wrappers to all client and server entry points in Pro - Use exact React 19.0.0 versions (consistent between open source and Pro) - Rename loadable-client.imports-loadable.js to .jsx (now contains JSX) The @dr.pogodin/react-helmet migration replaces Helmet.renderStatic() with the thread-safe HelmetProvider context pattern for SSR. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Code Review: React 19 Compatibility UpdateI've reviewed this PR for upgrading the spec/dummy apps to React 19 compatibility. Overall, this is a well-executed migration with appropriate dependency updates and code changes. Here's my detailed feedback: ✅ Strengths1. Comprehensive Dependency UpdatesThe dependency upgrade path is correct and well-documented:
2. Correct redux-thunk MigrationThe change from default export to named export is correct: // ✅ Correct migration
import { thunk } from 'redux-thunk'; // v3.x uses named export
applyMiddleware(thunk)All instances properly updated in:
3. Thread-Safe react-helmet ImplementationThe SSR implementation correctly uses const helmetContext = {};
const componentHtml = renderToString(
<HelmetProvider context={helmetContext}>
{/* ... */}
</HelmetProvider>
);
const { helmet } = helmetContext;This is critical for preventing data leakage between concurrent server-side requests. 4. Good Documentation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (2)
react_on_rails_pro/docs/code-splitting-loadable-components.md (1)
24-24: Use hyphenated compound adjectives for "Server-side Rendering".Lines 24 and 90 use "Server Side Rendering" as a compound adjective modifying a noun. Hyphenate compound adjectives for proper English grammar: "Server-side Rendering".
-[`@loadable/babel-plugin`](https://loadable-components.com/docs/getting-started/) - The plugin transforms your code to be ready for Server Side Rendering. +[`@loadable/babel-plugin`](https://loadable-components.com/docs/getting-started/) - The plugin transforms your code to be ready for Server-side Rendering.Also applies to: 90-90
react_on_rails_pro/spec/dummy/package.json (1)
53-66: Pro dummy deps now match OSS dummy; consider aligning TS React types as a follow-upAdding
@dr.pogodin/react-helmetand pinningshakapackerto9.4.0brings this dummy in line with the mainreact_on_rails/spec/dummy/package.jsonfor the React 19 + Helmet stack, which addresses the earlier cross-package mismatch.One remaining nit: the OSS dummy has React 19-compatible type packages, while this pro dummy still lists
@types/react-domat^18.x. Not urgent for a sample app, but it’s worth aligning TS React/DOM types between the two dummies to avoid confusing version skew for contributors.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (15)
react_on_rails/spec/dummy/client/app/startup/ReactHelmetApp.server.jsx(2 hunks)react_on_rails/spec/dummy/package.json(1 hunks)react_on_rails_pro/docs/code-splitting-loadable-components.md(15 hunks)react_on_rails_pro/spec/dummy/app/views/pages/pro/loadable_component.html.erb(1 hunks)react_on_rails_pro/spec/dummy/client/app/components/Loadable/Header.jsx(1 hunks)react_on_rails_pro/spec/dummy/client/app/components/Loadable/pages/A.jsx(1 hunks)react_on_rails_pro/spec/dummy/client/app/components/Loadable/pages/B.jsx(1 hunks)react_on_rails_pro/spec/dummy/client/app/components/ReactHelmet.jsx(1 hunks)react_on_rails_pro/spec/dummy/client/app/loadable/loadable-client.imports-hmr.jsx(1 hunks)react_on_rails_pro/spec/dummy/client/app/loadable/loadable-client.imports-loadable.jsx(1 hunks)react_on_rails_pro/spec/dummy/client/app/loadable/loadable-server.imports-hmr.jsx(1 hunks)react_on_rails_pro/spec/dummy/client/app/loadable/loadable-server.imports-loadable.jsx(2 hunks)react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ReactHelmetApp.client.jsx(1 hunks)react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ReactHelmetApp.server.jsx(2 hunks)react_on_rails_pro/spec/dummy/package.json(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*
📄 CodeRabbit inference engine (CLAUDE.md)
ALWAYS ensure files end with a newline character before committing/pushing
Files:
react_on_rails/spec/dummy/package.jsonreact_on_rails_pro/spec/dummy/client/app/components/Loadable/pages/A.jsxreact_on_rails/spec/dummy/client/app/startup/ReactHelmetApp.server.jsxreact_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ReactHelmetApp.server.jsxreact_on_rails_pro/spec/dummy/client/app/loadable/loadable-server.imports-loadable.jsxreact_on_rails_pro/spec/dummy/client/app/loadable/loadable-server.imports-hmr.jsxreact_on_rails_pro/spec/dummy/client/app/loadable/loadable-client.imports-loadable.jsxreact_on_rails_pro/spec/dummy/client/app/components/Loadable/Header.jsxreact_on_rails_pro/spec/dummy/client/app/components/Loadable/pages/B.jsxreact_on_rails_pro/spec/dummy/package.jsonreact_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ReactHelmetApp.client.jsxreact_on_rails_pro/spec/dummy/client/app/components/ReactHelmet.jsxreact_on_rails_pro/spec/dummy/app/views/pages/pro/loadable_component.html.erbreact_on_rails_pro/spec/dummy/client/app/loadable/loadable-client.imports-hmr.jsxreact_on_rails_pro/docs/code-splitting-loadable-components.md
🧠 Learnings (20)
📓 Common learnings
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T08:05:17.804Z
Learning: Applies to /CHANGELOG.md : Update `/CHANGELOG.md` for user-visible changes (features, bug fixes, breaking changes, deprecations, performance improvements) to the open-source React on Rails gem and npm package
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T08:05:17.804Z
Learning: Applies to /CHANGELOG*.md : Use changelog format: `[PR 1818](https://github.com/shakacode/react_on_rails/pull/1818) by [username](https://github.com/username)` (no hash in PR number)
📚 Learning: 2025-11-25T08:05:17.804Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T08:05:17.804Z
Learning: Applies to /CHANGELOG.md : Update `/CHANGELOG.md` for user-visible changes (features, bug fixes, breaking changes, deprecations, performance improvements) to the open-source React on Rails gem and npm package
Applied to files:
react_on_rails/spec/dummy/package.jsonreact_on_rails_pro/spec/dummy/client/app/components/Loadable/pages/A.jsxreact_on_rails/spec/dummy/client/app/startup/ReactHelmetApp.server.jsxreact_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ReactHelmetApp.server.jsxreact_on_rails_pro/spec/dummy/client/app/loadable/loadable-server.imports-loadable.jsxreact_on_rails_pro/spec/dummy/client/app/loadable/loadable-server.imports-hmr.jsxreact_on_rails_pro/spec/dummy/client/app/loadable/loadable-client.imports-loadable.jsxreact_on_rails_pro/spec/dummy/client/app/components/Loadable/Header.jsxreact_on_rails_pro/spec/dummy/client/app/components/Loadable/pages/B.jsxreact_on_rails_pro/spec/dummy/package.jsonreact_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ReactHelmetApp.client.jsxreact_on_rails_pro/spec/dummy/client/app/components/ReactHelmet.jsxreact_on_rails_pro/spec/dummy/app/views/pages/pro/loadable_component.html.erbreact_on_rails_pro/spec/dummy/client/app/loadable/loadable-client.imports-hmr.jsxreact_on_rails_pro/docs/code-splitting-loadable-components.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:
react_on_rails/spec/dummy/package.jsonreact_on_rails_pro/spec/dummy/client/app/components/Loadable/pages/A.jsxreact_on_rails/spec/dummy/client/app/startup/ReactHelmetApp.server.jsxreact_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ReactHelmetApp.server.jsxreact_on_rails_pro/spec/dummy/client/app/loadable/loadable-server.imports-loadable.jsxreact_on_rails_pro/spec/dummy/client/app/loadable/loadable-server.imports-hmr.jsxreact_on_rails_pro/spec/dummy/client/app/loadable/loadable-client.imports-loadable.jsxreact_on_rails_pro/spec/dummy/client/app/components/Loadable/Header.jsxreact_on_rails_pro/spec/dummy/client/app/components/Loadable/pages/B.jsxreact_on_rails_pro/spec/dummy/package.jsonreact_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ReactHelmetApp.client.jsxreact_on_rails_pro/spec/dummy/client/app/components/ReactHelmet.jsxreact_on_rails_pro/spec/dummy/app/views/pages/pro/loadable_component.html.erbreact_on_rails_pro/spec/dummy/client/app/loadable/loadable-client.imports-hmr.jsxreact_on_rails_pro/docs/code-splitting-loadable-components.md
📚 Learning: 2025-01-23T18:20:45.824Z
Learnt from: alexeyr-ci
Repo: shakacode/react_on_rails PR: 1687
File: spec/dummy/package.json:0-0
Timestamp: 2025-01-23T18:20:45.824Z
Learning: When adding or updating dependencies in spec/dummy/package.json, maintain version consistency with other package.json files in the codebase to avoid potential version conflicts.
Applied to files:
react_on_rails/spec/dummy/package.jsonreact_on_rails_pro/spec/dummy/package.json
📚 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:
react_on_rails/spec/dummy/package.jsonreact_on_rails_pro/spec/dummy/client/app/components/Loadable/pages/A.jsxreact_on_rails/spec/dummy/client/app/startup/ReactHelmetApp.server.jsxreact_on_rails_pro/spec/dummy/client/app/loadable/loadable-server.imports-loadable.jsxreact_on_rails_pro/spec/dummy/client/app/loadable/loadable-server.imports-hmr.jsxreact_on_rails_pro/spec/dummy/client/app/loadable/loadable-client.imports-loadable.jsxreact_on_rails_pro/spec/dummy/client/app/components/Loadable/Header.jsxreact_on_rails_pro/spec/dummy/client/app/components/Loadable/pages/B.jsxreact_on_rails_pro/spec/dummy/package.jsonreact_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ReactHelmetApp.client.jsxreact_on_rails_pro/spec/dummy/client/app/components/ReactHelmet.jsxreact_on_rails_pro/spec/dummy/app/views/pages/pro/loadable_component.html.erbreact_on_rails_pro/spec/dummy/client/app/loadable/loadable-client.imports-hmr.jsxreact_on_rails_pro/docs/code-splitting-loadable-components.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/spec/dummy/package.jsonreact_on_rails_pro/spec/dummy/client/app/components/Loadable/Header.jsxreact_on_rails_pro/spec/dummy/package.jsonreact_on_rails_pro/spec/dummy/app/views/pages/pro/loadable_component.html.erbreact_on_rails_pro/docs/code-splitting-loadable-components.md
📚 Learning: 2025-11-25T08:05:17.804Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T08:05:17.804Z
Learning: Applies to /CHANGELOG*.md : Use changelog format: `[PR 1818](https://github.com/shakacode/react_on_rails/pull/1818) by [username](https://github.com/username)` (no hash in PR number)
Applied to files:
react_on_rails/spec/dummy/package.jsonreact_on_rails_pro/docs/code-splitting-loadable-components.md
📚 Learning: 2025-11-25T08:05:17.804Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T08:05:17.804Z
Learning: The `react_on_rails_pro/` directory has its own Prettier/ESLint configuration and must be linted separately
Applied to files:
react_on_rails/spec/dummy/package.jsonreact_on_rails_pro/spec/dummy/package.jsonreact_on_rails_pro/spec/dummy/client/app/components/ReactHelmet.jsxreact_on_rails_pro/spec/dummy/app/views/pages/pro/loadable_component.html.erbreact_on_rails_pro/docs/code-splitting-loadable-components.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:
react_on_rails/spec/dummy/package.jsonreact_on_rails_pro/docs/code-splitting-loadable-components.md
📚 Learning: 2025-11-25T08:05:17.804Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T08:05:17.804Z
Learning: Applies to /CHANGELOG_PRO.md : Update `/CHANGELOG_PRO.md` for Pro-only features, fixes, and changes affecting Pro packages
Applied to files:
react_on_rails/spec/dummy/package.json
📚 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/spec/dummy/package.jsonreact_on_rails/spec/dummy/client/app/startup/ReactHelmetApp.server.jsxreact_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ReactHelmetApp.server.jsxreact_on_rails_pro/spec/dummy/client/app/loadable/loadable-server.imports-loadable.jsxreact_on_rails_pro/spec/dummy/client/app/loadable/loadable-server.imports-hmr.jsxreact_on_rails_pro/spec/dummy/client/app/loadable/loadable-client.imports-loadable.jsxreact_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ReactHelmetApp.client.jsxreact_on_rails_pro/spec/dummy/client/app/components/ReactHelmet.jsxreact_on_rails_pro/spec/dummy/app/views/pages/pro/loadable_component.html.erbreact_on_rails_pro/spec/dummy/client/app/loadable/loadable-client.imports-hmr.jsxreact_on_rails_pro/docs/code-splitting-loadable-components.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/spec/dummy/client/app/components/Loadable/pages/A.jsxreact_on_rails/spec/dummy/client/app/startup/ReactHelmetApp.server.jsxreact_on_rails_pro/spec/dummy/client/app/loadable/loadable-client.imports-loadable.jsxreact_on_rails_pro/spec/dummy/client/app/components/Loadable/pages/B.jsxreact_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ReactHelmetApp.client.jsxreact_on_rails_pro/spec/dummy/app/views/pages/pro/loadable_component.html.erbreact_on_rails_pro/docs/code-splitting-loadable-components.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/spec/dummy/client/app/components/Loadable/pages/A.jsxreact_on_rails/spec/dummy/client/app/startup/ReactHelmetApp.server.jsxreact_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ReactHelmetApp.server.jsxreact_on_rails_pro/spec/dummy/client/app/loadable/loadable-server.imports-loadable.jsxreact_on_rails_pro/spec/dummy/client/app/loadable/loadable-server.imports-hmr.jsxreact_on_rails_pro/spec/dummy/client/app/loadable/loadable-client.imports-loadable.jsxreact_on_rails_pro/spec/dummy/client/app/components/Loadable/Header.jsxreact_on_rails_pro/spec/dummy/client/app/components/Loadable/pages/B.jsxreact_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ReactHelmetApp.client.jsxreact_on_rails_pro/spec/dummy/client/app/components/ReactHelmet.jsxreact_on_rails_pro/spec/dummy/app/views/pages/pro/loadable_component.html.erbreact_on_rails_pro/spec/dummy/client/app/loadable/loadable-client.imports-hmr.jsxreact_on_rails_pro/docs/code-splitting-loadable-components.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:
react_on_rails_pro/spec/dummy/client/app/components/Loadable/pages/A.jsxreact_on_rails/spec/dummy/client/app/startup/ReactHelmetApp.server.jsxreact_on_rails_pro/spec/dummy/client/app/loadable/loadable-server.imports-hmr.jsxreact_on_rails_pro/spec/dummy/client/app/loadable/loadable-client.imports-loadable.jsxreact_on_rails_pro/spec/dummy/client/app/components/Loadable/pages/B.jsxreact_on_rails_pro/spec/dummy/package.jsonreact_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ReactHelmetApp.client.jsxreact_on_rails_pro/spec/dummy/app/views/pages/pro/loadable_component.html.erbreact_on_rails_pro/spec/dummy/client/app/loadable/loadable-client.imports-hmr.jsxreact_on_rails_pro/docs/code-splitting-loadable-components.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/spec/dummy/client/app/startup/ReactHelmetApp.server.jsxreact_on_rails_pro/spec/dummy/client/app/loadable/loadable-server.imports-hmr.jsxreact_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ReactHelmetApp.client.jsxreact_on_rails_pro/spec/dummy/app/views/pages/pro/loadable_component.html.erbreact_on_rails_pro/docs/code-splitting-loadable-components.md
📚 Learning: 2025-11-25T08:05:17.804Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T08:05:17.804Z
Learning: Applies to lib/react_on_rails/*.rb : Create RBS signature files for new Ruby files in `lib/react_on_rails/` by adding corresponding `.rbs` file in `sig/react_on_rails/`, adding to Steepfile, and validating before committing
Applied to files:
react_on_rails_pro/docs/code-splitting-loadable-components.md
📚 Learning: 2025-11-25T08:05:17.804Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T08:05:17.804Z
Learning: Applies to sig/react_on_rails/**/*.rbs : In RBS type signature files, define type signatures that correspond to Ruby files in `lib/react_on_rails/`
Applied to files:
react_on_rails_pro/docs/code-splitting-loadable-components.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/code-splitting-loadable-components.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:
react_on_rails_pro/docs/code-splitting-loadable-components.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/code-splitting-loadable-components.md
🧬 Code graph analysis (5)
react_on_rails/spec/dummy/client/app/startup/ReactHelmetApp.server.jsx (7)
react_on_rails_pro/spec/dummy/client/app/loadable/loadable-server.imports-hmr.jsx (3)
helmetContext(11-11)helmetContext(17-17)componentHtml(12-16)react_on_rails_pro/spec/dummy/client/app/loadable/loadable-server.imports-loadable.jsx (3)
helmetContext(19-19)helmetContext(27-27)componentHtml(20-26)react_on_rails_pro/spec/dummy/client/app/components/ReactHelmet.jsx (1)
ReactHelmet(6-19)react_on_rails/spec/dummy/client/app/components/ReactHelmet.jsx (1)
ReactHelmet(8-16)react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ReactHelmetApp.client.jsx (1)
props(11-15)react_on_rails/spec/dummy/client/app/startup/ReduxApp.server.jsx (1)
props(22-40)react_on_rails/spec/dummy/client/app/stores/SharedReduxStore.jsx (1)
props(10-16)
react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ReactHelmetApp.server.jsx (1)
react_on_rails_pro/spec/dummy/client/app/loadable/loadable-server.imports-hmr.jsx (3)
helmetContext(11-11)helmetContext(17-17)componentHtml(12-16)
react_on_rails_pro/spec/dummy/client/app/loadable/loadable-server.imports-hmr.jsx (1)
react_on_rails_pro/spec/dummy/client/app/loadable/loadable-server.imports-loadable.jsx (4)
railsContext(16-16)helmetContext(19-19)helmetContext(27-27)componentHtml(20-26)
react_on_rails_pro/spec/dummy/client/app/loadable/loadable-client.imports-loadable.jsx (4)
react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ReactHelmetApp.client.jsx (1)
props(11-15)react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ReactHelmetApp.server.jsx (1)
props(19-46)react_on_rails_pro/spec/dummy/client/app/loadable/loadable-server.imports-loadable.jsx (1)
railsContext(16-16)react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ApolloGraphQLApp.client.jsx (1)
el(24-24)
react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ReactHelmetApp.client.jsx (1)
react_on_rails_pro/spec/dummy/client/app/components/ReactHelmet.jsx (1)
ReactHelmet(6-19)
🪛 LanguageTool
react_on_rails_pro/docs/code-splitting-loadable-components.md
[uncategorized] ~24-~24: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...in transforms your code to be ready for Server Side Rendering. - @loadable/component - Ma...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
[uncategorized] ~68-~68: “React” is a proper noun and needs to be capitalized.
Context: ...unkCountPlugin({ maxChunks: 1 })` The react_on_rails_pro node-renderer expects only...
(A_GOOGLE)
[uncategorized] ~90-~90: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...in transforms your code to be ready for Server Side Rendering Add this to `babel.config.js...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
🪛 markdownlint-cli2 (0.18.1)
react_on_rails_pro/docs/code-splitting-loadable-components.md
5-5: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
100-100: Bare URL used
(MD034, no-bare-urls)
⏰ 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). (10)
- GitHub Check: rspec-package-tests (3.2, minimum)
- GitHub Check: rspec-package-tests (3.4, latest)
- GitHub Check: build-dummy-app-webpack-test-bundles (3.2, 20, minimum)
- GitHub Check: examples (3.4, latest)
- GitHub Check: examples (3.2, minimum)
- GitHub Check: pro-lint-js-and-ruby
- GitHub Check: build
- GitHub Check: build-dummy-app-webpack-test-bundles
- GitHub Check: build-dummy-app-webpack-test-bundles
- GitHub Check: claude-review
🔇 Additional comments (19)
react_on_rails_pro/spec/dummy/app/views/pages/pro/loadable_component.html.erb (1)
26-26: Client code snippet path update to.jsxlooks correctUsing the
.jsxclient imports file here matches the server snippet above and the JSX language hint, so this change keeps the docs in sync with the actual JSX-based client startup. No issues from this change.react_on_rails_pro/docs/code-splitting-loadable-components.md (1)
1-100: File already ends with a newline character—no action required.The verification confirms that
react_on_rails_pro/docs/code-splitting-loadable-components.mdalready complies with the coding guideline requiring all files to end with a newline character. The file is in the correct state.react_on_rails_pro/spec/dummy/client/app/loadable/loadable-client.imports-loadable.jsx (2)
5-5: HelmetProvider import matches new Helmet fork usageImporting
HelmetProviderfrom@dr.pogodin/react-helmetis consistent with the rest of the dummy app’s migration and is the right entry for the forked, React‑19‑compatible Helmet implementation. No issues here; just ensure the dependency is installed and resolved in this package.json scope.
12-17: Hydration wrapper with HelmetProvider looks correct and consistentWrapping the hydrated
ClientAppwith<HelmetProvider>preserves the existing props (includingpath: railsContext.pathname) while enabling Helmet context during hydration. This matches the HelmetProvider pattern used in the ReactHelmet* client/server files and should keep head management consistent for loadable routes.react_on_rails_pro/spec/dummy/client/app/loadable/loadable-server.imports-loadable.jsx (5)
7-7: LGTM! Correct import for the new helmet package.The import correctly references the thread-safe React 19-compatible fork mentioned in the PR objectives.
17-26: LGTM! Correct implementation of thread-safe SSR pattern.The per-request
helmetContextandHelmetProviderwrapper correctly implement the thread-safe server-side rendering pattern for the new helmet package, while preserving the existing loadable chunks collection behavior.
27-27: LGTM! Correct extraction of helmet data.The destructuring correctly retrieves the helmet data populated by
HelmetProviderduring rendering.
43-43: File already complies with newline requirement.The file
react_on_rails_pro/spec/dummy/client/app/loadable/loadable-server.imports-loadable.jsxends with a newline character as required by coding guidelines. No action needed.
32-38: Based on my comprehensive verification of the codebase, I can now provide the rewritten review comment:
Code does not require API verification—helmet property access is used consistently and correctly throughout the codebase.
The guarded property access pattern (
helmet ? helmet.link.toString() : '', etc.) matches the pattern used across all server-side rendering files in the project (react_on_rails_pro/spec/dummy/client/app/loadable/loadable-server.imports-hmr.jsx,react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ReactHelmetApp.server.jsx, andreact_on_rails/spec/dummy/client/app/startup/ReactHelmetApp.server.jsx). The@dr.pogodin/react-helmetdependency (version^3.0.4) is active and functioning correctly. The file correctly ends with a newline character.react_on_rails_pro/spec/dummy/client/app/loadable/loadable-client.imports-hmr.jsx (1)
2-10: Client HMR wrapper correctly upgraded to useHelmetProviderThe generator signature stays intact and wrapping
LoadablewithHelmetProvider(without a context object) is the expected client-side usage with@dr.pogodin/react-helmet. No issues from a React on Rails integration standpoint.react_on_rails_pro/spec/dummy/client/app/loadable/loadable-server.imports-hmr.jsx (1)
3-25: SSR HMR integration withHelmetProviderandhelmetContextlooks correctThe HMR server entry now follows the standard pattern for
@dr.pogodin/react-helmetSSR: per-requesthelmetContext,HelmetProvider context={helmetContext}duringrenderToString, and safe extraction ofhelmetfields (link/meta/style/title) with empty-string fallbacks. This keeps the existing API shape while making the SSR path thread-safe.react_on_rails/spec/dummy/package.json (1)
21-28: React 19 + Redux 5 + Helmet stack in the dummy app is consistent and appropriateThe dummy app now cleanly targets React 19 with matching React DOM, updated
react-redux/redux/redux-thunk, and@dr.pogodin/react-helmet. These versions align with the pro dummy and provide a coherent React 19 test surface without tightening the library’s published peerDeps.react_on_rails/spec/dummy/client/app/startup/ReactHelmetApp.server.jsx (1)
4-34: Server-side ReactHelmet now uses the per-requestHelmetProviderpatternUsing
HelmetProviderwith a freshhelmetContextper call and derivingtitlefromhelmetContext.helmetmatches the recommended SSR integration for@dr.pogodin/react-helmet, while preserving the existing{ renderedHtml }contract. Keeping this example focused ontitleis fine given the more detailed loadable/HMR demos elsewhere.react_on_rails_pro/spec/dummy/client/app/components/Loadable/pages/A.jsx (1)
2-2: Page A correctly switched to@dr.pogodin/react-helmetOnly the import source changed; the Helmet usage remains the same and will now participate in the HelmetProvider context provided by the Loadable wrappers.
react_on_rails_pro/spec/dummy/client/app/components/Loadable/pages/B.jsx (1)
2-2: Page B Helmet import migrated consistentlyThe component now pulls
Helmetfrom@dr.pogodin/react-helmet, matching Page A and the rest of the React 19-compatible stack, with no behavioral changes.react_on_rails_pro/spec/dummy/client/app/components/ReactHelmet.jsx (1)
2-2: ProReactHelmetcomponent now aligned with the new Helmet packageSwitching the import to
@dr.pogodin/react-helmetkeeps the component logic intact and matches the HelmetProvider-based client/server startup code introduced elsewhere in the dummy app.react_on_rails_pro/spec/dummy/client/app/components/Loadable/Header.jsx (1)
2-2: LGTM! Clean migration to React 19-compatible helmet library.The import change from
react-helmetto@dr.pogodin/react-helmetis correct. The Helmet component API remains unchanged, making this a seamless upgrade.react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ReactHelmetApp.client.jsx (1)
5-14: LGTM! Correct HelmetProvider integration for client-side rendering.The addition of HelmetProvider wrapper follows the documented pattern for @dr.pogodin/react-helmet. The comment on line 10 clearly explains the requirement, and the implementation matches the patterns used in other client-side files across the PR.
react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ReactHelmetApp.server.jsx (1)
8-8: LGTM! Thread-safe server-side helmet implementation.The migration to HelmetProvider with per-request
helmetContextfollows the correct pattern for @dr.pogodin/react-helmet on the server. This approach ensures thread-safety by capturing helmet data per request rather than using the previousHelmet.renderStatic()method. The defensive check on line 43 (helmet ? helmet.title.toString() : '') properly handles cases where helmet may be undefined.Also applies to: 31-43
| by ShakaCode | ||
|
|
||
| *Last updated September 19, 2022* | ||
| _Last updated September 19, 2022_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace emphasis formatting with plain text for the date line.
Line 5 uses emphasis (_..._) for metadata, which violates MD036 (no-emphasis-as-heading). Metadata like dates should be plain text or a formal heading if needed.
-_Last updated September 19, 2022_
+Last updated September 19, 2022📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| _Last updated September 19, 2022_ | |
| Last updated September 19, 2022 |
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
5-5: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
🤖 Prompt for AI Agents
In react_on_rails_pro/docs/code-splitting-loadable-components.md around line 5,
the date line uses emphasis markdown `_Last updated September 19, 2022_` which
triggers MD036; remove the surrounding underscores and make it plain text (e.g.,
Last updated September 19, 2022) or convert it to a proper heading if a heading
is desired.
| ``` | ||
| https://loadable-components.com/docs/babel-plugin/ | ||
|
|
||
| https://loadable-components.com/docs/babel-plugin/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrap bare URL in markdown link syntax.
Line 100 contains a bare URL that should be wrapped in proper markdown link format per MD034.
-https://loadable-components.com/docs/babel-plugin/
+[https://loadable-components.com/docs/babel-plugin/](https://loadable-components.com/docs/babel-plugin/)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| https://loadable-components.com/docs/babel-plugin/ | |
| [https://loadable-components.com/docs/babel-plugin/](https://loadable-components.com/docs/babel-plugin/) |
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
100-100: Bare URL used
(MD034, no-bare-urls)
🤖 Prompt for AI Agents
In react_on_rails_pro/docs/code-splitting-loadable-components.md around line
100, there is a bare URL ("https://loadable-components.com/docs/babel-plugin/")
that violates MD034; replace it with markdown link syntax by wrapping the URL in
either inline link form [link
text](https://loadable-components.com/docs/babel-plugin/) or angle-bracketed
form <https://loadable-components.com/docs/babel-plugin/>—prefer using a
descriptive link text such as [Loadable Components Babel
Plugin](https://loadable-components.com/docs/babel-plugin/) for clarity.
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Code Review - PR #2127: Update spec/dummy for React 19 compatibility✅ Overall AssessmentThis is a well-structured upgrade PR that properly updates the test dummy apps to React 19. The changes are focused, consistent, and follow best practices for the dependency upgrades involved. 🎯 Strengths1. Consistent Migration Pattern
2. Proper React 19 Dependency ChainThe dependency updates follow the correct upgrade path:
3. Thread-Safe Helmet ImplementationThe server-side rendering changes for react-helmet are architecturally sound: const helmetContext = {};
const componentHtml = renderToString(
<HelmetProvider context={helmetContext}>
<ReactHelmet {...props} />
</HelmetProvider>
);
const { helmet } = helmetContext;This per-request context pattern prevents race conditions in multi-threaded environments. 4. Defensive Null CheckingGood defensive programming with
|
Update shakapacker gem from 9.3.0 to 9.4.0 to match npm package version. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
PR Review: React 19 Compatibility UpdatesI've reviewed this PR for code quality, potential issues, performance, security, and test coverage. Overall, this is a well-structured upgrade with proper migration patterns. Here are my findings: ✅ Strengths1. Comprehensive Dependency Updates
2. Consistent Migration Patterns
3. Good Documentation
🔍 Issues & SuggestionsCritical: Missing Defensive CheckIn title: helmet ? helmet.title.toString() : '',Issue: While you check if Risk: If helmet exists but Recommendation: Use optional chaining: title: helmet?.title?.toString() || '',
link: helmet?.link?.toString() || '',
meta: helmet?.meta?.toString() || '',
style: helmet?.style?.toString() || '',This pattern should be applied in all server rendering files:
Minor: Code Consistency1. File Extension Inconsistency You renamed:
Good! But verify all files using JSX have 2. CLAUDE.md Location The CLAUDE.md changes add a "COMMIT AND PUSH BY DEFAULT" section. This is helpful guidance but:
🎯 Testing RecommendationsBased on CLAUDE.md guidelines, ensure you've tested: # 1. Clean install (CRITICAL)
rm -rf node_modules
pnpm install --frozen-lockfile
# 2. Build all packages
pnpm run build
# 3. Test dummy app
cd react_on_rails/spec/dummy
pnpm run build:test
# 4. Run integration tests
bundle exec rake run_rspec:dummy
# 5. Test React Helmet SSR specifically
# - Navigate to React Helmet test pages
# - Verify <title> tags render correctly on server
# - Check browser console for hydration errors
# - Verify helmet data in page source (view-source:)Key tests for React Helmet migration:
🔒 Security ConsiderationsNo security concerns identified. The dependency updates are:
⚡ Performance ConsiderationsNeutral to positive performance impact:
No performance regressions expected. 📋 Test CoverageQuestion: Are there existing tests that cover:
Recommendation: Ensure integration tests exercise these code paths:
📝 ChangelogPer CLAUDE.md guidelines:
#### [PR 2127](https://github.com/shakacode/react_on_rails/pull/2127) by [justin808](https://github.com/justin808)
**Added React 19 support** for spec/dummy test applications. Updated Redux stack (redux 4→5, react-redux 8→9, redux-thunk 2→3) and migrated from `react-helmet` to `@dr.pogodin/react-helmet` for thread-safe SSR. Updated all server rendering functions to use HelmetProvider context pattern.
Note: This updates the test/example applications only. Main library compatibility verified.✅ Final RecommendationApprove with minor fixes needed:
The migration approach is solid and follows React 19 best practices. Once the defensive checks are added, this should be safe to merge. 🤖 Review ProcessThis review was performed according to CLAUDE.md guidelines, checking:
|
Summary
Updates
spec/dummydependencies to be compatible with React 19:Dependency Updates
reactreact-domreact-reduxreduxredux-thunkreact-helmet@dr.pogodin/react-helmet@^3.0.4Code Changes
redux-thunk imports - Updated from default export to named export:
import middleware from 'redux-thunk'→import { thunk } from 'redux-thunk'SharedReduxStore.jsx,ReduxApp.server.jsx,ReduxApp.client.jsxreact-helmet migration - Updated to
@dr.pogodin/react-helmet:HelmetProviderwrapper (required for both client and server)contextprop for thread-safe data captureReactHelmet.jsx,ReactHelmetApp.server.jsx,ReactHelmetAppBroken.server.jsx, client entry pointsTest Plan
🤖 Generated with Claude Code
Summary by CodeRabbit
Chores
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.