-
-
Notifications
You must be signed in to change notification settings - Fork 638
Update CHANGELOG for PRs #1976 and #1972 #1979
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
Added entries for: - PR #1976: Polished error messages in configuration validation - PR #1972: Fixed component registration race condition with defer loading 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
WalkthroughThis PR addresses a component registration race condition by changing the default component packs loading strategy from Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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 ReviewSummaryThis PR adds CHANGELOG entries for two recent PRs (#1976 and #1972). The changes document a bug fix and an improvement to error messages. ✅ Positive Aspects
📝 Observations
🎯 RecommendationsNo changes required. This PR correctly follows all CHANGELOG conventions:
🚀 ApprovalThis PR is ready to merge. The CHANGELOG entries accurately document the referenced changes and follow all project conventions. Review generated by Claude Code |
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: 0
🧹 Nitpick comments (1)
CHANGELOG.md (1)
38-38: Minor formatting inconsistency in PR references.Lines 38 and 56 use
[PR 1976]and[PR 1972]without the#prefix, while other recent entries in the Unreleased section use[PR #1881],[PR #1852], etc. with the#prefix. Standardize the PR reference formatting for consistency.- - **Polished Error Messages**: Improved configuration error message wording for loading strategy validation. Error messages now show the preferred `:defer` option first, followed by `:sync`. [PR 1976](https://github.com/shakacode/react_on_rails/pull/1976) by [justin808](https://github.com/justin808). + - **Polished Error Messages**: Improved configuration error message wording for loading strategy validation. Error messages now show the preferred `:defer` option first, followed by `:sync`. [PR #1976](https://github.com/shakacode/react_on_rails/pull/1976) by [justin808](https://github.com/justin808). - - **Component Registration Race Condition**: Fixed intermittent component registration errors caused by a race condition with defer script loading. Changed default loading strategy from `:sync` to `:defer` to ensure deterministic script execution order. This ensures component registrations complete before React hydration starts, preventing "Component not registered" errors in CI and production. [PR 1972](https://github.com/shakacode/react_on_rails/pull/1972) by [justin808](https://github.com/justin808). + - **Component Registration Race Condition**: Fixed intermittent component registration errors caused by a race condition with defer script loading. Changed default loading strategy from `:sync` to `:defer` to ensure deterministic script execution order. This ensures component registrations complete before React hydration starts, preventing "Component not registered" errors in CI and production. [PR #1972](https://github.com/shakacode/react_on_rails/pull/1972) by [justin808](https://github.com/justin808).Also applies to: 56-56
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
CHANGELOG.md(2 hunks)
🧰 Additional context used
🧠 Learnings (8)
📚 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:
CHANGELOG.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:
CHANGELOG.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:
CHANGELOG.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:
CHANGELOG.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:
CHANGELOG.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:
CHANGELOG.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:
CHANGELOG.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:
CHANGELOG.md
⏰ 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 (1)
CHANGELOG.md (1)
56-56: Verify default loading strategy change is intentional and sufficiently highlighted.The component registration race condition fix changes the default loading strategy from
:syncto:defer. While this appears to be a necessary fix with clear justification (ensuring deterministic script execution before hydration), consider whether this warrants explicit mention in the "Breaking Changes" section or a migration guide, particularly if users rely on the old:syncdefault behavior in their applications.
Summary
Added changelog entries for two recent user-visible changes:
These entries document improvements to error messaging and a critical bug fix for component registration timing.
🤖 Generated with Claude Code
This change is
Summary by CodeRabbit
Bug Fixes
Documentation