Skip to content

Commit 6b80d55

Browse files
committed
Address review feedback on LLM migration prompt docs
1 parent 2129a1d commit 6b80d55

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ While ShakaCode will continue to support this gem, you might consider migrating
2121
Why? React on Rails code receives much more active development and testing. For example, consider the [ReactRailsUJS](https://github.com/reactjs/react-rails/blob/main/react_ujs/index.js) implementation compared to the [ReactOnRails Node package](https://github.com/shakacode/react_on_rails/tree/master/node_package) which is written in TypeScript. For another example, React on Rails has work underway to support the latest React features, such as [React Server Components](https://react.dev/reference/rsc/server-components).
2222

2323
You can find [migration to React on Rails steps here](https://github.com/reactjs/react-rails/blob/main/docs/migrating-from-react-rails-to-react_on_rails.md).
24+
2425
For the fastest path, try the [LLM-assisted migration prompt](https://github.com/reactjs/react-rails/blob/main/docs/migrating-from-react-rails-to-react_on_rails.md#llm-assisted-migration-prompt).
2526

2627
---

docs/migrating-from-react-rails-to-react_on_rails.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,13 @@ You can also check [react-rails-to-react-on-rails](https://github.com/shakacode/
6666

6767
You can usually do a safe first-pass migration quickly with a coding assistant. Give it this prompt:
6868

69+
If your assistant cannot browse URLs, paste this migration guide content directly into the prompt context before running the template.
70+
6971
```text
7072
You are a senior Rails + React engineer. Migrate this app from react-rails to react_on_rails.
7173

74+
Before starting, ask me for the relevant files (at minimum: Gemfile, package.json, JS entrypoints, config/initializers, and representative react_component usages).
75+
7276
Use this guide as the source of truth:
7377
https://github.com/reactjs/react-rails/blob/main/docs/migrating-from-react-rails-to-react_on_rails.md
7478

@@ -85,7 +89,7 @@ Requirements:
8589
- show commands run
8690
- show exact files changed
8791
4. Do not remove behavior unless you explain the replacement.
88-
5. Run tests/lint after each phase and report failures before continuing.
92+
5. After each phase, tell me the exact test/lint commands to run and wait for my output before continuing.
8993
6. End with:
9094
- a migration checklist
9195
- rollback steps
@@ -94,7 +98,7 @@ Requirements:
9498
- if `rails g react_on_rails:install` fails to install JS deps, run the install commands shown by the generator
9599
- remove leftover `react_ujs` / `ReactRailsUJS` references
96100
- remove or replace stale `server_rendering.js` entries if present
97-
- run `bundle exec rails shakapacker:compile` and fix compile errors before finalizing
101+
- if using Shakapacker, run `bundle exec rails shakapacker:compile` and fix compile errors before finalizing
98102
```
99103

100104
Review all generated diffs before merging.

0 commit comments

Comments
 (0)