Fix generated demo path hints for custom Shakapacker roots#4130
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughThe generators replace hardcoded ChangesShakapacker config-driven generator path helpers and demo page accuracy
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 Review — Fix generated demo path hints for custom Shakapacker rootsOverviewSolid fix. The generator correctly reads Issues1. Hardcoded stylesheet import depth in RSC Tailwind flow
2. Section lookup order in
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Autofix Details
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Slash entry path mishandled
- Handled Shakapacker's source_entry_path '/' as the source root while preserving unsafe absolute-path fallback behavior.
Or push these changes by commenting:
@cursor push 82ee885845
Preview (82ee885845)
diff --git a/react_on_rails/lib/generators/react_on_rails/generator_helper.rb b/react_on_rails/lib/generators/react_on_rails/generator_helper.rb
--- a/react_on_rails/lib/generators/react_on_rails/generator_helper.rb
+++ b/react_on_rails/lib/generators/react_on_rails/generator_helper.rb
@@ -87,7 +87,8 @@
def shakapacker_source_entry_path
@shakapacker_source_entry_path ||= configured_shakapacker_relative_path(
"source_entry_path",
- DEFAULT_SHAKAPACKER_SOURCE_ENTRY_PATH
+ DEFAULT_SHAKAPACKER_SOURCE_ENTRY_PATH,
+ allow_root: true
)
end
@@ -107,14 +108,14 @@
"#{example_component_source_directory(component_name)}/"
end
- def configured_shakapacker_relative_path(config_key, default)
+ def configured_shakapacker_relative_path(config_key, default, allow_root: false)
config_path = File.join(destination_root, "config/shakapacker.yml")
return default unless File.exist?(config_path)
config = parse_shakapacker_yml(config_path)
configured_path = shakapacker_path_config_value(config, config_key)
- safe_generator_destination_path(configured_path, default:)
+ safe_generator_destination_path(configured_path, default:, allow_root:)
end
def shakapacker_path_config_value(config, config_key)
@@ -128,9 +129,10 @@
nil
end
- def safe_generator_destination_path(path, default:)
+ def safe_generator_destination_path(path, default:, allow_root: false)
candidate = path.to_s.strip
return default if candidate.empty?
+ return "" if allow_root && candidate == "/"
pathname = Pathname.new(candidate).cleanpath
relative_path = if pathname.absolute?
diff --git a/react_on_rails/spec/react_on_rails/generators/generator_helper_spec.rb b/react_on_rails/spec/react_on_rails/generators/generator_helper_spec.rb
--- a/react_on_rails/spec/react_on_rails/generators/generator_helper_spec.rb
+++ b/react_on_rails/spec/react_on_rails/generators/generator_helper_spec.rb
@@ -204,6 +204,28 @@
end
end
+ describe "#shakapacker_entrypoint_path" do
+ let(:shakapacker_yml_path) { File.join(destination_root, "config/shakapacker.yml") }
+
+ before do
+ FileUtils.mkdir_p(File.dirname(shakapacker_yml_path))
+ end
+
+ after do
+ FileUtils.rm_rf(File.join(destination_root, "config"))
+ end
+
+ it "treats source_entry_path slash as the source_path root" do
+ File.write(shakapacker_yml_path, <<~YAML)
+ default:
+ source_path: client/app
+ source_entry_path: /
+ YAML
+
+ expect(shakapacker_entrypoint_path("server-bundle.js")).to eq("client/app/server-bundle.js")
+ end
+ end
+
describe "#parse_shakapacker_yml_content" do
let(:aliased_config) do
<<~YAMLYou can send follow-ups to the cloud agent here.
Code Review: Fix generated demo path hints for custom Shakapacker rootsOverall: solid PR with good security hygiene. The approach of reading What works well
Issues found1. CSS inconsistency — RSC demo template missing
2. Hardcoded 3-level stylesheet import depth in Redux generator (latent)
3. No-op
Minor observations
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Autofix Details
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Stale Shakapacker paths after overwrite
- Moved Shakapacker config generation before path-dependent base files and added a forced-overwrite Tailwind regression spec.
Or push these changes by commenting:
@cursor push d85d629ba1
Preview (d85d629ba1)
diff --git a/react_on_rails/lib/generators/react_on_rails/base_generator.rb b/react_on_rails/lib/generators/react_on_rails/base_generator.rb
--- a/react_on_rails/lib/generators/react_on_rails/base_generator.rb
+++ b/react_on_rails/lib/generators/react_on_rails/base_generator.rb
@@ -188,6 +188,32 @@
route "get 'hello_world', to: 'hello_world#index'"
end
+ def copy_packer_config
+ base_path = "base/base/"
+ config = "config/shakapacker.yml"
+
+ if options.shakapacker_just_installed?
+ say "Replacing Shakapacker default config with React on Rails version"
+ # Shakapacker's installer just created this file from scratch (no pre-existing config).
+ # Safe to overwrite silently with RoR's version-aware template (e.g., private_output_path).
+ template("#{base_path}#{config}.tt", config, force: true)
+ else
+ say "Adding Shakapacker #{ReactOnRails::PackerUtils.shakapacker_version} config"
+ # Thor handles the conflict: prompts user interactively, or respects --force/--skip flags.
+ template("#{base_path}#{config}.tt", config)
+ end
+
+ # Configure bundler-specific settings
+ configure_rspack_in_shakapacker if using_rspack?
+
+ # Always ensure precompile_hook is configured (Shakapacker 9.0+ only)
+ configure_precompile_hook_in_shakapacker
+
+ # For SSR bundles, configure Shakapacker private_output_path (9.0+ only)
+ # This keeps Shakapacker and React on Rails server bundle paths in sync.
+ configure_private_output_path_in_shakapacker
+ end
+
def create_react_directories
# Skip HelloWorld directory for Redux (uses HelloWorldApp) or RSC (uses HelloServer)
return if options.redux? || use_rsc?
@@ -278,32 +304,6 @@
shakapacker_stylesheet_path("application.css"))
end
- def copy_packer_config
- base_path = "base/base/"
- config = "config/shakapacker.yml"
-
- if options.shakapacker_just_installed?
- say "Replacing Shakapacker default config with React on Rails version"
- # Shakapacker's installer just created this file from scratch (no pre-existing config).
- # Safe to overwrite silently with RoR's version-aware template (e.g., private_output_path).
- template("#{base_path}#{config}.tt", config, force: true)
- else
- say "Adding Shakapacker #{ReactOnRails::PackerUtils.shakapacker_version} config"
- # Thor handles the conflict: prompts user interactively, or respects --force/--skip flags.
- template("#{base_path}#{config}.tt", config)
- end
-
- # Configure bundler-specific settings
- configure_rspack_in_shakapacker if using_rspack?
-
- # Always ensure precompile_hook is configured (Shakapacker 9.0+ only)
- configure_precompile_hook_in_shakapacker
-
- # For SSR bundles, configure Shakapacker private_output_path (9.0+ only)
- # This keeps Shakapacker and React on Rails server bundle paths in sync.
- configure_private_output_path_in_shakapacker
- end
-
def add_base_gems_to_gemfile
run "bundle"
end
diff --git a/react_on_rails/spec/react_on_rails/generators/install_generator_spec.rb b/react_on_rails/spec/react_on_rails/generators/install_generator_spec.rb
--- a/react_on_rails/spec/react_on_rails/generators/install_generator_spec.rb
+++ b/react_on_rails/spec/react_on_rails/generators/install_generator_spec.rb
@@ -450,6 +450,24 @@
end
end
+ context "with --force, --tailwind, and a pre-installed custom Shakapacker source root" do
+ before(:all) do
+ run_generator_test_with_args(%w[--tailwind], package_json: true, force: true) do
+ simulate_preinstalled_shakapacker(source_path: "client/app", source_entry_path: "entrypoints")
+ end
+ end
+
+ it "generates base and demo files under the overwritten Shakapacker defaults" do
+ assert_file "app/javascript/src/HelloWorld/ror_components/HelloWorld.client.jsx"
+ assert_file "app/javascript/stylesheets/application.css"
+ assert_file "app/javascript/packs/server-bundle.js"
+
+ assert_no_file "client/app/src/HelloWorld/ror_components/HelloWorld.client.jsx"
+ assert_no_file "client/app/stylesheets/application.css"
+ assert_no_file "client/app/entrypoints/server-bundle.js"
+ end
+ end
+
context "with --redux and a pre-installed custom Shakapacker source root" do
before(:all) do
run_generator_test_with_args(%w[--redux], package_json: true, force: false) doYou can send follow-ups to the cloud agent here.
Code ReviewSummaryThis PR correctly fixes generated demo pages to use actual Shakapacker-configured paths instead of hardcoded Bug / No-op — remaining
|
Code ReviewOverall: Solid fix with good safety thinking. A few minor issues worth addressing before merge. This PR correctly fixes #4062 — generated demo pages were hardcoding What's working well
IssuesMedium — Missing integration test for stylesheet path with custom source root
assert_file "client/app/stylesheets/application.css"
assert_no_file "app/javascript/stylesheets/application.css"...should be added to the Tailwind + custom-root scenario (or a new context) so that a future change to Minor — No unit tests for the new path-safety helpers
Minor — Redundant nil check inside
|
|
Overall: well-designed fix with good test coverage. Leaving inline comments for specific findings. |
Code Review: Fix generated demo path hints for custom Shakapacker rootsOverviewThis is a well-scoped, well-tested fix. The core problem (demo pages hardcoding Strengths
Concerns1. use_rspack = using_rspack? # reads existing shakapacker.yml
template("...", config, force: true) # overwrites it
configure_rspack_in_shakapacker if use_rspackThis preserves the user's rspack choice from the pre-install config even after the template overwrites it. The test at line 1074 of 2. The ordering guard raises a user-facing raise Thor::Error, "copy_packer_config must run before path-dependent generator actions"If this fires (a developer mistake in generator ordering, not a user mistake), the user sees a confusing install failure. The message is clear enough to diagnose, but adding "(this is a generator bug — please open an issue)" would tell users not to try to fix their Shakapacker config. 3. The return type is 4. If someone has 5. Minor: no unit test for standard (non-slash) The unit spec tests the slash-root case and blank filename, but not the common case like VerdictThe PR is ready from a correctness standpoint. Concerns 1 and 3 are the most worth addressing before merge (one comment addition, one annotation), but none are blockers for a well-tested generator change with extensive validation documented in the PR body. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b2a6c070eb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Code Review: Fix generated demo path hints for custom Shakapacker rootsOverviewThis PR correctly solves a real user-facing problem: generators were writing demo scaffolding to hardcoded Strengths
IssuesMinor: redundant
Observation: test fixture YAML uses merge keys (
Nit: The trick of using SecurityNo concerns. Path traversal is handled correctly. YAML is parsed with SummaryThe implementation is solid and the test coverage is comprehensive. The main actionable items are the redundant rescue (remove or add a belt-and-suspenders comment) and the YAML anchors fragility in the test fixtures. Everything else is clean. |
Code Review — PR #4130OverviewThis PR fixes a real and impactful bug: the install generator was hardcoding Issues1. Dead
|
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_5b17d682-0baf-4d0d-a261-335c8ab21ded) |
Manual verification: reproduced the gap and confirmed the fix ✅Reproduced via the merged ReproductionSquash-merged at Results
The 13 failures are exactly the new path-resolution cases (safe relativization inside the destination root, fallback for traversing/outside-root paths, the Shakapacker root-entry empty sentinel, and stylesheet placement under the configured source path). CaveatGenerator-helper level: confirms the path-hint resolution logic (Shakapacker-config-aware source/entry/stylesheet paths + safe relativization). I did not run a full |
## Why The default branch is currently failing `Rspec test for gem` on `main` in the generator shard: - Run: https://github.com/shakacode/react_on_rails/actions/runs/27869267839 - Failed jobs: `rspec-package-tests (4.0, latest, generators)` and `rspec-package-tests (3.3, minimum, generators)` - Failed example: `spec/react_on_rails/generators/install_generator_spec.rb:3717` The failure was not caused by the most recent Pro streaming PR. The same generator failure appears on the prior pushed commit and traces back to the custom Shakapacker-root generator work in #4130. A focused ordered repro showed the issue: ```bash cd react_on_rails && bundle exec rspec \ spec/react_on_rails/generators/install_generator_spec.rb:564 \ spec/react_on_rails/generators/install_generator_spec.rb:590 \ spec/react_on_rails/generators/install_generator_spec.rb:3717 ``` Before this patch, that sequence failed because earlier examples left `config/shakapacker.yml` in the shared generator destination. The pretend-mode example used `expect(File).not_to receive(:read)`, which accidentally forbade the legitimate config read used to resolve Shakapacker paths. The behavior the test meant to protect is narrower: pretend mode must not read the copied Redux Tailwind client entry, because pretend mode does not create that file. ## What changed - Adds an explicit `config/shakapacker.yml` fixture to the pretend-mode example. - Allows normal `File.read` calls while asserting the generated Redux client entry is not read. - Keeps the production generator code unchanged. ## Validation - `git diff --check` -> passed. - `cd react_on_rails && bundle exec rspec spec/react_on_rails/generators/install_generator_spec.rb:564 spec/react_on_rails/generators/install_generator_spec.rb:590 spec/react_on_rails/generators/install_generator_spec.rb:3717` -> 4 examples, 0 failures. - `cd react_on_rails && BUNDLE_GEMFILE=../Gemfile bundle exec rubocop spec/react_on_rails/generators/install_generator_spec.rb` -> 1 file inspected, no offenses. - `codex review --uncommitted` -> no actionable correctness issues. - Pre-commit hook -> trailing-newlines, Ruby autofix/RuboCop passed for the changed spec. - Pre-push hook -> branch Ruby RuboCop and markdown-links passed. ## Process triage Process Gap Disposition: `checklist+replay`. - Motivating miss: #4130 recorded focused validation for `install_generator_spec.rb:3717`, but the default-branch failure required replaying that example after earlier custom-root generator examples that leave `config/shakapacker.yml` in the shared destination. - Replay evidence: the ordered repro above failed on `main` before this patch and passed after this patch. - Non-goal: do not add a broad prose-only rule or a full generator-suite requirement for every small generator PR. Merge queue would reduce stale-base/concurrency merges, but it would not have caught this exact issue unless the queue runs the same generator shard before landing. The actionable process improvement is to include ordered replay when adding generator examples that share `dummy-for-generators`, especially when new examples leave Shakapacker config or other shared files behind. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Test-only change to generator spec isolation; no production generator behavior modified. > > **Overview** > Fixes flaky generator CI by tightening the **pretend-mode Redux + Tailwind** example in `install_generator_spec.rb`, without changing generator code. > > The example now seeds its own `config/shakapacker.yml` so Shakapacker path resolution does not depend on leftovers from earlier examples in the shared `dummy-for-generators` destination. It stubs `File.read` with `and_call_original` and only forbids reading the Redux Tailwind client entry (`HelloWorldApp.client.jsx`), which matches the real behavior: pretend mode may read config but must not read the copied client file to inject the stylesheet import. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit ace8804. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
## Why Stamps the `17.0.0.rc.6` changelog section so the release task can publish it and auto-create the GitHub release. This is the changelog step that comes **before** running `bundle exec rake release` (the release task reads the version + notes from `CHANGELOG.md`). ## What Ran a full `/update-changelog` classification sweep over the **78 merged PRs** in `v17.0.0.rc.5..origin/main` (plus one revert commit) before stamping. Most are docs/agent-workflow/CI/test changes (`no-entry`); the user-visible ones were already accumulated under `[Unreleased]` during development. **Stamping:** `bundle exec rake "update_changelog[17.0.0.rc.6]"` inserted the `### [17.0.0.rc.6] - 2026-06-21` header after `[Unreleased]`, moved the accumulated entries under it, and rewrote the compare links (`v17.0.0.rc.5...v17.0.0.rc.6`, `[unreleased]` → `main`). Prior RC sections are preserved (RC mode does not collapse them). **Changelog edits made in this pass:** - **Added one missing entry** — RSC-safe generated i18n locale defaults ([#4146](#4146)): the only user-visible PR merged after rc.5 that was not yet in the changelog (gem runtime change in `lib/react_on_rails/locales/`, fixes #4132). - **Co-credited [#4107](#4107 alongside #4130 on the "generated demo paths honor custom Shakapacker source roots" entry — #4107 is the demo-path-wrapping half of the same Issue #4062 work, already described in that entry. - **Added the missing PR link ([#4096](#4096 to the `RenderFunction` types-only breaking-change entry, which previously linked only the issue. - **Reordered** the rc.6 category sections to the standard **Added → Changed → Fixed**, matching rc.2/rc.4 and the changelog skill's documented order (the `[Unreleased]` accumulation had led with Fixed). The `17.0.0.rc.6` section contains 14 entries (3 Added, 4 Changed, 7 Fixed). ## Test plan - `bundle exec rake "update_changelog[17.0.0.rc.6]"` (run with a UTF-8 locale to avoid the `invalid byte sequence in US-ASCII` regex bug) → header + compare links stamped. - `pnpm exec prettier --check CHANGELOG.md` → clean. - Pre-commit/pre-push hooks: trailing-newlines, Lychee markdown links (8 OK / 0 errors), Prettier, branch-lint → all pass. - Verified `[Unreleased]` is now empty, version headers are newest-first, and compare links use the `v` prefix. ## Labels `Labels: none` — changelog/docs-only change; relies on the required PR gate plus the local verification above. ## After merge Run `bundle exec rake release` (no args — it reads `17.0.0.rc.6` from the changelog) to publish and auto-create the GitHub release. > Note: `main` currently shows pre-existing `detect-changes` failures unrelated to this changelog-only change. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>

Why
Fixes #4062.
Generated demo pages could wrap poorly for long source paths and could point users at default
app/javascriptpaths even when the app uses custom Shakapacker source roots.What changed
source_entry_path: /by generating entrypoints directly undersource_path.--forceinstalls.--forceoverwrite behavior.Validation
git diff --check origin/main...HEAD-> passBUNDLE_GEMFILE=../Gemfile bundle exec rubocop lib/generators/react_on_rails/generator_helper.rb lib/generators/react_on_rails/react_with_redux_generator.rb lib/generators/react_on_rails/rsc_setup.rb spec/react_on_rails/generators/generator_helper_spec.rb-> 4 files inspected, no offensesbundle exec rspec spec/react_on_rails/generators/generator_helper_spec.rb spec/react_on_rails/generators/install_generator_spec.rb:724 spec/react_on_rails/generators/install_generator_spec.rb:2835 spec/react_on_rails/generators/install_generator_spec.rb:2854-> 14 examples, 0 failuresbundle exec rspec spec/react_on_rails/generators/generator_helper_spec.rb-> 83 examples, 0 failuresBUNDLE_GEMFILE=../Gemfile bundle exec rubocop spec/react_on_rails/generators/generator_helper_spec.rb lib/generators/react_on_rails/generator_helper.rb-> 2 files inspected, no offensesbundle exec rspec spec/react_on_rails/generators/generator_helper_spec.rb spec/react_on_rails/generators/install_generator_spec.rb:516 spec/react_on_rails/generators/install_generator_spec.rb:457-> 3 examples, 0 failuresBUNDLE_GEMFILE=../Gemfile bundle exec rubocop lib/generators/react_on_rails/generator_helper.rb spec/react_on_rails/generators/generator_helper_spec.rb spec/react_on_rails/generators/install_generator_spec.rb-> 3 files inspected, no offensesbundle exec rspec spec/react_on_rails/generators/generator_helper_spec.rb spec/react_on_rails/generators/install_generator_spec.rb:415 spec/react_on_rails/generators/install_generator_spec.rb:442 spec/react_on_rails/generators/install_generator_spec.rb:455 spec/react_on_rails/generators/install_generator_spec.rb:477 spec/react_on_rails/generators/install_generator_spec.rb:502-> 9 examples, 0 failuresEarlier worker-focused
bundle exec rspec spec/react_on_rails/generators/install_generator_spec.rbsubset -> 26 examples, 0 failuresFull
bundle exec rspec spec/react_on_rails/generators/install_generator_spec.rbreached 194 examples, 0 failures before interruption; exit code was nonzero due the interrupt, not a test failure.Current-head review follow-up validation:
BUNDLE_GEMFILE=../Gemfile bundle exec rubocop lib/generators/react_on_rails/base_generator.rb lib/generators/react_on_rails/generator_helper.rb spec/react_on_rails/generators/generator_helper_spec.rb spec/react_on_rails/generators/install_generator_spec.rb-> 4 files inspected, no offensesCurrent-head review follow-up validation:
bundle exec rspec spec/react_on_rails/generators/generator_helper_spec.rb-> 84 examples, 0 failuresCurrent-head review follow-up validation:
bundle exec rspec spec/react_on_rails/generators/generator_helper_spec.rb spec/react_on_rails/generators/install_generator_spec.rb:501 spec/react_on_rails/generators/install_generator_spec.rb:457-> 4 focused install-generator examples, 0 failures; note RSpec location filtering requires runninggenerator_helper_spec.rbseparatelyPath-safety review validation after
61f4c2684:BUNDLE_GEMFILE=../Gemfile bundle exec rubocop lib/generators/react_on_rails/base_generator.rb lib/generators/react_on_rails/generator_helper.rb spec/react_on_rails/generators/generator_helper_spec.rb spec/react_on_rails/generators/install_generator_spec.rb-> 4 files inspected, no offensesPath-safety review validation after
61f4c2684:bundle exec rspec spec/react_on_rails/generators/generator_helper_spec.rb-> 85 examples, 0 failuresPath-safety review validation after
61f4c2684:bundle exec rspec spec/react_on_rails/generators/install_generator_spec.rb:501 spec/react_on_rails/generators/install_generator_spec.rb:457-> 4 focused install-generator examples, 0 failuresReview follow-up validation after
6c3b0e9cd:BUNDLE_GEMFILE=../Gemfile bundle exec rubocop lib/generators/react_on_rails/base_generator.rb lib/generators/react_on_rails/generator_helper.rb spec/react_on_rails/generators/generator_helper_spec.rb spec/react_on_rails/generators/install_generator_spec.rb-> 4 files inspected, no offensesReview follow-up validation after
6c3b0e9cd:bundle exec rspec spec/react_on_rails/generators/install_generator_spec.rb:552-> 1 example, 0 failuresReview follow-up validation after
6c3b0e9cd:bundle exec rspec spec/react_on_rails/generators/generator_helper_spec.rb-> 85 examples, 0 failuresReview follow-up validation after
6c3b0e9cd:git diff --check-> passGuard-review validation after
cfa66d774:BUNDLE_GEMFILE=../Gemfile bundle exec rubocop lib/generators/react_on_rails/base_generator.rb lib/generators/react_on_rails/generator_helper.rb spec/react_on_rails/generators/generator_helper_spec.rb spec/react_on_rails/generators/install_generator_spec.rb-> 4 files inspected, no offensesGuard-review validation after
cfa66d774:bundle exec rspec spec/react_on_rails/generators/generator_helper_spec.rb-> 86 examples, 0 failuresGuard-review validation after
cfa66d774:bundle exec rspec spec/react_on_rails/generators/install_generator_spec.rb:1541-> 1 example, 0 failuresRedux Tailwind review validation after
33e8f0ca3:git diff --check-> passRedux Tailwind review validation after
33e8f0ca3:BUNDLE_GEMFILE=../Gemfile bundle exec rubocop lib/generators/react_on_rails/react_with_redux_generator.rb spec/react_on_rails/generators/install_generator_spec.rb-> 2 files inspected, no offensesRedux Tailwind review validation after
33e8f0ca3:bundle exec rspec spec/react_on_rails/generators/install_generator_spec.rb:530-> 2 examples, 0 failuresGuard coverage review validation after
a406d3eeb:git diff --check,BUNDLE_GEMFILE=../Gemfile bundle exec rubocop lib/generators/react_on_rails/react_no_redux_generator.rb spec/react_on_rails/generators/install_generator_spec.rb,bundle exec rspec spec/react_on_rails/generators/install_generator_spec.rb:1561, andbundle exec rspec spec/react_on_rails/generators/install_generator_spec.rb:1569-> passpre-commit and pre-push hooks passed on the pushed branch; latest pre-push RuboCop inspected 10 branch Ruby files with no offenses.
Latest review-fix validation after
b71a72792:git diff --check,BUNDLE_GEMFILE=../Gemfile bundle exec rubocop lib/generators/react_on_rails/base_generator.rb lib/generators/react_on_rails/generator_helper.rb spec/react_on_rails/generators/generator_helper_spec.rb spec/react_on_rails/generators/install_generator_spec.rb, andbundle exec rspec spec/react_on_rails/generators/install_generator_spec.rb:1561 spec/react_on_rails/generators/install_generator_spec.rb:1569 spec/react_on_rails/generators/generator_helper_spec.rb:342-> pass; pre-commit/pre-push hooks passed.Slash-entry review validation after
b27832705:git diff --check,BUNDLE_GEMFILE=../Gemfile bundle exec rubocop spec/react_on_rails/generators/install_generator_spec.rb, andbundle exec rspec spec/react_on_rails/generators/install_generator_spec.rb:447 spec/react_on_rails/generators/install_generator_spec.rb:475-> 4 examples, 0 failures; pre-commit/pre-push hooks passed.Latest TypeScript custom-root review validation after
756544e33:git diff --check,BUNDLE_GEMFILE=../Gemfile bundle exec rubocop lib/generators/react_on_rails/install_generator.rb spec/react_on_rails/generators/install_generator_spec.rb, andbundle exec rspec spec/react_on_rails/generators/install_generator_spec.rb:564-> pass; pre-commit/pre-push hooks passed.TypeScript ordering review validation after
558296bd3:git diff --check,BUNDLE_GEMFILE=../Gemfile bundle exec rubocop lib/generators/react_on_rails/install_generator.rb spec/react_on_rails/generators/install_generator_spec.rb, andbundle exec rspec spec/react_on_rails/generators/install_generator_spec.rb:564 spec/react_on_rails/generators/install_generator_spec.rb:590-> pass; pre-commit/pre-push hooks passed.CSS-module conflict-handling review validation after
b2a6c070e:git diff --check,BUNDLE_GEMFILE=../Gemfile bundle exec rubocop lib/generators/react_on_rails/install_generator.rb spec/react_on_rails/generators/install_generator_spec.rb, andbundle exec rspec spec/react_on_rails/generators/install_generator_spec.rb:564 spec/react_on_rails/generators/install_generator_spec.rb:590 spec/react_on_rails/generators/install_generator_spec.rb:3717-> 4 examples, 0 failures; pre-commit/pre-push hooks passed.RSC slash-entry discovery validation after
aa8edbf10:git diff --check,BUNDLE_GEMFILE=../Gemfile bundle exec rubocop spec/react_on_rails/generators/install_generator_spec.rb, andbundle exec rspec spec/react_on_rails/generators/install_generator_spec.rb:662-> 1 example, 0 failures; pre-commit/pre-push hooks passed.Notes
Current head
aa8edbf10is pushed after all current-head review follow-up. Hosted checks are complete, failed checks are 0, and unresolved review threads are 0.Note
Low Risk
Scope is install-time generator output and demo templates only; no runtime Rails or bundler behavior changes for existing apps.
Overview
Install generators no longer hardcode
app/javascript/packsfor Hello World, Redux, RSC, Tailwind, and TypeScript scaffolding. They readconfig/shakapacker.yml(source_path,source_entry_path, including/for entrypoints at the source root) and place demo components,server-bundle.js, stylesheets,tsconfigincludes, and view file hints under those paths.copy_packer_configruns first so path helpers memoize the final config (including--forceoverwrites); memoizing before that step raises. Tailwind CSS imports are computed relative to each generated entry file. RSC webpack config normalizes slash entry paths. Demo views wrap long path hints in CSS.Generator specs cover custom roots, slash entry paths, Redux/RSC/Tailwind/TypeScript, and
--forcebehavior.Reviewed by Cursor Bugbot for commit b52c633. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
source_path/source_entry_path.tsconfigincludes now align with the configured Shakapacker source path.