Skip to content

Commit eade3f4

Browse files
justin808claude
andcommitted
fix(pro-dummy): address PR #3200 review feedback
Applies reviewer suggestions against the manual validation workflow so the guide matches the actual supported Ruby range, the freshness check is accurate, and the convenience scripts mirror the Procfile invocation. - docs: broaden Ruby guidance (3.3.x baseline, 3.4.8 verified, 3.5+ via explicit ostruct/logger/benchmark gems); move `mise shell ruby@3.3.7` under an "Optional fallback" block so 3.4.x users see the right path. - docs: replace unreliable directory-level `ls -la` mtime comparison with a per-file `find ... -newer ...` check, and update the report template to match. - Procfile.dev: note foreman/overmind concurrency caveat when uncommenting `node-renderer-build` (wait for first build-watch compile on first run). - package.json: add `node-renderer:debug` colon alias for naming consistency; align `node-renderer:fresh` flags with the Procfile.dev entry (`RENDERER_LOG_LEVEL=debug`, `--inspect`). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 48636a2 commit eade3f4

3 files changed

Lines changed: 18 additions & 10 deletions

File tree

.claude/docs/validating-node-renderer-changes.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,19 @@ If your PR touches **any** of these, run through the checklist below:
2121

2222
## Pre-flight: Toolchain
2323

24-
The Pro dummy app requires Ruby 3.3.x. If you are on a newer Ruby (3.5+), the dummy's
25-
Gemfile already pulls in `ostruct`, `logger`, and `benchmark` as explicit gems to silence
26-
warnings, but you may still hit unrelated incompatibilities. When in doubt, switch to the
27-
documented Ruby version:
24+
Ruby 3.3.x is the documented baseline for the Pro dummy app, and this workflow
25+
has also been verified on Ruby 3.4.8. On Ruby 3.5+, the dummy's Gemfile pulls in
26+
`ostruct`, `logger`, and `benchmark` as explicit gems for stdlib compatibility.
27+
If a newer Ruby hits unrelated incompatibilities, fall back to the documented
28+
Ruby version.
2829

2930
```bash
30-
mise use ruby@3.3.7 # or rbenv/asdf equivalent
3131
cd react_on_rails_pro/spec/dummy
3232
bundle install
33+
34+
# Optional fallback if your local Ruby fails:
35+
mise shell ruby@3.3.7 # or rbenv/asdf equivalent
36+
bundle install
3337
```
3438

3539
## Step 1: Rebuild the Renderer Package
@@ -97,9 +101,10 @@ For each route:
97101

98102
It is easy to validate stale lib output without realizing it. Confirm:
99103

100-
- [ ] `lib/` mtime is newer than the `src/` file you changed (compare
101-
`ls -la packages/react-on-rails-pro-node-renderer/lib/` against
102-
`ls -la packages/react-on-rails-pro-node-renderer/src/`)
104+
- [ ] The built `lib/` file corresponding to your edit is newer than the `src/`
105+
file you changed. Compare the specific files with `stat` or use a
106+
per-file freshness check, for example:
107+
`find packages/react-on-rails-pro-node-renderer/lib -newer packages/react-on-rails-pro-node-renderer/src/<changed-file>.ts | head`
103108
- [ ] If you used watch mode, you saw a rebuild line in the watcher output after your
104109
most recent edit
105110
- [ ] Restart the `node-renderer` Procfile process after the rebuild — `node` does not
@@ -111,7 +116,7 @@ It is easy to validate stale lib output without realizing it. Confirm:
111116
## Node Renderer Validation
112117

113118
- [x] Rebuilt `react-on-rails-pro-node-renderer` package
114-
- [x] Verified `lib/` mtime newer than `src/` after edit
119+
- [x] Verified the rebuilt `lib/` file is newer than the changed `src/` file
115120
- [x] `bin/dev` starts cleanly
116121
- [x] `/stream_native_metadata` renders without errors
117122
- [x] `/hybrid_metadata_streaming` renders without errors

react_on_rails_pro/spec/dummy/Procfile.dev

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,7 @@ rails-rsc-assets: HMR=true RSC_BUNDLE_ONLY=true bin/shakapacker --watch
1515
# When validating source changes under `packages/react-on-rails-pro-node-renderer/src/**`,
1616
# either rebuild once (`pnpm --filter react-on-rails-pro-node-renderer run build`) or
1717
# uncomment the `node-renderer-build` line below to watch and rebuild on every save.
18+
# Foreman/overmind starts processes concurrently, so on first use wait for the initial
19+
# build-watch compile or restart `node-renderer` before trusting renderer output.
1820
# node-renderer-build: pnpm --filter react-on-rails-pro-node-renderer run build-watch
1921
node-renderer: RENDERER_LOG_LEVEL=debug RENDERER_PORT=3800 node --inspect renderer/node-renderer.js

react_on_rails_pro/spec/dummy/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,9 @@
105105
"build:server": "RAILS_ENV=production NODE_ENV=production SERVER=true bin/shakapacker",
106106
"build:clean": "rm -rf public/webpack && rm -rf ssr-generated || true",
107107
"node-renderer-debug": "RENDERER_PORT=3800 ndb renderer/node-renderer.js",
108+
"node-renderer:debug": "RENDERER_PORT=3800 ndb renderer/node-renderer.js",
108109
"node-renderer": "RENDERER_PORT=3800 node renderer/node-renderer.js",
109-
"node-renderer:fresh": "pnpm --filter react-on-rails-pro-node-renderer run build && RENDERER_PORT=3800 node renderer/node-renderer.js",
110+
"node-renderer:fresh": "pnpm --filter react-on-rails-pro-node-renderer run build && RENDERER_LOG_LEVEL=debug RENDERER_PORT=3800 node --inspect renderer/node-renderer.js",
110111
"node-renderer:build-watch": "pnpm --filter react-on-rails-pro-node-renderer run build-watch"
111112
},
112113
"license": "UNLICENSED",

0 commit comments

Comments
 (0)