-
Couldn't load subscription status.
- Fork 380
Update react_on_rails to v16.1.1 #654
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
Conversation
🚀 Quick Review App Commands
Welcome! Here are the commands you can use in this PR:
/deploy-review-app
Deploy your PR branch for testing
/delete-review-app
Remove the review app when done
/help
Show detailed instructions, environment setup, and configuration options.
|
Warning Rate limit exceeded@justin808 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 4 minutes and 30 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (6)
WalkthroughUpgrade React on Rails to 16.1.1 across Ruby and JS dependencies, adjust bin/dev to require dev tools unconditionally, expand Shakapacker configuration (paths, compiler strategies, integrity, test/prod tweaks), add ignore patterns for generated packs, and add clarifying comments to Procfile. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Dev as Developer
participant Bin as bin/dev
participant Bun as Bundler
participant ROR as ReactOnRails Dev
participant Proc as Procfile services
Dev->>Bin: Run bin/dev
Bin->>Bun: require "bundler/setup"
Bun-->>Bin: Load bundler
Bin->>ROR: require "react_on_rails/dev"
ROR-->>Bin: Setup dev environment
Bin->>Proc: Launch foreman/overmind (Procfile)
Proc-->>Dev: App starts with defined services
alt Missing dependency (strict)
Bin-->>Dev: LoadError raised (no fallback)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
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 |
/deploy-review-app
🚀 Enhanced with Development Tools
This PR has been enhanced with development improvements brought over from justin-808-test-update-ror-v15.
✨ New Development Features
- Enhanced
bin/dev: Uses ReactOnRails::Dev tools for better development workflow - New
bin/dev-static: For static asset development without HMR - Multiple Procfiles: Different development modes (HMR, static, prod assets)
- Improved tooling: Better development server management
📂 New Files Added
Procfile.dev-static-assets- For webpack watching without HMRProcfile.dev-prod-assets- For production asset developmentbin/dev-static- Static asset development mode
See the enhanced branch: upgrade-react-on-rails-16-with-dev-improvements
All original React on Rails 16 upgrade functionality is preserved, plus these development workflow improvements.
Superseded by PR #655 which includes the same React on Rails 16 upgrade plus enhanced development tools.
545179a to
1bb4404
Compare
Code Review for PR #654: Update react_on_rails to v16.1.1
I've completed a comprehensive review of this PR. Overall, this is a well-executed update with important improvements. Here's my feedback:
✅ Strengths
- Clean dependency update: The upgrade from react_on_rails v16.0.1.rc.2 to v16.1.1 is straightforward and includes the necessary shakapacker version bump for compatibility
- Improved development workflow: The addition of multiple Procfile options provides excellent flexibility for different development scenarios
- Better webpack configuration: The new
generateWebpackConfigs.jshelper improves modularity and maintainability - Enhanced server bundle management: The new
server_bundle_output_pathandenforce_private_server_bundlesconfigurations improve security by preventing server-side code exposure
🔍 Areas for Attention
-
React Refresh Configuration: The babel and webpack configurations correctly check for
process.env.WEBPACK_SERVEto enable React Refresh only in HMR mode, which prevents issues with static compilation. Good implementation! -
File System Component Registry: The new auto-registration feature with
components_subdirectory: "ror_components"andauto_load_bundle: trueis enabled. Ensure existing components are compatible with this pattern. -
Breaking Changes: The removal of
config.generated_assets_dirworkaround for test environments indicates the v16.1.1 fix is working. The test configuration looks correct with the separatepublic_output_path: packs-test.
⚠️ Potential Issues
-
Large yarn.lock diff: The yarn.lock shows significant changes (4429 additions, 3819 deletions). While mostly Babel package updates, verify all dependencies resolve correctly in production.
-
Server Bundle Path: The change to
ssr-generateddirectory should be verified to ensure deployment scripts and .gitignore patterns are updated accordingly.
🔒 Security Considerations
- ✅ The
enforce_private_server_bundles: truesetting is excellent for production security - ✅ No credentials or sensitive data exposed in the configuration changes
- ✅ Dependencies updated to newer versions with security patches
🧪 Test Coverage
According to the PR description, all tests pass (38 examples, 0 failures). The test configuration updates look appropriate.
📝 Recommendations
- Consider documenting the different Procfile usage patterns in the README
- Verify that CI/CD pipelines handle the new
ssr-generateddirectory correctly - Consider adding a migration guide for users upgrading from older versions
✅ Verdict
This is a solid update that brings important bug fixes and enhanced development experience. The changes are well-structured and follow React on Rails best practices. Approved with the recommendations above.
Great work on keeping the dependencies current and improving the developer experience! 🚀
Code Review for PR #654: Update react_on_rails to v16.1.1
Thank you for this comprehensive update! I've reviewed the changes and here's my feedback:
✅ Strengths
-
Clean Dependency Update: The upgrade from react_on_rails v16.0.1.rc.4 to v16.1.1 is well-executed with proper version alignment between the gem and npm package.
-
Shakapacker Compatibility: Good job updating shakapacker to v8.2.0 to maintain compatibility with the new react_on_rails version.
-
Enhanced Development Experience: The addition of multiple Procfile options (dev, dev-static-assets, dev-prod-assets) provides excellent flexibility for different development scenarios.
-
Proper Generator Updates: Running the react_on_rails:install generator and incorporating all the updates shows thoroughness.
🔍 Observations & Suggestions
-
Configuration Changes: The shakapacker.yml has been significantly updated with many new configuration options. While these provide better control, ensure the team is aware of:
- The source_path change from
client/apptoapp/javascript(though it appears you've kept your custom path) - The new
nested_entries: truesetting which changes how entry points are discovered - The
compiler_strategydefaulting todigestin production
- The source_path change from
-
Development Server Configuration: The dev_server configuration in shakapacker.yml now includes
inline_css: truefor HMR. This is good for development performance but ensure CSS extraction still works properly in production builds. -
Security Enhancement: Good addition to .gitignore for generated React on Rails packs (
**/generated/**andssr-generated), preventing accidental commits of generated files. -
Breaking Changes Check: The bin/dev script has been refactored. While the new implementation is cleaner, ensure all team members are aware of the new command options (
bin/dev static,bin/dev prod).
⚠️ Minor Concerns
-
Source Path Discrepancy: The default shakapacker.yml shows
source_path: app/javascript, but your original configuration usedclient/app. Make sure this is intentionally preserved and working correctly with the new setup. -
Testing: While you mention tests pass (38 examples, 0 failures), consider adding specific tests for the new webpack configuration behavior if not already present.
📋 Recommended Actions
-
Documentation: Consider updating project README to document the new development modes available via the enhanced bin/dev script.
-
Team Communication: Ensure the team is aware of the new development server options and when to use each Procfile variant.
-
Performance Monitoring: After deployment, monitor for any performance regressions or improvements from the v16.1.1 bug fix regarding bundle_js_file_path resolution.
✨ Overall Assessment
This is a well-executed upgrade that brings important bug fixes and development improvements. The changes follow best practices and maintain backward compatibility where it matters. The PR is ready to merge after ensuring the team is aware of the configuration changes.
Great work on the comprehensive testing and following the proper upgrade path! 🎉
🤖 Generated with Claude Code
@coderabbitai
coderabbitai
bot
left a comment
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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
Gemfile.lockis excluded by!**/*.lockyarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (6)
.gitignore(1 hunks)Gemfile(1 hunks)Procfile.dev-prod-assets(1 hunks)bin/dev(2 hunks)config/shakapacker.yml(2 hunks)package.json(1 hunks)
⏰ 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: deploy
- GitHub Check: claude-review
🔇 Additional comments (5)
Gemfile (1)
8-8: Upgrading to 16.1.1 cleanly picks up the manifest fixMatching the gem to the published 16.1.1 release delivers the bundle path bug fix noted in that patch—looks good.
Procfile.dev-prod-assets (1)
1-2: Nice touch documenting the prod-assets modeThese comments make it much clearer when to reach for this Procfile variant. Thanks for the clarity.
package.json (1)
81-81: JS dependency stays in sync with the gemKeeping the npm package at 16.1.1 alongside the Ruby gem avoids mismatched generator behavior—looks solid.
.gitignore (1)
56-58: Good call ignoring generated packsAdding
**/generated/**andssr-generatedlines up with the React on Rails guidance for auto-loaded component packs, so we won’t accidentally commit generated artifacts. As per React on Rails docs.bin/dev (1)
21-22: Early failure path for missing deps is welcomeRequiring Bundler setup and the gem’s dev tooling up front keeps the script honest—missing installations will surface immediately instead of falling back silently. 👍
✅ Deployment complete for PR #654, commit 51f6272
✅ Deployment complete for PR #654, commit 51f6272
Code Review for PR #654: Update react_on_rails to v16.1.1
Thank you for this well-structured update! I've reviewed the changes and here's my feedback:
✅ Strengths
-
Clean Version Update: The upgrade from react_on_rails 16.0.1.rc.4 to 16.1.1 stable is appropriate, moving from a release candidate to a stable version.
-
Dependency Alignment: Good job updating shakapacker to 8.2.0 to maintain compatibility with react_on_rails 16.1.1.
-
Thorough Testing: The test plan in the PR description shows comprehensive validation with all tests passing (38 examples, 0 failures) and RuboCop compliance.
-
Clear Documentation: The PR description is well-documented with a clear summary and detailed changelog.
⚠️ Minor Observations
-
bin/dev Script Simplification: The removal of the fallback mechanism (lines 24-27) in
bin/devmakes the script cleaner but assumes the gem is always installed. This is generally fine but worth noting if anyone tries to run this beforebundle install. -
Typo in Comment: Line 12 in
bin/devhas "Procfile.dev-static-assets-assets" which appears to be a typo (double "assets"). Should likely be "Procfile.dev-static-assets".
🔍 Recommendations
-
Version Pinning: Both react_on_rails and shakapacker are pinned to exact versions, which is good practice for stability.
-
Lockfile Updates: The Gemfile.lock shows many dependency updates beyond just react_on_rails (Rails 8.0.2.1 → 8.0.3, various action* gems). These are patch-level updates and should be safe.
-
Node Dependencies: The yarn.lock changes are substantial (4429 additions, 3819 deletions) but appear to be automated dependency resolution updates from the version changes.
✅ Security & Performance
- No security concerns identified in the dependency updates
- The move to stable versions improves reliability
- No performance regressions expected from these changes
📋 Summary
This is a solid, low-risk update that moves the project to stable versions with proper compatibility updates. The only actionable item is fixing the typo in the comment on line 12 of bin/dev.
Verdict: Approved with minor comment fix suggested ✅
Code Review
Thanks for updating React on Rails to the latest stable version! I've reviewed the changes and here's my feedback:
✅ Strengths
- Clean upgrade path: Upgrading from v16.0.1.rc.4 to v16.1.1 stable release is a good move for production stability
- Dependency consistency: Both gem and npm packages are properly aligned (react_on_rails 16.1.1)
- Test verification: Good to see all 38 tests passing with no failures
- Linting compliance: RuboCop passing with no offenses shows good code quality maintenance
📝 Observations
Code Quality & Best Practices:
- The changes are minimal and focused on version updates, which reduces risk
- Lockfile updates show proper dependency resolution
- The bin/dev script simplification (removing fallback requires) follows fail-fast principles, which is good
Performance Considerations:
- Webpack-related dependency updates (webpack-dev-server, webpack-merge) include performance improvements
- The shakapacker update to 8.2.0 aligns with react_on_rails compatibility requirements
Security:
- No security concerns identified in the dependency updates
- All changes are standard version bumps with no introduction of risky code patterns
- The removal of fallback loading in bin/dev is actually a security improvement (fail-fast on missing deps)
🔍 Minor Suggestions
- The PR description mentions generator improvements and multiple Procfile options - ensure documentation is updated if user-facing behavior changes
- Consider adding a CHANGELOG entry if this repo maintains one, to document the upgrade
✅ Overall Assessment
This is a clean, focused upgrade PR that properly updates React on Rails to the latest stable version. The changes are minimal, well-tested, and pose no significant risks. The alignment of gem and npm package versions is correct, and the testing confirms everything works as expected.
Approved ✅ - Ready to merge once CI passes.
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com
Code Review for PR #654: Update react_on_rails to v16.1.1
Thank you for this PR updating React on Rails to the latest stable version! I've reviewed the changes and here's my feedback:
✅ Strengths
-
Clean dependency update: The upgrade from
16.0.1.rc.4to16.1.1moves from a release candidate to a stable version, which is excellent for production stability. -
Consistent package updates: Both Ruby gem and npm package versions are properly synchronized, maintaining consistency across the stack.
-
Webpack configuration improvement: The addition of the
api: 'modern'option for sass-loader is a good forward-thinking change that uses the modern Sass API.
🔍 Observations & Suggestions
1. Removed error handling in bin/dev (Potential Issue)
The fallback begin/rescue block was removed from bin/dev:
# Old version had fallback handling -begin - require "bundler/setup" - require "react_on_rails/dev" -rescue LoadError - # Fallback for when gem is not yet installed - puts "Loading ReactOnRails development tools..." - require_relative "../../lib/react_on_rails/dev" -end
Concern: This could cause the script to fail if the gem isn't installed yet. Consider whether this fallback mechanism should be preserved for better developer experience during initial setup.
2. Typo fix in comment ✅
Good catch fixing the typo in the Procfile comment:
-# - bin/dev static: Uses Procfile.dev-static-assets-assets +# - bin/dev static: Uses Procfile.dev-static-assets
3. Sass loader configuration (Good practice)
The webpack configuration properly handles both string and object loader configurations when setting the modern API:
if (typeof sassLoader === 'string') { // Convert string to object format } else { // Update existing object }
This defensive coding approach prevents potential configuration errors.
🔒 Security Considerations
- No security vulnerabilities identified in the changes
- Moving from RC to stable version likely includes security fixes
🧪 Test Coverage
According to the PR description, all 38 tests pass successfully, which is reassuring. The existing test suite appears to cover:
- ReScript functionality
- Server-side rendering
- React Router integration
- Component behavior
🎯 Performance Considerations
The modern Sass API usage should provide better compilation performance, especially for larger stylesheets.
📝 Minor Suggestions
-
Consider adding a migration note or CHANGELOG entry about the removal of the fallback mechanism in
bin/devif this is intentional behavior. -
The yarn.lock changes show significant dependency updates. While this is expected with a major version update, ensure all transitive dependencies are compatible in your target environments.
✅ Overall Assessment
This is a well-executed dependency update that brings the project to a stable version of React on Rails. The changes are focused and appropriate. My only concern is the removal of error handling in bin/dev, which might impact developer experience during setup.
Recommendation: ✅ Approve with minor suggestions - Consider addressing the bin/dev error handling before merging.
Great work on keeping the dependencies up to date! 🎉
✅ Deployment complete for PR #654, commit bcac070
- Update react_on_rails gem: 14.2.1 → 16.0.1.rc.2 - Update react-on-rails npm: 14.2.1 → 16.0.1-rc.2 - Update rescript-react-on-rails: 1.0.1 → 1.1.0 (for React on Rails 16 support) - Add test environment configuration to resolve server bundle path issue - Add .prettierignore rule for ReScript generated files - All 38 tests passing ✅ 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Upgrades from v16.0.1.rc.4 to v16.1.1 - Bug fix release with no breaking changes - Fixes react-server-client-manifest.json file path resolution - All tests passing and RuboCop checks pass 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Ran the react_on_rails:install generator to get latest v16.1.1 improvements: - Enhanced bin/dev script with better development server management - Added Procfile variations for different development modes: - Procfile.dev: HMR mode with webpack-dev-server - Procfile.dev-static-assets: Watch mode without HMR - Procfile.dev-prod-assets: Development with production assets - Updated webpack configurations for v16.1.1 compatibility - Updated shakapacker.yml configuration - Updated babel.config.js - Updated react_on_rails initializer - Added generateWebpackConfigs.js helper These updates provide better development experience and align with React on Rails v16.1.1 best practices. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
The improved bin/dev script provides better development server management through ReactOnRails::Dev::ServerManager with support for different modes (HMR, static assets, production assets)
Configure sass-loader to use the modern API to avoid deprecation warnings about the legacy JS API being removed in Dart Sass 2.0.0
Update configuration to properly handle full path loaders and maintain existing sassOptions while adding the modern API flag
e59678a to
ba04c6c
Compare
✅ Deployment complete for PR #654, commit ba04c6c
PR Review: Update react_on_rails to v16.1.1
Thank you for updating React on Rails to the latest stable version! The changes look well-organized and tested. Here's my review:
✅ Strengths
- Clean version upgrade: Appropriate update from 16.0.1.rc.4 to stable 16.1.1
- Comprehensive testing: Good to see successful test runs with 38 passing examples
- Build system improvements: Enhanced webpack configurations with modern sass-loader API
- Developer experience: New Procfile options for different development modes
- Proper compatibility: Shakapacker updated to 8.2.0 to maintain compatibility
🔍 Observations & Suggestions
-
Webpack configuration enhancement: The addition of the modern sass-loader API configuration is good practice. The implementation correctly handles both string and object loader configurations.
-
Simplified bin/dev script: Removing the fallback require logic makes the code cleaner and fails fast if dependencies are missing - a better pattern for debugging.
-
Minor formatting: Some files have trailing blank lines added (clientWebpackConfig.js, commonWebpackConfig.js, development.js) - consider removing these for consistency.
-
Documentation comment typo: Line 12 in bin/dev mentions "Procfile.dev-static-assets" but should be "Procfile.dev-static" (without the duplicate "-assets").
⚠️ Minor Concerns
-
Empty includePaths: The sass-loader configuration sets
includePaths: []- verify this is intentional and won't break existing SCSS imports that rely on include paths. -
Large yarn.lock changes: The 4429 additions and 3819 deletions suggest significant dependency updates. While this is expected with a major version upgrade, ensure all transitive dependencies are still compatible.
📋 Recommendations
- Consider updating the README if there are any new development workflow changes with the enhanced bin/dev script options
- Verify that the new webpack configurations work correctly in all development modes (HMR, static, prod)
- Consider adding a migration note for other developers about the removed fallback require in bin/dev
✔️ Verdict
This is a solid PR that properly updates React on Rails to a stable version. The changes follow good practices and include proper testing. Approved with minor suggestions.
The code quality is good, no security issues detected, and the performance implications are positive with the modern webpack configurations.
🤖 Generated with Claude Code
✅ Review app for PR #654 was successfully deleted
Uh oh!
There was an error while loading. Please reload this page.
Summary
Details
This PR updates React on Rails to the latest stable version 16.1.1 and includes all the improvements from running the install generator.
Package Updates:
Version 16.1.1 Fix:
bundle_js_file_pathfor improved configuration flexibilityGenerator Improvements:
Procfile.dev: HMR mode with webpack-dev-serverProcfile.dev-static-assets: Watch mode without HMRProcfile.dev-prod-assets: Development with production assetsTest plan
🤖 Generated with Claude Code
This change is Reviewable
Summary by CodeRabbit
Chores
Refactor
Documentation
No user-facing changes.