Fix #2600: show incomplete install message after shakapacker failure#2613
Fix #2600: show incomplete install message after shakapacker failure#2613
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:
WalkthroughTracks incomplete Shakapacker setup in the install generator to suppress final success/quick-start messaging when Shakapacker install is skipped or fails; adds an Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Installer as InstallGenerator
participant Shaka as ShakapackerTask
participant ReduxGen as ReactWithReduxGenerator
participant Messages as GeneratorMessages
Installer->>Shaka: check/install shakapacker
alt Shakapacker installed
Shaka-->>Installer: success
Installer->>ReduxGen: invoke (invoked_by_install: true) [if redux selected]
ReduxGen-->>Installer: returns (no standalone redux messages)
Installer->>Messages: add_post_install_message (normal success flow)
else Shakapacker skipped/failed
Shaka-->>Installer: failed/skipped
Installer->>Installer: set `@shakapacker_setup_incomplete` = true
Installer->>ReduxGen: invoke (invoked_by_install: true) [if redux selected]
ReduxGen-->>Installer: returns (no standalone redux messages)
Installer->>Messages: add_post_install_message -> emits incomplete_installation_message
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Redux path bypasses incomplete installation check
- I made InstallGenerator always emit the post-install message and removed Redux generator’s duplicate success banner so Redux installs now show the incomplete-installation warning when Shakapacker setup fails.
Or push these changes by commenting:
@cursor push 96e6670af6
Preview (96e6670af6)
diff --git a/react_on_rails/lib/generators/react_on_rails/install_generator.rb b/react_on_rails/lib/generators/react_on_rails/install_generator.rb
--- a/react_on_rails/lib/generators/react_on_rails/install_generator.rb
+++ b/react_on_rails/lib/generators/react_on_rails/install_generator.rb
@@ -102,9 +102,7 @@
if installation_prerequisites_met? || options.ignore_warnings?
invoke_generators
add_bin_scripts
- # Only add the post install message if not using Redux
- # Redux generator handles its own messages
- add_post_install_message unless options.redux?
+ add_post_install_message
else
error = <<~MSG.strip
🚫 React on Rails generator prerequisites not met!
diff --git a/react_on_rails/lib/generators/react_on_rails/react_with_redux_generator.rb b/react_on_rails/lib/generators/react_on_rails/react_with_redux_generator.rb
--- a/react_on_rails/lib/generators/react_on_rails/react_with_redux_generator.rb
+++ b/react_on_rails/lib/generators/react_on_rails/react_with_redux_generator.rb
@@ -90,10 +90,7 @@
end
def add_redux_specific_messages
- # Append Redux-specific post-install instructions
- GeneratorMessages.add_info(
- GeneratorMessages.helpful_message_after_installation(component_name: "HelloWorldApp", route: "hello_world")
- )
+ # InstallGenerator handles post-install messaging for all install modes.
end
private
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
@@ -1673,6 +1673,24 @@
expect(output_text).not_to include("🎉 React on Rails Successfully Installed!")
expect(output_text).not_to include("📋 QUICK START:")
end
+
+ specify "shows incomplete-installation guidance for redux installs when shakapacker setup fails" do
+ install_generator = described_class.new([], { redux: true, ignore_warnings: true })
+ allow(install_generator).to receive(:installation_prerequisites_met?).and_return(true)
+ allow(install_generator).to receive(:invoke_generators) do
+ install_generator.instance_variable_set(:@shakapacker_setup_incomplete, true)
+ end
+ allow(install_generator).to receive(:add_bin_scripts)
+ allow(install_generator).to receive(:print_generator_messages)
+
+ install_generator.run_generators
+ output_text = GeneratorMessages.output.join("\n")
+
+ expect(output_text).to include("React on Rails installation is incomplete")
+ expect(output_text).to include("Avoid running ./bin/dev")
+ expect(output_text).not_to include("🎉 React on Rails Successfully Installed!")
+ expect(output_text).not_to include("📋 QUICK START:")
+ end
end
describe "--pretend mode behavior" do
Greptile SummaryThis PR fixes #2600 by tracking when automatic Shakapacker installation fails during
Confidence Score: 3/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[run_generators] --> B{prerequisites met OR ignore_warnings?}
B -->|No| Z[Add error, skip install]
B -->|Yes| C[invoke_generators]
C --> D[ensure_shakapacker_installed]
D --> E{shakapacker_configured?}
E -->|Yes| F[Continue]
E -->|No| G[install_shakapacker]
G -->|Success| H[finalize_shakapacker_setup]
G -->|Failure| I["@shakapacker_setup_incomplete = true"]
H --> F
I --> F
F --> J{options.redux?}
J -->|Yes| K[invoke ReactWithReduxGenerator]
J -->|No| L[invoke ReactNoReduxGenerator]
K --> M[add_redux_specific_messages]
M --> N["Shows success banner ⚠️ even if incomplete"]
L --> O[add_post_install_message]
O --> P{shakapacker_setup_incomplete?}
P -->|Yes| Q["Shows incomplete warning ✅"]
P -->|No| R["Shows success banner ✅"]
|
ReviewThe fix is well-scoped and logic is correct for the non-Redux path. A few issues worth addressing: Bug: Redux + Shakapacker failure still shows success banner When Potentially misleading step 4 in the incomplete-installation message Step 4 suggests Minor: redundant The predicate uses Missing test: Redux + Shakapacker failure path No test verifies that |
There was a problem hiding this comment.
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/generators/react_on_rails/install_generator.rb (1)
307-332:⚠️ Potential issue | 🔴 CriticalRedux generator doesn't suppress success messages when Shakapacker setup fails.
The concern is valid. When
--reduxis used,add_post_install_messageis skipped (line 107), but the React Redux generator'sadd_redux_specific_messagesmethod runs unconditionally and displays a success message regardless of Shakapacker setup status. The@shakapacker_setup_incompleteflag from install_generator is not passed to the child generator instance, so the incomplete setup warning never appears in the Redux flow.The redux generator should either:
- Receive and check the
shakapacker_setup_incompletestate from the parent generator, or- Have
add_post_install_messagecalled even when--reduxis used to ensure the incomplete installation warning is shown🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@react_on_rails/lib/generators/react_on_rails/install_generator.rb` around lines 307 - 332, The Redux child generator is displaying success messages even when Shakapacker setup failed because the `@shakapacker_setup_incomplete` flag from InstallGenerator is never passed; update the Redux generator to accept and expose the parent's shakapacker state (e.g., add an attr_accessor or option like shakapacker_setup_incomplete and a predicate shakapacker_setup_incomplete?), set that flag on the child instance when the parent invokes the Redux generator in InstallGenerator, and then modify add_redux_specific_messages to check shakapacker_setup_incomplete? and either suppress the success message and call GeneratorMessages.add_warning(incomplete_installation_message) or delegate to add_post_install_message when incomplete instead of unconditionally logging success.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@react_on_rails/lib/generators/react_on_rails/install_generator.rb`:
- Around line 307-332: The Redux child generator is displaying success messages
even when Shakapacker setup failed because the `@shakapacker_setup_incomplete`
flag from InstallGenerator is never passed; update the Redux generator to accept
and expose the parent's shakapacker state (e.g., add an attr_accessor or option
like shakapacker_setup_incomplete and a predicate
shakapacker_setup_incomplete?), set that flag on the child instance when the
parent invokes the Redux generator in InstallGenerator, and then modify
add_redux_specific_messages to check shakapacker_setup_incomplete? and either
suppress the success message and call
GeneratorMessages.add_warning(incomplete_installation_message) or delegate to
add_post_install_message when incomplete instead of unconditionally logging
success.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 181b5c87-76ac-4f43-87bf-ddda57de95bd
📒 Files selected for processing (2)
react_on_rails/lib/generators/react_on_rails/install_generator.rbreact_on_rails/spec/react_on_rails/generators/install_generator_spec.rb
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
react_on_rails/spec/react_on_rails/generators/install_generator_spec.rb (1)
1664-1673: This spec doesn’t lock down the duplicate-message regression yet.It still passes if
invoke_generatorsstops forwardinginvoked_by_install: true, becauserun_generatorscallsadd_post_install_messageeither way. Please assert thatreact_on_rails:react_with_reduxis invoked withhash_including(invoked_by_install: true)somewhere around this path.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@react_on_rails/spec/react_on_rails/generators/install_generator_spec.rb` around lines 1664 - 1673, The spec must assert that the redux generator is invoked with invoked_by_install: true to catch the duplicate-message regression; update the example in install_generator_spec to expect the generator invocation that triggers react_on_rails:react_with_redux to include hash_including(invoked_by_install: true) (e.g. add an expectation around the call that ultimately calls react_on_rails:react_with_redux or the invocation helper used by run_generators/invoke_generators such that it verifies the args include invoked_by_install: true), while keeping the existing stubs for installation_prerequisites_met?, add_bin_scripts, and print_generator_messages.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@react_on_rails/lib/generators/react_on_rails/install_generator.rb`:
- Around line 333-347: The recovery banner method
incomplete_installation_message interpolates
GeneratorMessages.detect_package_manager directly, which can be nil; update it
to handle a nil return by using a fallback generic instruction (e.g. "install
your JavaScript dependencies" or "install dependencies") for step 3 instead of
"#{package_manager} install", so change the interpolation to use a conditional
based on detect_package_manager (reference incomplete_installation_message and
GeneratorMessages.detect_package_manager) and wrap the chosen string with
Rainbow like the other steps.
---
Nitpick comments:
In `@react_on_rails/spec/react_on_rails/generators/install_generator_spec.rb`:
- Around line 1664-1673: The spec must assert that the redux generator is
invoked with invoked_by_install: true to catch the duplicate-message regression;
update the example in install_generator_spec to expect the generator invocation
that triggers react_on_rails:react_with_redux to include
hash_including(invoked_by_install: true) (e.g. add an expectation around the
call that ultimately calls react_on_rails:react_with_redux or the invocation
helper used by run_generators/invoke_generators such that it verifies the args
include invoked_by_install: true), while keeping the existing stubs for
installation_prerequisites_met?, add_bin_scripts, and print_generator_messages.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 0ecf95f0-c393-4d59-a044-b6de02dac0ca
📒 Files selected for processing (3)
react_on_rails/lib/generators/react_on_rails/install_generator.rbreact_on_rails/lib/generators/react_on_rails/react_with_redux_generator.rbreact_on_rails/spec/react_on_rails/generators/install_generator_spec.rb
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/oss/migrating/rsc-troubleshooting.md (1)
378-392:⚠️ Potential issue | 🔴 CriticalThe
('use client')syntax is incorrect and will not work as a directive.JavaScript directive prologues (like
'use client'and'use strict') must be bare string literals without parentheses. Wrapping the string in parentheses converts it into an expression statement, which is a no-op and will not mark the file as a Client Component.The examples on lines 381 and 392 marked as "GOOD" will actually fail silently—React will treat these files as Server Components.
Proposed fix
// BAD: Directive after imports import { useState } from 'react'; -('use client'); // Too late -- will not work +'use client'; // Too late -- will not work // GOOD: Directive before everything (comments allowed above) -('use client'); +'use client'; import { useState } from 'react';// GOOD -('use client'); +'use client';🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/oss/migrating/rsc-troubleshooting.md` around lines 378 - 392, The examples use parentheses and backticks around the directive (e.g., "('use client')" and "`use client`"), which turn the directive into an expression and will not mark the file as a Client Component; replace every occurrence of ("('use client')") with a bare string literal "'use client'" as the very first statement (comments allowed above) and replace any backticked `use client` examples with the bare quoted form "'use client'"; ensure the "GOOD" examples and the "Must Use Quotes, Not Backticks" section show the directive as a bare string literal at top of file (no parentheses, no backticks).
🧹 Nitpick comments (1)
react_on_rails/lib/generators/react_on_rails/install_generator.rb (1)
334-336: Consider exposingdetect_package_managerpublicly instead of usingsend.Calling a private method via
send(:detect_package_manager)bypasses encapsulation. Since this method is now needed by multiple callers (react_with_redux_generator.rbat lines 91-93 and here), consider making it a public class method onGeneratorMessages.Sketch
# In generator_messages.rb -private - -def detect_package_manager +def self.detect_package_manager # ... end # In install_generator.rb -package_manager = GeneratorMessages.send(:detect_package_manager) +package_manager = GeneratorMessages.detect_package_manager🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@react_on_rails/lib/generators/react_on_rails/install_generator.rb` around lines 334 - 336, Make GeneratorMessages.detect_package_manager a public class method (remove or move it out of private scope) so callers can call it directly; then replace uses of GeneratorMessages.send(:detect_package_manager) in incomplete_installation_message and the calls in react_with_redux_generator (around the code that references lines 91-93) with GeneratorMessages.detect_package_manager. Ensure the method remains a class method (self.detect_package_manager) and update any tests or visibility modifiers accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@docs/oss/migrating/rsc-troubleshooting.md`:
- Around line 378-392: The examples use parentheses and backticks around the
directive (e.g., "('use client')" and "`use client`"), which turn the directive
into an expression and will not mark the file as a Client Component; replace
every occurrence of ("('use client')") with a bare string literal "'use client'"
as the very first statement (comments allowed above) and replace any backticked
`use client` examples with the bare quoted form "'use client'"; ensure the
"GOOD" examples and the "Must Use Quotes, Not Backticks" section show the
directive as a bare string literal at top of file (no parentheses, no
backticks).
---
Nitpick comments:
In `@react_on_rails/lib/generators/react_on_rails/install_generator.rb`:
- Around line 334-336: Make GeneratorMessages.detect_package_manager a public
class method (remove or move it out of private scope) so callers can call it
directly; then replace uses of GeneratorMessages.send(:detect_package_manager)
in incomplete_installation_message and the calls in react_with_redux_generator
(around the code that references lines 91-93) with
GeneratorMessages.detect_package_manager. Ensure the method remains a class
method (self.detect_package_manager) and update any tests or visibility
modifiers accordingly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 605a356c-1c4d-4b6e-af26-7293fbc1a15d
📒 Files selected for processing (4)
docs/README.mddocs/oss/migrating/rsc-troubleshooting.mdreact_on_rails/lib/generators/react_on_rails/install_generator.rbreact_on_rails/spec/react_on_rails/generators/install_generator_spec.rb
✅ Files skipped from review due to trivial changes (1)
- docs/README.md
🚧 Files skipped from review as they are similar to previous changes (1)
- react_on_rails/spec/react_on_rails/generators/install_generator_spec.rb
ReviewThe core fix (tracking Blocking
Non-blocking
|
|
Overall: solid fix. Minor concerns posted as inline comments. |
Review SummaryThe fix is correct and well-scoped. Tracking Logic / Design
Pretend mode + incomplete setup: In Code Style
TestsGood coverage of the new paths. One minor note: the new unit-test specs ( Overall this is a solid, low-risk fix. The three inline comments are all minor. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
react_on_rails/spec/react_on_rails/generators/install_generator_spec.rb (1)
1639-1660: Extract repeated simulated Shakapacker fixture setup into a helper.Both examples repeat the same 4
simulate_existing_filecalls; pulling this into a local helper would reduce duplication and simplify future updates.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@react_on_rails/spec/react_on_rails/generators/install_generator_spec.rb` around lines 1639 - 1660, The tests repeat four simulate_existing_file calls to stub Shakapacker artifacts; extract those into a helper method (e.g., define a private helper like shakapacker_fixtures or add_shakapacker_files) and call it from both examples inside the run_generator_test_with_args blocks; update the two specs that currently call simulate_existing_file("bin/shakapacker"...), simulate_existing_file("bin/shakapacker-dev-server"...), simulate_existing_file("config/shakapacker.yml"...), and simulate_existing_file("config/webpack/webpack.config.js"...) to invoke the new helper instead so the duplicated setup is centralized and easier to maintain.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@react_on_rails/spec/react_on_rails/generators/install_generator_spec.rb`:
- Around line 1639-1660: The tests repeat four simulate_existing_file calls to
stub Shakapacker artifacts; extract those into a helper method (e.g., define a
private helper like shakapacker_fixtures or add_shakapacker_files) and call it
from both examples inside the run_generator_test_with_args blocks; update the
two specs that currently call simulate_existing_file("bin/shakapacker"...),
simulate_existing_file("bin/shakapacker-dev-server"...),
simulate_existing_file("config/shakapacker.yml"...), and
simulate_existing_file("config/webpack/webpack.config.js"...) to invoke the new
helper instead so the duplicated setup is centralized and easier to maintain.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ac626ea1-3123-4f88-895c-4af1adbc8e4f
📒 Files selected for processing (1)
react_on_rails/spec/react_on_rails/generators/install_generator_spec.rb
Review: Fix #2600 – incomplete install message after Shakapacker failureOverall this is a clean, well-scoped fix. The Logic gap: gemfile-add failure path doesn't set the flag directly
Minor duplication between
|
Review: Fix #2600 — incomplete install message after Shakapacker failureOverall this is a well-structured fix with good test coverage. The core logic (tracking A few things worth addressing: Minor issuesTest regex excludes
Positive notes
|
| @@ -1660,6 +1666,105 @@ class ActiveSupport::TestCase | |||
| expect(output_text).to match(/bundle && (npm|yarn|pnpm) install/) | |||
There was a problem hiding this comment.
This regex doesn't include bun, so the test would fail if the test environment has a bun.lock or bun.lockb file. The same issue exists on line 1650 in the base generator test. Now that Bun is detected in detect_package_manager, the expected install command could be bun install.
| expect(output_text).to match(/bundle && (npm|yarn|pnpm) install/) | |
| expect(output_text).to match(/bundle && (npm|yarn|pnpm|bun) install/) |
| flags << "--rsc" | ||
| elsif options.pro? | ||
| flags << "--pro" | ||
| end |
There was a problem hiding this comment.
If --pro and --rsc are both specified, --pro is silently dropped from the recovery command. If this combination is valid/supported, users would be instructed to re-run without --pro, potentially getting a different install outcome.
If --pro and --rsc are mutually exclusive, a comment here (or a guard in the option parsing) would make this explicit. If they can coexist, consider:
| end | |
| if use_rsc? | |
| flags << "--rsc" | |
| flags << "--pro" if options.pro? | |
| elsif options.pro? | |
| flags << "--pro" | |
| end |
…2613) ## Summary - track when automatic Shakapacker installation fails during `react_on_rails:install` - suppress the final success banner in that case - emit explicit "installation incomplete" guidance instead (without suggesting `./bin/dev`) - add regression tests for failed Shakapacker install flow and incomplete-message behavior ## Why Fixes #2600: with `--ignore-warnings`, a failed `shakapacker:install` previously still ended with `🎉 React on Rails Successfully Installed!`, which was misleading when required Shakapacker files were missing. ## Testing - `bundle exec rspec react_on_rails/spec/react_on_rails/generators/install_generator_spec.rb:1660 react_on_rails/spec/react_on_rails/generators/install_generator_spec.rb:1895` - `bundle exec rubocop react_on_rails/lib/generators/react_on_rails/install_generator.rb react_on_rails/spec/react_on_rails/generators/install_generator_spec.rb` <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: changes are limited to installer messaging/flow control around Shakapacker setup failure, with regression tests covering the new behavior. > > **Overview** > Prevents `react_on_rails:install` from printing the final “Successfully Installed” guidance when automatic `shakapacker:install` fails, by tracking an `@shakapacker_setup_incomplete` state. > > When setup is incomplete, the generator now emits a dedicated warning message with manual recovery steps (bundle/shakapacker install + JS package install) and advises against running `./bin/dev`; specs add coverage for both the incomplete-message path and the failure flag being set. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 9a4eb58. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Installer now reports incomplete Shakapacker setup with a clear next-steps warning; post-install messaging is consistently shown when prerequisites pass. * When Redux is selected during install via the installer flow, redundant post-install instructions are suppressed. * Installer guidance now uses the detected package manager for accurate install commands. * **Tests** * Added coverage for incomplete-installation scenarios and installer-invoked Redux behavior. * **Documentation** * Cosmetic formatting and minor troubleshooting clarity updates. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: ihabadham <[email protected]>
…2613) ## Summary - track when automatic Shakapacker installation fails during `react_on_rails:install` - suppress the final success banner in that case - emit explicit "installation incomplete" guidance instead (without suggesting `./bin/dev`) - add regression tests for failed Shakapacker install flow and incomplete-message behavior ## Why Fixes #2600: with `--ignore-warnings`, a failed `shakapacker:install` previously still ended with `🎉 React on Rails Successfully Installed!`, which was misleading when required Shakapacker files were missing. ## Testing - `bundle exec rspec react_on_rails/spec/react_on_rails/generators/install_generator_spec.rb:1660 react_on_rails/spec/react_on_rails/generators/install_generator_spec.rb:1895` - `bundle exec rubocop react_on_rails/lib/generators/react_on_rails/install_generator.rb react_on_rails/spec/react_on_rails/generators/install_generator_spec.rb` <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: changes are limited to installer messaging/flow control around Shakapacker setup failure, with regression tests covering the new behavior. > > **Overview** > Prevents `react_on_rails:install` from printing the final “Successfully Installed” guidance when automatic `shakapacker:install` fails, by tracking an `@shakapacker_setup_incomplete` state. > > When setup is incomplete, the generator now emits a dedicated warning message with manual recovery steps (bundle/shakapacker install + JS package install) and advises against running `./bin/dev`; specs add coverage for both the incomplete-message path and the failure flag being set. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 9a4eb58. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Installer now reports incomplete Shakapacker setup with a clear next-steps warning; post-install messaging is consistently shown when prerequisites pass. * When Redux is selected during install via the installer flow, redundant post-install instructions are suppressed. * Installer guidance now uses the detected package manager for accurate install commands. * **Tests** * Added coverage for incomplete-installation scenarios and installer-invoked Redux behavior. * **Documentation** * Cosmetic formatting and minor troubleshooting clarity updates. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: ihabadham <[email protected]>


Summary
react_on_rails:install./bin/dev)Why
Fixes #2600: with
--ignore-warnings, a failedshakapacker:installpreviously still ended with🎉 React on Rails Successfully Installed!, which was misleading when required Shakapacker files were missing.Testing
bundle exec rspec react_on_rails/spec/react_on_rails/generators/install_generator_spec.rb:1660 react_on_rails/spec/react_on_rails/generators/install_generator_spec.rb:1895bundle exec rubocop react_on_rails/lib/generators/react_on_rails/install_generator.rb react_on_rails/spec/react_on_rails/generators/install_generator_spec.rbNote
Low Risk
Low risk: changes are limited to installer messaging/flow control around Shakapacker setup failure, with regression tests covering the new behavior.
Overview
Prevents
react_on_rails:installfrom printing the final “Successfully Installed” guidance when automaticshakapacker:installfails, by tracking an@shakapacker_setup_incompletestate.When setup is incomplete, the generator now emits a dedicated warning message with manual recovery steps (bundle/shakapacker install + JS package install) and advises against running
./bin/dev; specs add coverage for both the incomplete-message path and the failure flag being set.Written by Cursor Bugbot for commit 9a4eb58. Configure here.
Summary by CodeRabbit
Bug Fixes
Tests
Documentation