Fix Unify minimum Shakapacker versions #2225#2247
Conversation
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughRemoved explicit Shakapacker minimum-version checks and helper pinning logic, simplified autobundling error messaging, bumped CI/dev Shakapacker pins to 9.5.0, updated docs/CI references to React 19 and "latest" Shakapacker, and removed related tests/constants/helpers. All other flows unchanged. Changes
Sequence Diagram(s)(Skipped — changes remove/simplify version checks and update docs/CI; no new multi-component sequential flow to visualize.) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
fa1a2db to
de16986
Compare
Code Review - PR #2247SummaryThis PR addresses issue #2225 by attempting to unify minimum Shakapacker version references across the codebase. However, there are critical issues that need to be addressed before merging. 🔴 Critical Issues1. Incorrect Version Change in
|
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
.claude/docs/pr-testing-guide.mdREADME.mdSWITCHING_CI_CONFIGS.mdreact_on_rails/rakelib/example_type.rbreact_on_rails/rakelib/run_rspec.rake
💤 Files with no reviewable changes (1)
- react_on_rails/rakelib/run_rspec.rake
🚧 Files skipped from review as they are similar to previous changes (1)
- README.md
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rb
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.rb: Runbundle exec rubocopand fix ALL violations before every commit/push
Runbundle exec rubocop(MANDATORY) before every commit to ensure zero offenses
Files:
react_on_rails/rakelib/example_type.rb
🧠 Learnings (13)
📓 Common learnings
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /{CHANGELOG.md,CHANGELOG_PRO.md} : Use format `[PR 1818](https://github.com/shakacode/react_on_rails/pull/1818) by [username](https://github.com/username)` in changelog entries (no hash in PR number)
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /CHANGELOG.md : Update `/CHANGELOG.md` for user-visible changes in the open-source react_on_rails gem and npm package (features, bug fixes, breaking changes, deprecations, performance improvements)
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /CHANGELOG_PRO.md : Update `/CHANGELOG_PRO.md` for user-visible changes in the Pro-only react_on_rails_pro gem and npm packages
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Shakapacker configuration should be tested by creating debug scripts in dummy app root (debug-webpack-rules.js, debug-webpack-with-config.js) to inspect webpack rules before committing configuration changes
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to **/config/webpack/**/*.js : Use `namedExport: false` and `exportLocalsConvention: 'camelCase'` for CSS Modules loader options in Shakapacker 9.0+ if existing code uses `import styles from './file.module.css'` pattern
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1644
File: lib/react_on_rails/helper.rb:190-197
Timestamp: 2025-02-18T13:08:01.477Z
Learning: RSC support validation in React on Rails Pro is handled through a chain of validations:
1. Pro version check in `run_stream_inside_fiber`
2. RSC support check during pack generation via `ReactOnRailsPro.configuration.enable_rsc_support`
3. RSC support validation during component registration
This makes additional validation in the helper methods unnecessary.
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to sig/react_on_rails/**/*.rbs : RBS signatures in `sig/react_on_rails/` should be added for new Ruby files in `lib/react_on_rails/`, included in Steepfile, validated with `bundle exec rake rbs:validate`, and type-checked with `bundle exec rake rbs:steep`
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /CHANGELOG_PRO.md : Update `/CHANGELOG_PRO.md` for user-visible changes in the Pro-only react_on_rails_pro gem and npm packages
Applied to files:
react_on_rails/rakelib/example_type.rbSWITCHING_CI_CONFIGS.md
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /CHANGELOG.md : Update `/CHANGELOG.md` for user-visible changes in the open-source react_on_rails gem and npm package (features, bug fixes, breaking changes, deprecations, performance improvements)
Applied to files:
react_on_rails/rakelib/example_type.rbSWITCHING_CI_CONFIGS.md
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Shakapacker configuration should be tested by creating debug scripts in dummy app root (debug-webpack-rules.js, debug-webpack-with-config.js) to inspect webpack rules before committing configuration changes
Applied to files:
.claude/docs/pr-testing-guide.mdSWITCHING_CI_CONFIGS.md
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to **/config/webpack/**/*.js : Use `namedExport: false` and `exportLocalsConvention: 'camelCase'` for CSS Modules loader options in Shakapacker 9.0+ if existing code uses `import styles from './file.module.css'` pattern
Applied to files:
.claude/docs/pr-testing-guide.mdSWITCHING_CI_CONFIGS.md
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to {package.json,webpack.config.js,packages/*/package.json,react_on_rails_pro/package.json} : When resolving merge conflicts in build configuration files, verify file paths are correct by running `grep -r 'old/path' .` and test affected scripts like `pnpm run prepack` before continuing the merge
Applied to files:
.claude/docs/pr-testing-guide.mdSWITCHING_CI_CONFIGS.md
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to react_on_rails/spec/dummy/e2e/playwright/e2e/**/*.spec.js : Use Playwright E2E tests in `react_on_rails/spec/dummy/e2e/playwright/` for React component integration testing. Tests automatically start Rails server on port 5017 before running
Applied to files:
.claude/docs/pr-testing-guide.md
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to react_on_rails/spec/dummy/e2e/playwright/e2e/**/*.spec.js : Use `app('clean')`, `appEval(code)`, `appFactories(options)`, and `appScenario(name)` helpers from cypress-on-rails in Playwright tests for Rails integration
Applied to files:
.claude/docs/pr-testing-guide.md
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: For infrastructure/config changes, perform comprehensive local testing including: finding all affected files with grep, testing build pipeline, running relevant specs, and linting everything before pushing
Applied to files:
.claude/docs/pr-testing-guide.md
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Git pre-commit hooks automatically run RuboCop (auto-fix), ESLint (auto-fix), Prettier (auto-format), and trailing newline checks on all changed files before each commit
Applied to files:
SWITCHING_CI_CONFIGS.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:
SWITCHING_CI_CONFIGS.md
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Install Playwright browsers with `cd react_on_rails/spec/dummy && pnpm playwright install --with-deps` before running E2E tests
Applied to files:
SWITCHING_CI_CONFIGS.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:
SWITCHING_CI_CONFIGS.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). (9)
- GitHub Check: dummy-app-integration-tests (3.4, 22, latest)
- GitHub Check: rspec-package-tests (3.4, latest)
- GitHub Check: examples (3.4, latest)
- GitHub Check: build-dummy-app-webpack-test-bundles
- GitHub Check: pro-lint-js-and-ruby
- GitHub Check: build
- GitHub Check: build-dummy-app-webpack-test-bundles
- GitHub Check: claude-review
- GitHub Check: markdown-link-check
🔇 Additional comments (3)
SWITCHING_CI_CONFIGS.md (2)
26-26: Version update looks good, but verify consistency with example_type.rb.The Shakapacker version bump from 9.3.0 to 9.4.0 is appropriate for the latest configuration.
However, note that line 35 still shows the minimum configuration uses Shakapacker 8.2.0, while
react_on_rails/rakelib/example_type.rbwas changed to use 6.5.1. Ensure these values are intentionally different or update them to match.
127-127: Downgrade path updated consistently.The downgrade path correctly reflects the new latest version (9.4.0 → 8.2.0).
.claude/docs/pr-testing-guide.md (1)
568-568: Version update is consistent with other documentation.The Shakapacker version bump to 9.4.0 aligns with the changes in
SWITCHING_CI_CONFIGS.md.
|
|
||
| # Minimum Shakapacker version for compatibility testing | ||
| MINIMUM_SHAKAPACKER_VERSION = "8.2.0" | ||
| MINIMUM_SHAKAPACKER_VERSION = "6.5.1" |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# First, let's check the exact content of the file mentioned
cat -n react_on_rails/rakelib/example_type.rb | head -40Repository: shakacode/react_on_rails
Length of output: 1635
🏁 Script executed:
# Check if SWITCHING_CI_CONFIGS.md exists and look at line 35
if [ -f "SWITCHING_CI_CONFIGS.md" ]; then
sed -n '30,40p' SWITCHING_CI_CONFIGS.md
else
echo "File not found. Searching for similar files..."
fd -i "switching" -t f
fiRepository: shakacode/react_on_rails
Length of output: 304
🏁 Script executed:
# Search for references to both versions in the codebase
rg -n "8\.2\.0|6\.5\.1" -C 2Repository: shakacode/react_on_rails
Length of output: 37084
🏁 Script executed:
# Search specifically for MINIMUM_SHAKAPACKER_VERSION references
rg -n "MINIMUM_SHAKAPACKER_VERSION" -C 2Repository: shakacode/react_on_rails
Length of output: 11117
🌐 Web query:
Shakapacker 6.5.1 npm package version release
💡 Result:
Shakapacker version 6.5.1 is published on npm (package page for v6.5.1). [1]
The Shakapacker GitHub repository notes a v6-stable branch for v6.x documentation/code. [2]
Sources:
[1] npm package page — shakapacker v6.5.1.
[2] GitHub — shakacode/shakapacker (v6-stable reference).
Clarify the minimum Shakapacker version for CI testing.
The code claims to support Shakapacker 6.5.1 for basic pack generation (as defined in MINIMUM_SHAKAPACKER_VERSION across multiple files and documented in docs/configuration/configuration.md), but the CI configuration in SWITCHING_CI_CONFIGS.md tests only with Shakapacker 8.2.0. This creates an untested compatibility gap.
Shakapacker 6.5.1 exists and is the documented minimum for basic pack generation, while 8.2.0 is the minimum for async loading support (an advanced feature). Decide:
- If basic pack generation with 6.5.1 should be tested: update the CI minimum config to test with 6.5.1
- If 8.2.0 is the practical minimum: update the code constant to reflect this and document the breaking change
🤖 Prompt for AI Agents
In react_on_rails/rakelib/example_type.rb around line 31,
MINIMUM_SHAKAPACKER_VERSION ("6.5.1") conflicts with CI which only tests
Shakapacker 8.2.0; choose one of two fixes: (A) if we intend to
guarantee/support basic pack generation on 6.5.1, update the CI matrix in
SWITCHING_CI_CONFIGS.md and CI workflow to include tests against 6.5.1 (and
add/update any test fixtures) and leave the constant and docs as-is; or (B) if
8.2.0 is the practical minimum, bump MINIMUM_SHAKAPACKER_VERSION in this file
(and any other files where it appears), update docs
(docs/configuration/configuration.md and SWITCHING_CI_CONFIGS.md) and the
changelog to state 8.2.0 as the breaking minimum, and ensure CI continues
testing 8.2.0; implement the chosen option consistently across code, docs, and
CI.
|
/run-skipped-tests |
|
🚀 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. |
Code Review for PR #2247Critical Issues Found1. BLOCKER: Debug Code Left in Production In react_on_rails/rakelib/shakapacker_examples.rake lines 64-67, there are debug puts statements with ZZZZZ that must be removed before merging. 2. HIGH: Incomplete Version Update The file bin/ci-switch-config still references 9.3.0 in 3 places. These need to be updated to 9.4.0 to match your documentation changes. 3. MEDIUM: Issue 2225 Not Fully Addressed The core discrepancy between README (6.0) and packs_generator.rb (6.5.1 enforced) still exists. Consider updating README to reflect the actual enforced minimum version of 6.5.1. Positive Changes
Required Actions
TestingRun these to verify:
|
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
react_on_rails/rakelib/shakapacker_examples.rake (1)
111-112: Update or remove stale comment.This comment mentions "Gemfile was updated with pinned shakapacker version," but according to the PR changes, the logic to update Gemfile with Shakapacker pins (
update_gemfile_versionsmethod) was removed. Thebundle_install_incall may still be needed due to other Gemfile changes (like rspec-rails from the dev_tests generator at line 106), but the comment is now misleading.🔎 Proposed fix
- # Re-run bundle install since Gemfile was updated with pinned shakapacker version - bundle_install_in(example_type.dir) + # Re-run bundle install to ensure all gem dependencies are resolved + bundle_install_in(example_type.dir)
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.github/workflows/examples.ymlreact_on_rails/rakelib/example_type.rbreact_on_rails/rakelib/run_rspec.rakereact_on_rails/rakelib/shakapacker_examples.rake
💤 Files with no reviewable changes (1)
- react_on_rails/rakelib/example_type.rb
🚧 Files skipped from review as they are similar to previous changes (1)
- react_on_rails/rakelib/run_rspec.rake
🧰 Additional context used
🧠 Learnings (14)
📓 Common learnings
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /{CHANGELOG.md,CHANGELOG_PRO.md} : Use format `[PR 1818](https://github.com/shakacode/react_on_rails/pull/1818) by [username](https://github.com/username)` in changelog entries (no hash in PR number)
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /CHANGELOG.md : Update `/CHANGELOG.md` for user-visible changes in the open-source react_on_rails gem and npm package (features, bug fixes, breaking changes, deprecations, performance improvements)
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /CHANGELOG_PRO.md : Update `/CHANGELOG_PRO.md` for user-visible changes in the Pro-only react_on_rails_pro gem and npm packages
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Shakapacker configuration should be tested by creating debug scripts in dummy app root (debug-webpack-rules.js, debug-webpack-with-config.js) to inspect webpack rules before committing configuration changes
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to **/config/webpack/**/*.js : Use `namedExport: false` and `exportLocalsConvention: 'camelCase'` for CSS Modules loader options in Shakapacker 9.0+ if existing code uses `import styles from './file.module.css'` pattern
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to {package.json,webpack.config.js,packages/*/package.json,react_on_rails_pro/package.json} : When resolving merge conflicts in build configuration files, verify file paths are correct by running `grep -r 'old/path' .` and test affected scripts like `pnpm run prepack` before continuing the merge
Applied to files:
.github/workflows/examples.ymlreact_on_rails/rakelib/shakapacker_examples.rake
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /CHANGELOG_PRO.md : Update `/CHANGELOG_PRO.md` for user-visible changes in the Pro-only react_on_rails_pro gem and npm packages
Applied to files:
react_on_rails/rakelib/shakapacker_examples.rake
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /CHANGELOG.md : Update `/CHANGELOG.md` for user-visible changes in the open-source react_on_rails gem and npm package (features, bug fixes, breaking changes, deprecations, performance improvements)
Applied to files:
react_on_rails/rakelib/shakapacker_examples.rake
📚 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/rakelib/shakapacker_examples.rake
📚 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/rakelib/shakapacker_examples.rake
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Shakapacker configuration should be tested by creating debug scripts in dummy app root (debug-webpack-rules.js, debug-webpack-with-config.js) to inspect webpack rules before committing configuration changes
Applied to files:
react_on_rails/rakelib/shakapacker_examples.rake
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to sig/react_on_rails/**/*.rbs : RBS signatures in `sig/react_on_rails/` should be added for new Ruby files in `lib/react_on_rails/`, included in Steepfile, validated with `bundle exec rake rbs:validate`, and type-checked with `bundle exec rake rbs:steep`
Applied to files:
react_on_rails/rakelib/shakapacker_examples.rake
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: In IDE configuration, exclude these directories to prevent slowdowns: /coverage, /tmp, /gen-examples, /packages/react-on-rails/lib, /node_modules, /react_on_rails/spec/dummy/node_modules, /react_on_rails/spec/dummy/tmp, /react_on_rails/spec/dummy/app/assets/webpack, /react_on_rails/spec/dummy/log, /react_on_rails/spec/dummy/e2e/playwright-report, /react_on_rails/spec/dummy/test-results
Applied to files:
react_on_rails/rakelib/shakapacker_examples.rake
📚 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/rakelib/shakapacker_examples.rake
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to lib/react_on_rails/engine.rb : In Rails Engine code, DO NOT use `rake_tasks` block to explicitly load rake files from `lib/tasks/` - Rails::Engine automatically loads them. Only use `rake_tasks` block if tasks are in non-standard location, need programmatic generation, or need to pass context
Applied to files:
react_on_rails/rakelib/shakapacker_examples.rake
📚 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/rakelib/shakapacker_examples.rake
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to react_on_rails/spec/dummy/e2e/playwright/app_commands/**/*.rb : Create custom Rails app commands in `e2e/playwright/app_commands/` directory with .rb files for reusable helpers in Playwright tests
Applied to files:
react_on_rails/rakelib/shakapacker_examples.rake
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to react_on_rails/spec/dummy/e2e/playwright/e2e/**/*.spec.js : Use Playwright E2E tests in `react_on_rails/spec/dummy/e2e/playwright/` for React component integration testing. Tests automatically start Rails server on port 5017 before running
Applied to files:
react_on_rails/rakelib/shakapacker_examples.rake
⏰ 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). (17)
- GitHub Check: examples (3.2, minimum)
- GitHub Check: examples (3.4, latest)
- GitHub Check: rspec-package-tests (3.4, latest)
- 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-dummy-app-webpack-test-bundles
- GitHub Check: dummy-app-integration-tests (3.4, 22, latest)
- GitHub Check: pro-lint-js-and-ruby
- GitHub Check: build-dummy-app-webpack-test-bundles
- GitHub Check: rspec-gem-specs (3.3.7)
- GitHub Check: rspec-package-tests (3.4, latest)
- GitHub Check: examples (3.4, latest)
- GitHub Check: build
- GitHub Check: build-dummy-app-webpack-test-bundles
- GitHub Check: build-dummy-app-webpack-test-bundles
- GitHub Check: pro-lint-js-and-ruby
- GitHub Check: claude-review
🔇 Additional comments (1)
.github/workflows/examples.yml (1)
198-198: LGTM! Job name updated to remove hardcoded version reference.The removal of the explicit Shakapacker version from the job name aligns with the PR objective to unify minimum version handling and remove hardcoded version pins. The actual versions tested are now determined by the dependency configuration and rake tasks, which centralizes version management.
PR Review: Fix Unify minimum Shakapacker versions #2225Thank you for working on this cleanup! This PR addresses the inconsistency in minimum Shakapacker version declarations. Here's my detailed review: ✅ Positive Changes
🚨 CRITICAL ISSUES1. Debug Code Left in ProductionLocation: There are debug print statements with ZZZZZ pattern that must be removed before merging. This appears to be debugging code that was accidentally left in. 2. Potential Method ErrorLocation: Line 66 uses This looks suspicious -
|
Pull Request ReviewSummaryThis PR addresses issue #2225 by removing the pinning of minimum Shakapacker versions in example generation. The changes primarily clean up version-specific references and testing infrastructure. Strengths
Issues and Concerns1. Incomplete Resolution of Issue #2225The original issue identified three different minimum Shakapacker versions being stated:
This PR only addresses the third item (example testing). The first two remain inconsistent:
According to issue #2225, these should be unified to 6.5.1 since check_minimum_shakapacker_version explicitly fails with versions older than that. Recommendation: Update README.md Prerequisites section to: Shakapacker >= 6.5.1 2. Missing CHANGELOG EntryPer CLAUDE.md guidelines, this is a user-visible change that affects how examples are generated and the testing/validation behavior for minimum Shakapacker versions. Recommendation: Add to CHANGELOG.md under the Fixed section 3. PR Description Not UpdatedThe PR body still contains the template text and unchecked items. Recommendation: Update the PR description with what was changed, why, and reference to issue #2225 4. Debug Code RemovalGood catch removing the debug echo statements in commit 48ee384. However, one debug line remains in .github/workflows/examples.yml:76 Recommendation: Remove this debug line as well for consistency. Testing ConcernsThe PR removes significant logic but does not appear to add tests to verify:
Recommendation: Run the example generation tests locally Action Items Before Merge
Overall AssessmentStatus: Needs Work - Good progress but incomplete This PR makes good progress on cleaning up version pinning, but only partially addresses issue #2225. It needs CHANGELOG entry, proper PR description, and removal of leftover debug code. Recommendation: Address the action items above before merging. This is solid cleanup work that just needs the finishing touches to be complete and properly documented. |
Code Review - PR #2247SummaryThis PR simplifies the Shakapacker version testing strategy by removing the minimum version pinning logic from example generation. The changes align with the goal stated in issue #2225 to unify minimum Shakapacker version requirements. ✅ Positive Aspects
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/examples.yml (1)
199-199: Consider clarifying what's pinned in the task name.The task name now correctly removes the Shakapacker version reference, aligning with the removal of Shakapacker pinning logic. However, "Pinned version examples" could be more explicit about what's pinned.
Optional clarification
- - name: "Main CI - Pinned version examples (React 16, 17, 18)" + - name: "Main CI - Pinned React version examples (React 16, 17, 18)"This makes it immediately clear that React versions (not Shakapacker) are pinned.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/examples.yml
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /{CHANGELOG.md,CHANGELOG_PRO.md} : Use format `[PR 1818](https://github.com/shakacode/react_on_rails/pull/1818) by [username](https://github.com/username)` in changelog entries (no hash in PR number)
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /CHANGELOG.md : Update `/CHANGELOG.md` for user-visible changes in the open-source react_on_rails gem and npm package (features, bug fixes, breaking changes, deprecations, performance improvements)
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /CHANGELOG_PRO.md : Update `/CHANGELOG_PRO.md` for user-visible changes in the Pro-only react_on_rails_pro gem and npm packages
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Shakapacker configuration should be tested by creating debug scripts in dummy app root (debug-webpack-rules.js, debug-webpack-with-config.js) to inspect webpack rules before committing configuration changes
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to sig/react_on_rails/**/*.rbs : RBS signatures in `sig/react_on_rails/` should be added for new Ruby files in `lib/react_on_rails/`, included in Steepfile, validated with `bundle exec rake rbs:validate`, and type-checked with `bundle exec rake rbs:steep`
Learnt from: alexeyr-ci2
Repo: shakacode/react_on_rails PR: 1732
File: spec/dummy/client/app-react16/startup/ReduxSharedStoreApp.client.jsx:40-44
Timestamp: 2025-04-26T21:55:55.874Z
Learning: In the react_on_rails project, files under `app-react16` directories are copied/moved to corresponding `/app` directories during the conversion process (removing the `-react16` suffix), which affects their relative import paths at runtime.
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to **/config/webpack/**/*.js : Use `namedExport: false` and `exportLocalsConvention: 'camelCase'` for CSS Modules loader options in Shakapacker 9.0+ if existing code uses `import styles from './file.module.css'` pattern
⏰ 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: build-dummy-app-webpack-test-bundles (3.2, 20, minimum)
- GitHub Check: rspec-package-tests (3.2, minimum)
- GitHub Check: rspec-package-tests (3.4, latest)
- GitHub Check: examples (3.4, latest)
- GitHub Check: examples (3.2, minimum)
- GitHub Check: build
- GitHub Check: pro-lint-js-and-ruby
- GitHub Check: build-dummy-app-webpack-test-bundles
- GitHub Check: build-dummy-app-webpack-test-bundles
- GitHub Check: claude-review
🔇 Additional comments (1)
.github/workflows/examples.yml (1)
77-80: LGTM! Full-CI label support correctly implemented.The condition now properly includes the
has_full_ci_labelcheck alongside existing triggers (master, workflow_dispatch, force_run), allowing the full matrix to run when the label is present.
Code Review for PR #2247SummaryThis PR addresses issue #2225 by removing legacy Shakapacker version pinning logic and updating documentation to reflect current supported versions (6.5.1+ for basic features, 7.0.0+ for autobundling). ✅ Positive Changes
🐛 Critical Issues1. Incomplete Method RemovalThe PR removes
Impact: This will cause:
Fix Required: # Remove from sig/react_on_rails/packer_utils.rbs:4
- def self.supports_basic_pack_generation?: () -> bool
# Remove test block from spec/react_on_rails/packer_utils_spec.rb:94-108
- describe ".supports_basic_pack_generation?" do
- # entire test block
- end2. Orphaned Error Message Method
Fix Required: Remove this method and its RBS signature (sig/react_on_rails/packer_utils.rbs:12).
|
Code Review - PR #2247Thank you for working on unifying the minimum Shakapacker versions! This is a good cleanup that addresses issue #2225. Here's my feedback: ✅ Strengths
|
Code Review - PR #2247: Fix Unify minimum Shakapacker versions #2225SummaryThis PR addresses issue #2225 by removing minimum Shakapacker version pinning (8.2.0) from example generation and test infrastructure. The changes simplify version handling by removing the ✅ Strengths
|
Code ReviewThank you for addressing issue #2225 to unify the minimum Shakapacker versions! This is a good cleanup that removes confusing version requirements. However, I've identified a critical bug that will cause test failures. 🚨 Critical Issue - Test FailureLocation: The test it "ensures version requirements are logically consistent" do
auto_reg_version = Gem::Version.new(
ReactOnRails::PacksGenerator::MINIMUM_SHAKAPACKER_VERSION_FOR_AUTO_BUNDLING
)
expect(auto_reg_version).to be >= basic_version, # ❌ basic_version is undefined
"Auto-registration version should be >= basic pack generation version"
endRoot cause: The diff removed the definition of Fix: This entire test should be removed since it was validating that ✅ Positive Aspects
📋 Recommendations1. Fix the broken test (Required)Remove the broken test entirely since it validates a relationship that no longer exists: # DELETE this test:
it "ensures version requirements are logically consistent" do
auto_reg_version = Gem::Version.new(
ReactOnRails::PacksGenerator::MINIMUM_SHAKAPACKER_VERSION_FOR_AUTO_BUNDLING
)
expect(auto_reg_version).to be >= basic_version,
"Auto-registration version should be >= basic pack generation version"
end2. Remove the unused constant (Recommended)Since - MINIMUM_SHAKAPACKER_VERSION = "6.5.1"
# Auto-registration requires nested_entries support which was added in 7.0.0
MINIMUM_SHAKAPACKER_VERSION_FOR_AUTO_BUNDLING = "7.0.0"3. Update README Prerequisites (Optional but recommended)The README currently states - Shakapacker >= 7.0 (Webpacker is no longer supported as of v16)4. Verify local testingAccording to CLAUDE.md, before pushing you should:
🔍 Security & Performance
Test Coverage
SummaryThis is a valuable cleanup that addresses the version inconsistency issue. However, it cannot be merged as-is due to the broken test. Please apply recommendation #1 (remove the broken test), and strongly consider #2 (remove the unused constant). Once fixed, this will be ready to merge. The PR title mentions "Fix" but the body is still using the template - please update the PR description to explain what this PR does and why it's needed per the checklist. |
Code Review - PR #2247: Unify minimum Shakapacker versionsSummaryThis PR addresses issue #2225 by removing inconsistent minimum Shakapacker version checks and simplifying version handling. The changes eliminate the obsolete ✅ Positive Aspects
|
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
react_on_rails/lib/react_on_rails/packer_utils.rb (1)
146-154: Breaking change not documented in CHANGELOG.md.The removal of public methods
supports_basic_pack_generation?andraise_shakapacker_version_incompatible_for_basic_pack_generationis a breaking change that must be documented in the Unreleased section of CHANGELOG.md. The current Unreleased section contains only CVE security fixes and lacks an entry for this PR.Additionally:
- ✓ Removed methods are confirmed not referenced elsewhere in the codebase.
- ✓ RBS signature in
sig/react_on_rails/packer_utils.rbsis properly updated withraise_shakapacker_version_incompatible_for_autobundlingand correctly excludes removed method signatures.- ⚠ Rubocop verification cannot be completed in this environment but is mandatory per coding guidelines.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
react_on_rails/lib/react_on_rails/packer_utils.rbreact_on_rails/sig/react_on_rails/packer_utils.rbsreact_on_rails/spec/react_on_rails/packer_utils_spec.rb
💤 Files with no reviewable changes (2)
- react_on_rails/spec/react_on_rails/packer_utils_spec.rb
- react_on_rails/sig/react_on_rails/packer_utils.rbs
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rb
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.rb: Runbundle exec rubocopand fix ALL violations before every commit/push
Runbundle exec rubocop(MANDATORY) before every commit to ensure zero offenses
Files:
react_on_rails/lib/react_on_rails/packer_utils.rb
🧠 Learnings (8)
📓 Common learnings
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /{CHANGELOG.md,CHANGELOG_PRO.md} : Use format `[PR 1818](https://github.com/shakacode/react_on_rails/pull/1818) by [username](https://github.com/username)` in changelog entries (no hash in PR number)
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /CHANGELOG.md : Update `/CHANGELOG.md` for user-visible changes in the open-source react_on_rails gem and npm package (features, bug fixes, breaking changes, deprecations, performance improvements)
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /CHANGELOG_PRO.md : Update `/CHANGELOG_PRO.md` for user-visible changes in the Pro-only react_on_rails_pro gem and npm packages
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Shakapacker configuration should be tested by creating debug scripts in dummy app root (debug-webpack-rules.js, debug-webpack-with-config.js) to inspect webpack rules before committing configuration changes
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /CHANGELOG_PRO.md : Update `/CHANGELOG_PRO.md` for user-visible changes in the Pro-only react_on_rails_pro gem and npm packages
Applied to files:
react_on_rails/lib/react_on_rails/packer_utils.rb
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /CHANGELOG.md : Update `/CHANGELOG.md` for user-visible changes in the open-source react_on_rails gem and npm package (features, bug fixes, breaking changes, deprecations, performance improvements)
Applied to files:
react_on_rails/lib/react_on_rails/packer_utils.rb
📚 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/lib/react_on_rails/packer_utils.rb
📚 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/lib/react_on_rails/packer_utils.rb
📚 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/lib/react_on_rails/packer_utils.rb
📚 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/lib/react_on_rails/packer_utils.rb
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to sig/react_on_rails/**/*.rbs : RBS signatures in `sig/react_on_rails/` should be added for new Ruby files in `lib/react_on_rails/`, included in Steepfile, validated with `bundle exec rake rbs:validate`, and type-checked with `bundle exec rake rbs:steep`
Applied to files:
react_on_rails/lib/react_on_rails/packer_utils.rb
⏰ 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)
- GitHub Check: dummy-app-integration-tests (3.2, 20, minimum)
- GitHub Check: dummy-app-integration-tests (3.4, 22, latest)
- GitHub Check: pro-lint-js-and-ruby
- GitHub Check: examples (3.2, minimum)
- GitHub Check: examples (3.4, latest)
- GitHub Check: rspec-package-tests (3.4, latest)
- GitHub Check: rspec-package-tests (3.2, minimum)
- GitHub Check: build-dummy-app-webpack-test-bundles
- GitHub Check: build-dummy-app-webpack-test-bundles
- GitHub Check: build
- GitHub Check: claude-review
6914808 to
71bc8d7
Compare
PR Review: Unify minimum Shakapacker versions (#2225)SummaryThis PR successfully addresses issue #2225 by simplifying Shakapacker version handling, removing obsolete minimum version checks for Shakapacker 6.5.1, and updating documentation to reflect current versions (React 19, Shakapacker 9.4.0). ✅ Strengths
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @react_on_rails/rakelib/shakapacker_examples.rake:
- Around line 88-92: Determine whether React on Rails now injects Shakapacker;
if it does, delete the entire commented block (the TODO and the sh_in_dir(...)
stub referencing example_type.gemfile and the commented "gem 'shakapacker',
'9.4.0'") to remove dead code; if it does not, uncomment and pin the gem line by
replacing the commented sh_in_dir call with a live call that appends "gem
'shakapacker', '9.4.0'" (using the existing sh_in_dir and example_type.gemfile
symbols) and remove the TODO comment so the intent is explicit.
🧹 Nitpick comments (2)
react_on_rails/rakelib/shakapacker_examples.rake (2)
62-68: Update stale comment.The comment on line 62 states "Updates package.json and Gemfile" but the method now only updates
package.json. The Gemfile update logic was removed as part of this PR.📝 Suggested fix
- # Updates package.json and Gemfile to use specific React version for compatibility testing + # Updates package.json to use specific React version for compatibility testing def apply_react_version(dir, react_version)
109-112: Stale comment and potentially unnecessary bundle install.The comment on lines 111-112 states "Re-run bundle install since Gemfile was updated with pinned shakapacker version", but since the Gemfile update logic for Shakapacker was removed (line 92 is commented out), this
bundle_install_incall may no longer be necessary.📝 Suggested fix
If no Gemfile modifications occur in
apply_react_version, consider removing the redundant bundle install:if example_type.pinned_react_version? apply_react_version(example_type.dir, example_type.react_version_string) - # Re-run bundle install since Gemfile was updated with pinned shakapacker version - bundle_install_in(example_type.dir) # Run npm install BEFORE shakapacker:binstubs to ensure the npm shakapacker versionHowever, if the Shakapacker gem line (line 92) is intended to be uncommented, keep this but update the comment accordingly.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (12)
.claude/docs/pr-testing-guide.md.github/workflows/examples.ymlREADME.mdSWITCHING_CI_CONFIGS.mdreact_on_rails/lib/react_on_rails/configuration.rbreact_on_rails/lib/react_on_rails/packer_utils.rbreact_on_rails/rakelib/example_type.rbreact_on_rails/rakelib/run_rspec.rakereact_on_rails/rakelib/shakapacker_examples.rakereact_on_rails/sig/react_on_rails/configuration.rbsreact_on_rails/sig/react_on_rails/packer_utils.rbsreact_on_rails/spec/react_on_rails/packer_utils_spec.rb
💤 Files with no reviewable changes (5)
- react_on_rails/sig/react_on_rails/configuration.rbs
- react_on_rails/spec/react_on_rails/packer_utils_spec.rb
- react_on_rails/lib/react_on_rails/configuration.rb
- react_on_rails/rakelib/example_type.rb
- react_on_rails/sig/react_on_rails/packer_utils.rbs
🚧 Files skipped from review as they are similar to previous changes (3)
- react_on_rails/rakelib/run_rspec.rake
- .github/workflows/examples.yml
- .claude/docs/pr-testing-guide.md
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rb
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.rb: Runbundle exec rubocopand fix ALL violations before every commit/push
Runbundle exec rubocop(MANDATORY) before every commit to ensure zero offenses
Files:
react_on_rails/lib/react_on_rails/packer_utils.rb
🧠 Learnings (28)
📓 Common learnings
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /CHANGELOG.md : Update `/CHANGELOG.md` for user-visible changes in the open-source react_on_rails gem and npm package (features, bug fixes, breaking changes, deprecations, performance improvements)
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /CHANGELOG_PRO.md : Update `/CHANGELOG_PRO.md` for user-visible changes in the Pro-only react_on_rails_pro gem and npm packages
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Shakapacker configuration should be tested by creating debug scripts in dummy app root (debug-webpack-rules.js, debug-webpack-with-config.js) to inspect webpack rules before committing configuration changes
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /{CHANGELOG.md,CHANGELOG_PRO.md} : Use format `[PR 1818](https://github.com/shakacode/react_on_rails/pull/1818) by [username](https://github.com/username)` in changelog entries (no hash in PR number)
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /CHANGELOG_PRO.md : Update `/CHANGELOG_PRO.md` for user-visible changes in the Pro-only react_on_rails_pro gem and npm packages
Applied to files:
README.mdreact_on_rails/lib/react_on_rails/packer_utils.rbreact_on_rails/rakelib/shakapacker_examples.rakeSWITCHING_CI_CONFIGS.md
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /CHANGELOG.md : Update `/CHANGELOG.md` for user-visible changes in the open-source react_on_rails gem and npm package (features, bug fixes, breaking changes, deprecations, performance improvements)
Applied to files:
README.mdreact_on_rails/lib/react_on_rails/packer_utils.rbreact_on_rails/rakelib/shakapacker_examples.rakeSWITCHING_CI_CONFIGS.md
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to /{CHANGELOG.md,CHANGELOG_PRO.md} : Use format `[PR 1818](https://github.com/shakacode/react_on_rails/pull/1818) by [username](https://github.com/username)` in changelog entries (no hash in PR number)
Applied to files:
README.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:
README.mdreact_on_rails/lib/react_on_rails/packer_utils.rbreact_on_rails/rakelib/shakapacker_examples.rakeSWITCHING_CI_CONFIGS.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:
README.mdreact_on_rails/rakelib/shakapacker_examples.rake
📚 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:
README.mdreact_on_rails/lib/react_on_rails/packer_utils.rbreact_on_rails/rakelib/shakapacker_examples.rake
📚 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:
README.mdreact_on_rails/lib/react_on_rails/packer_utils.rb
📚 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:
README.md
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to react_on_rails/spec/dummy/e2e/playwright/e2e/**/*.spec.js : Use Playwright E2E tests in `react_on_rails/spec/dummy/e2e/playwright/` for React component integration testing. Tests automatically start Rails server on port 5017 before running
Applied to files:
README.mdreact_on_rails/rakelib/shakapacker_examples.rake
📚 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:
README.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:
README.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/lib/react_on_rails/packer_utils.rb
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to sig/react_on_rails/**/*.rbs : RBS signatures in `sig/react_on_rails/` should be added for new Ruby files in `lib/react_on_rails/`, included in Steepfile, validated with `bundle exec rake rbs:validate`, and type-checked with `bundle exec rake rbs:steep`
Applied to files:
react_on_rails/lib/react_on_rails/packer_utils.rbreact_on_rails/rakelib/shakapacker_examples.rake
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Shakapacker configuration should be tested by creating debug scripts in dummy app root (debug-webpack-rules.js, debug-webpack-with-config.js) to inspect webpack rules before committing configuration changes
Applied to files:
react_on_rails/rakelib/shakapacker_examples.rakeSWITCHING_CI_CONFIGS.md
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: In IDE configuration, exclude these directories to prevent slowdowns: /coverage, /tmp, /gen-examples, /packages/react-on-rails/lib, /node_modules, /react_on_rails/spec/dummy/node_modules, /react_on_rails/spec/dummy/tmp, /react_on_rails/spec/dummy/app/assets/webpack, /react_on_rails/spec/dummy/log, /react_on_rails/spec/dummy/e2e/playwright-report, /react_on_rails/spec/dummy/test-results
Applied to files:
react_on_rails/rakelib/shakapacker_examples.rake
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to lib/react_on_rails/engine.rb : In Rails Engine code, DO NOT use `rake_tasks` block to explicitly load rake files from `lib/tasks/` - Rails::Engine automatically loads them. Only use `rake_tasks` block if tasks are in non-standard location, need programmatic generation, or need to pass context
Applied to files:
react_on_rails/rakelib/shakapacker_examples.rake
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to **/config/webpack/**/*.js : Use `namedExport: false` and `exportLocalsConvention: 'camelCase'` for CSS Modules loader options in Shakapacker 9.0+ if existing code uses `import styles from './file.module.css'` pattern
Applied to files:
react_on_rails/rakelib/shakapacker_examples.rake
📚 Learning: 2024-12-12T13:07:09.929Z
Learnt from: alexeyr-ci
Repo: shakacode/react_on_rails PR: 1644
File: node_package/src/ReactOnRailsRSC.ts:87-87
Timestamp: 2024-12-12T13:07:09.929Z
Learning: When handling errors in 'node_package/src/ReactOnRailsRSC.ts', include the error stack in error messages in development and test environments to aid debugging.
Applied to files:
react_on_rails/rakelib/shakapacker_examples.rake
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Never manually format code during conflict resolution - always use `rake autofix` after resolving logical conflicts to maintain automated formatting standards
Applied to files:
react_on_rails/rakelib/shakapacker_examples.rake
📚 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/rakelib/shakapacker_examples.rakeSWITCHING_CI_CONFIGS.md
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to react_on_rails/spec/dummy/e2e/playwright/app_commands/**/*.rb : Create custom Rails app commands in `e2e/playwright/app_commands/` directory with .rb files for reusable helpers in Playwright tests
Applied to files:
react_on_rails/rakelib/shakapacker_examples.rake
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to {package.json,webpack.config.js,packages/*/package.json,react_on_rails_pro/package.json} : When resolving merge conflicts in build configuration files, verify file paths are correct by running `grep -r 'old/path' .` and test affected scripts like `pnpm run prepack` before continuing the merge
Applied to files:
react_on_rails/rakelib/shakapacker_examples.rakeSWITCHING_CI_CONFIGS.md
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: For infrastructure/config changes, perform comprehensive local testing including: finding all affected files with grep, testing build pipeline, running relevant specs, and linting everything before pushing
Applied to files:
react_on_rails/rakelib/shakapacker_examples.rake
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to react_on_rails/spec/dummy/e2e/playwright/e2e/**/*.spec.js : Use `app('clean')`, `appEval(code)`, `appFactories(options)`, and `appScenario(name)` helpers from cypress-on-rails in Playwright tests for Rails integration
Applied to files:
react_on_rails/rakelib/shakapacker_examples.rake
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Applies to **/*.rb : Run `bundle exec rubocop` and fix ALL violations before every commit/push
Applied to files:
react_on_rails/rakelib/shakapacker_examples.rake
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Git pre-commit hooks automatically run RuboCop (auto-fix), ESLint (auto-fix), Prettier (auto-format), and trailing newline checks on all changed files before each commit
Applied to files:
SWITCHING_CI_CONFIGS.md
📚 Learning: 2025-12-19T18:57:59.314Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T18:57:59.314Z
Learning: Install Playwright browsers with `cd react_on_rails/spec/dummy && pnpm playwright install --with-deps` before running E2E tests
Applied to files:
SWITCHING_CI_CONFIGS.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). (11)
- GitHub Check: dummy-app-integration-tests (3.2, 20, minimum)
- GitHub Check: dummy-app-integration-tests (3.4, 22, latest)
- GitHub Check: examples (3.4, latest)
- GitHub Check: examples (3.2, minimum)
- GitHub Check: rspec-package-tests (3.2, minimum)
- GitHub Check: rspec-package-tests (3.4, latest)
- GitHub Check: build
- GitHub Check: build-dummy-app-webpack-test-bundles
- GitHub Check: build-dummy-app-webpack-test-bundles
- GitHub Check: pro-lint-js-and-ruby
- GitHub Check: claude-review
🔇 Additional comments (3)
SWITCHING_CI_CONFIGS.md (1)
26-27: LGTM! Documentation version updates are consistent.The Shakapacker version references are updated consistently from 9.3.0 to 9.4.0, and the downgrade path documentation correctly reflects the new baseline.
Also applies to: 127-128
README.md (1)
56-56: LGTM! React version reference updated correctly.The React on Rails Pro documentation now correctly references React 19 features.
Based on learnings, ensure
CHANGELOG.mdis updated for this user-visible change (React 19 support documentation) using the format[PR 2247](https://github.com/shakacode/react_on_rails/pull/2247) by [username](https://github.com/username).react_on_rails/lib/react_on_rails/packer_utils.rb (1)
146-154: LGTM! Error message simplified appropriately.The error message now clearly communicates the autobundling version requirement and current installed version without referencing the removed basic pack generation feature. The message is concise and actionable.
size-limit report 📦
|
Added changelog entry for 16.3.0 release (2026-02-05) with entries for three bug fixes: - PR #2275: Fix rspack configuration not applying to all environments - PR #2280: Fix precompile hook when Shakapacker is pre-installed - PR #2273: Fix bin/dev failing with --route flag Also includes PR #2247 (Simplified Shakapacker version handling) under Changed section. Updated version comparison links at bottom of changelog. Co-Authored-By: Claude Opus 4.6 <[email protected]>
### Summary Added changelog entry for React on Rails 16.3.0 (released 2026-02-05) documenting all user-visible changes: **Changed:** - PR #2247: Simplified Shakapacker version handling **Fixed:** - PR #2275: Fix rspack configuration not applying to all environments (fixes `bin/switch-bundler` crash and `--rspack` flag only updating default section) - PR #2280: Fix precompile hook when Shakapacker is pre-installed (fixes missing component bundles in production) - PR #2273: Fix `bin/dev` failing with `--route` flag Updated version comparison links at the bottom of the file. ### Pull Request checklist - [x] Update CHANGELOG file <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Changed** * Simplified handling of Shakapacker version (16.3.0) * **Bug Fixes** * Fixed environment/application behavior not being applied consistently * Fixed precompile hook when assets are pre-installed * Fixed route handling in the development command <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.6 <[email protected]>
### Summary Added changelog entry for React on Rails 16.3.0 (released 2026-02-05) documenting all user-visible changes: **Changed:** - PR #2247: Simplified Shakapacker version handling **Fixed:** - PR #2275: Fix rspack configuration not applying to all environments (fixes `bin/switch-bundler` crash and `--rspack` flag only updating default section) - PR #2280: Fix precompile hook when Shakapacker is pre-installed (fixes missing component bundles in production) - PR #2273: Fix `bin/dev` failing with `--route` flag Updated version comparison links at the bottom of the file. ### Pull Request checklist - [x] Update CHANGELOG file <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Changed** * Simplified handling of Shakapacker version (16.3.0) * **Bug Fixes** * Fixed environment/application behavior not being applied consistently * Fixed precompile hook when assets are pre-installed * Fixed route handling in the development command <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.6 <[email protected]>
Summary
This PR addresses #2225 by unifying Shakapacker minimum version requirements. The key changes:
MINIMUM_SHAKAPACKER_VERSIONconstant (6.5.1) that was redundant with the gemspec constraint (shakapacker >= 6.0)MINIMUM_SHAKAPACKER_VERSION_FOR_AUTO_BUNDLING(7.0.0) remains as it's actively used to validate autobundling feature requirementsPull Request checklist
Version Requirements After This PR
nested_entriessupportSummary by CodeRabbit
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.