Skip to content

Pin Pro react-on-rails-rsc peer to an explicit ^19.0.5 range (#3965)#4082

Merged
justin808 merged 3 commits into
mainfrom
jg/3965-rsc-peer-range
Jun 18, 2026
Merged

Pin Pro react-on-rails-rsc peer to an explicit ^19.0.5 range (#3965)#4082
justin808 merged 3 commits into
mainfrom
jg/3965-rsc-peer-range

Conversation

@justin808

@justin808 justin808 commented Jun 17, 2026

Copy link
Copy Markdown
Member

Why

packages/react-on-rails-pro/package.json declared the optional peer "react-on-rails-rsc": "*". The wildcard accepts any version — including pre-19.0.5 builds that lack the RSC CSS FOUC fix, and a future major (20.x) — and, because semver * never matches prereleases, RC rollouts already require explicit overrides. So * provided no convenience while admitting known-bad floors.

This replaces "*" with an explicit ^19.0.5 (= >=19.0.5 <20.0.0):

  • Floor 19.0.5 — the RSC CSS FOUC fix requirement (the stable pin landed in RSC FOUC: ship stable react-on-rails-rsc@19.0.5 and pin v17 to it (native-only) #3634), so pre-FOUC builds are excluded.
  • Ceiling <20.0.0 — a new react-on-rails-rsc major is a deliberate, reviewed bump rather than silently accepted.
  • Within the 19.x line (19.0.x, 19.2.x, …), the actual per-version compatibility gate is the Pro node-renderer runtime version check (rscPeerSupport.ts, which tiers rsc 19.0.x↔react 19.0.4+ and rsc 19.2.x↔react 19.2.7+), not this advisory optional peer range. ^19.0.5 intentionally admits the supported 19.2.x line so the React 19.2 path isn't blocked by a peer warning.

No regression to the React 19.2 soak

The in-repo Pro/RSC dummy resolves react-on-rails-rsc@19.2.0-rc.1 (a prerelease) via a direct dependency + pnpm override. Both "*" and ^19.0.5 exclude prereleases by semver, so resolution is unchanged: pnpm install produces zero react-on-rails-rsc peer warnings before and after, and pnpm-lock.yaml is byte-identical (md5 unchanged).

Changes

  • packages/react-on-rails-pro/package.json: peer react-on-rails-rsc "*""^19.0.5" (stays optional; devDependency untouched).
  • docs/pro/react-server-components/upgrading-existing-pro-app.md: note documenting the floor/ceiling meaning and that the runtime version check is the real per-version gate. llms-full-pro.txt regenerated to match.
  • CHANGELOG.md: [Unreleased] entry.

Validation (local, all green)

  • pnpm run type-check, pnpm run lint, prettier --check, script/check-docs-sidebar: clean.
  • Lockfile unchanged; no new peer warnings vs the "*" baseline.

Notes

Fixes #3965


Note

Low Risk
Metadata and documentation only; optional peer range is advisory and does not change runtime RSC rendering logic.

Overview
Replaces the Pro package’s optional react-on-rails-rsc peer dependency from "*" with ^19.0.5 (>= 19.0.5 < 20.0.0), so npm/pnpm installs are advised against pre-FOUC 19.x builds and against an unreviewed 20.x major while still allowing supported 19.1+ / 19.2.x within the line.

RSC upgrade docs (and regenerated llms-full-pro.txt) now separate the generator’s exact 19.0.5 app pin from this broader Pro peer range, and note that rscPeerSupport.ts runtime checks remain the real per-version gate. CHANGELOG.md records the change under [Unreleased].

Reviewed by Cursor Bugbot for commit 09a5c25. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • Changed

    • Updated the Pro package’s optional React Server Components peer dependency from "*" to ^19.0.5 (advisory >= 19.0.5 < 20.0.0).
  • Documentation

    • Clarified the reason and expected behavior of the new peer range, including the 19.0.5 minimum, the ceiling before 20.0.0, and that actual per-Version compatibility is verified through runtime checks rather than the peer range alone.

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d10025f4-ed22-4050-b64c-782bd31e8f6c

📥 Commits

Reviewing files that changed from the base of the PR and between c16a723 and 09a5c25.

📒 Files selected for processing (2)
  • docs/pro/react-server-components/upgrading-existing-pro-app.md
  • llms-full-pro.txt
✅ Files skipped from review due to trivial changes (2)
  • docs/pro/react-server-components/upgrading-existing-pro-app.md
  • llms-full-pro.txt

Walkthrough

The Pro package's optional react-on-rails-rsc peer dependency is narrowed from "*" to "^19.0.5". Supporting notes are added to the RSC upgrade guide, CHANGELOG, and llms-full-pro.txt explaining the explicit pin and the deliberate review process for future bumps.

Changes

Pin react-on-rails-rsc peer dependency to ^19.0.5

Layer / File(s) Summary
package.json peer dep + changelog
packages/react-on-rails-pro/package.json, CHANGELOG.md
peerDependencies.react-on-rails-rsc changed from "*" to "^19.0.5"; CHANGELOG records the change with issue and PR references.
Upgrade guide and LLM reference notes
docs/pro/react-server-components/upgrading-existing-pro-app.md, llms-full-pro.txt
Admonition note added to the Pro RSC upgrade guide and a matching note in llms-full-pro.txt explaining the ^19.0.5 floor and that the React 19.2.x line bump is a deliberate, reviewed change.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related issues

  • #3965 – Pin react-on-rails-rsc to an explicit version range in packages/react-on-rails-pro: This PR directly implements the primary task from that issue, replacing "*" with ^19.0.5 and adding the requested documentation of the version coupling.

Possibly related PRs

  • shakacode/react_on_rails#3580: Both PRs update packages/react-on-rails-pro/package.json's peerDependencies.react-on-rails-rsc range, directly related version management for the Pro package.
  • shakacode/react_on_rails#3616: Both PRs directly modify the Pro package's peerDependencies.react-on-rails-rsc constraint with opposite intent: this PR tightens *^19.0.5 while that PR loosened a specific range → *.
  • shakacode/react_on_rails#3732: Provides documentation and testing clarifications around the react-on-rails-rsc 19.0.5 compatibility policy, especially in the shared docs/pro/react-server-components/upgrading-existing-pro-app.md guidance.

Suggested labels

documentation, P2, needs-review

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: pinning the react-on-rails-rsc peer dependency to an explicit ^19.0.5 range, with issue reference.
Linked Issues check ✅ Passed All coding requirements from #3965 are met: peer dependency explicitly pinned to ^19.0.5, dummy app passes RSC specs, and documentation added explaining version coupling.
Out of Scope Changes check ✅ Passed All changes directly support the pinning objective: package.json update, documentation clarification, CHANGELOG entry, and llms-full-pro.txt regeneration are all in-scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jg/3965-rsc-peer-range

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issue.

Reviewed by Cursor Bugbot for commit c70ff97. Configure here.

Comment thread packages/react-on-rails-pro/package.json
Comment thread CHANGELOG.md Outdated
Comment thread docs/pro/react-server-components/upgrading-existing-pro-app.md Outdated
@greptile-apps

greptile-apps Bot commented Jun 17, 2026

Copy link
Copy Markdown

Greptile Summary

This PR replaces the wildcard "*" peer dependency for react-on-rails-rsc in packages/react-on-rails-pro/package.json with an explicit "^19.0.5" range, encoding the FOUC floor and ensuring future major-version moves are deliberate reviewed changes. Documentation and the LLM corpus are updated to explain the constraint, and a CHANGELOG.md entry is added.

  • packages/react-on-rails-pro/package.json: react-on-rails-rsc peer changed from \"*\" to \"^19.0.5\"; the optional: true metadata and devDependency pin are untouched.
  • docs/ + llms-full-pro.txt: A new callout note documents the peer range and its intent, though the wording incorrectly implies 19.2.x stable requires a manual bump when ^19.0.5 admits it automatically.
  • CHANGELOG.md: Unreleased entry added, but the PR link points to pull/3965 (the issue number) rather than the actual PR pull/4082.

Confidence Score: 4/5

Safe to merge — the actual package.json change is a one-liner with no runtime impact, and both findings are in documentation/changelog text only.

The core change is straightforward and validated by the author (lockfile unchanged, zero new peer warnings). Two issues exist in prose: a wrong PR number in the changelog and a misleading docs note that says 19.2.x requires a deliberate bump while ^19.0.5 actually admits it automatically. Neither affects runtime behaviour, but the docs inaccuracy could confuse future maintainers about when the peer range needs updating.

The docs note in docs/pro/react-server-components/upgrading-existing-pro-app.md (and its mirror in llms-full-pro.txt) needs a small reword; CHANGELOG.md needs the PR link corrected from pull/3965 to pull/4082.

Important Files Changed

Filename Overview
packages/react-on-rails-pro/package.json Single-line peer dependency change from wildcard "*" to "^19.0.5" for react-on-rails-rsc; optional: true metadata and devDependency pin are untouched.
CHANGELOG.md Adds [Unreleased] entry; the PR link incorrectly references pull/3965 (the issue) instead of the actual PR pull/4082.
docs/pro/react-server-components/upgrading-existing-pro-app.md Adds a callout note about the peer range, but the note's claim that adopting React 19.2.x react-on-rails-rsc is a deliberate reviewed change is inaccurate — ^19.0.5 admits it automatically.
llms-full-pro.txt Regenerated LLM corpus; carries the same inaccurate note from upgrading-existing-pro-app.md.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["Consumer installs react-on-rails-pro"] --> B{"react-on-rails-rsc peer declared?"}
    B -- "optional peer ^19.0.5" --> C{"Installed version satisfies ^19.0.5?"}
    C -- "19.0.5 <= v < 20.0.0 stable" --> D["Peer satisfied"]
    C -- "prerelease or < 19.0.5 or >= 20" --> E["Peer not satisfied (optional, no hard error)"]
    C -- "not installed" --> F["Optional, silently skipped"]
    D --> G["RSC features available"]
    E --> H["Consumer must add override or exact pin"]
    F --> I["RSC features disabled"]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A["Consumer installs react-on-rails-pro"] --> B{"react-on-rails-rsc peer declared?"}
    B -- "optional peer ^19.0.5" --> C{"Installed version satisfies ^19.0.5?"}
    C -- "19.0.5 <= v < 20.0.0 stable" --> D["Peer satisfied"]
    C -- "prerelease or < 19.0.5 or >= 20" --> E["Peer not satisfied (optional, no hard error)"]
    C -- "not installed" --> F["Optional, silently skipped"]
    D --> G["RSC features available"]
    E --> H["Consumer must add override or exact pin"]
    F --> I["RSC features disabled"]
Loading

Reviews (1): Last reviewed commit: "Pin Pro react-on-rails-rsc peer to an ex..." | Re-trigger Greptile

Comment thread CHANGELOG.md
Comment thread docs/pro/react-server-components/upgrading-existing-pro-app.md Outdated
@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
react-on-rails/client bundled (gzip) 62.83 KB (0%)
react-on-rails/client bundled (gzip) (time) 62.83 KB (0%)
react-on-rails/client bundled (brotli) 53.9 KB (0%)
react-on-rails/client bundled (brotli) (time) 53.9 KB (0%)
react-on-rails-pro/client bundled (gzip) 64.27 KB (0%)
react-on-rails-pro/client bundled (gzip) (time) 64.27 KB (0%)
react-on-rails-pro/client bundled (brotli) 55.21 KB (0%)
react-on-rails-pro/client bundled (brotli) (time) 55.21 KB (0%)
registerServerComponent/client bundled (gzip) 74.43 KB (0%)
registerServerComponent/client bundled (gzip) (time) 74.43 KB (0%)
registerServerComponent/client bundled (brotli) 64.04 KB (0%)
registerServerComponent/client bundled (brotli) (time) 64.04 KB (0%)
wrapServerComponentRenderer/client bundled (gzip) 67.23 KB (0%)
wrapServerComponentRenderer/client bundled (gzip) (time) 67.23 KB (0%)
wrapServerComponentRenderer/client bundled (brotli) 57.67 KB (0%)
wrapServerComponentRenderer/client bundled (brotli) (time) 57.67 KB (0%)

@claude

claude Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Code Review: Pin Pro react-on-rails-rsc peer to ^19.0.5

Overview

Small, targeted metadata-only change with a clear rationale: replacing "*" with ^19.0.5 encodes the FOUC floor from #3634 and prevents silent adoption of incompatible future major releases. The lockfile is unchanged and no runtime code is touched. Two issues flagged (inline comments also posted):

Bug — CHANGELOG PR link is wrong (blocking)

The CHANGELOG entry links [PR 3965] pointing to /pull/3965, but this PR's number is #4082. The issue link is correct; only the PR link is wrong. Inline suggestion posted on CHANGELOG.md line 29.

Documentation wording concern (non-blocking)

The new note in upgrading-existing-pro-app.md says "It tracks the React 19.0.x runtime line", which overstates the restriction. ^19.0.5 covers all of 19.x.x >= 19.0.5 — including 19.1.0, 19.2.0, 19.3.0, etc. A user with react-on-rails-rsc@19.2.0 stable already satisfies this range; the peer metadata alone does not gate adoption of 19.2.x. The real gate is the generator + documented exact install pin, not the semver range. Inline suggestion posted on the docs line.

Minor observation (no action required)

Neither the devDependency (19.0.5-rc.7) nor the pro dummy workspace override (19.2.0-rc.1) satisfies ^19.0.5, because semver caret ranges exclude prereleases. This is expected — the PR correctly notes pnpm produces zero peer warnings because the dep is optional. Worth noting in case a future contributor is puzzled by the mismatch in the lockfile.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@CHANGELOG.md`:
- Line 29: The CHANGELOG entry for the RSC peer wildcard change contains
misleading wording that suggests future 19.x releases require reviewed PRs, when
in fact the caret range `^19.0.5` allows automatic adoption of any 19.x stable
release. Revise the wording to clarify that this change sets a minimum version
floor while still permitting auto-matching of subsequent 19.x releases, and
emphasize that the key benefit is preventing silent auto-adoption of future
major versions (like 20.0.0) without explicit review and approval.

In `@docs/pro/react-server-components/upgrading-existing-pro-app.md`:
- Around line 39-40: The documentation note incorrectly describes the semver
policy of the `^19.0.5` peer range. The current text claims it "tracks the React
19.0.x runtime line" but this is inaccurate since `^19.0.5` actually permits any
19.x release greater than or equal to 19.0.5 (including 19.1.x, 19.2.x, etc.).
Reword the note to accurately reflect that the caret range allows later stable
19.x releases, and ensure it clearly emphasizes that bumping the peer range is a
deliberate, reviewed change made in coordination with generator and React range
updates, not an automatic adoption of future releases.

In `@llms-full-pro.txt`:
- Around line 8115-8116: The wording "It tracks the React 19.0.x runtime line"
in the NOTE section about the `react-on-rails-rsc` peer range is misleading
because the semver specification `^19.0.5` actually permits any 19.x release
(including 19.1.x, 19.2.x, and beyond) up to but not including 20.0.0, not just
versions in the 19.0.x line. Clarify this by replacing the sentence to
explicitly state that the peer range allows later stable 19.x releases while
keeping 19.0.5 as the minimum floor, making it clear that bumping to 19.2.x (or
future 19.x versions) falls within the existing semver constraints rather than
being an expansion of the range itself.
🪄 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: 0c4a0ac2-2825-4bcc-8a7d-e4339deafbad

📥 Commits

Reviewing files that changed from the base of the PR and between 1bf4695 and c70ff97.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • docs/pro/react-server-components/upgrading-existing-pro-app.md
  • llms-full-pro.txt
  • packages/react-on-rails-pro/package.json

Comment thread CHANGELOG.md Outdated
Comment thread docs/pro/react-server-components/upgrading-existing-pro-app.md Outdated
Comment thread llms-full-pro.txt Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c70ff9783c

ℹ️ 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".

Comment thread packages/react-on-rails-pro/package.json
justin808 added a commit that referenced this pull request Jun 17, 2026
Address review-bot wording-accuracy feedback (claude, greptile,
coderabbit). The `"*"` -> `^19.0.5` peer change itself is correct and
unchanged; only the prose describing it was inaccurate.

`^19.0.5` means `>= 19.0.5 < 20.0.0`, which admits ALL of `19.x >=
19.0.5` (including `19.1.x` and `19.2.x`). It does not "track the React
19.0.x runtime line" and does not gate `19.2.x` behind review.

- Docs note: reworded to describe the advisory range accurately — floor
  at `19.0.5` (RSC CSS FOUC fix), ceiling below `20.0.0` (a new
  react-on-rails-rsc major is a deliberate, reviewed bump), and that
  within `19.x` the real per-version compatibility gate is the Pro node
  renderer runtime version check (rscPeerSupport.ts: rsc 19.0.x<->react
  19.0.4+, rsc 19.2.x<->react 19.2.7+), not this peer range.
- CHANGELOG: same accurate framing; fixed the PR link from /pull/3965
  (the issue) to PR 4082 while keeping Fixes Issue 3965.
- Regenerated llms-full-pro.txt to mirror the doc change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
justin808 and others added 2 commits June 17, 2026 15:48
Replace the Pro npm package's optional react-on-rails-rsc peer wildcard
"*" with an explicit "^19.0.5" range. The wildcard auto-adopted any
future stable react-on-rails-rsc (including a future 19.2.x line with a
different React peer requirement) with no coordinated review, and "*"
never matched prereleases anyway. The ^19.0.5 range encodes the RSC CSS
FOUC floor (>= 19.0.5), admits the future 19.2.x stable line within
major 19, and excludes < 19.0.5 and 20+. peerDependenciesMeta stays
optional: true and the devDependencies pin is untouched.

Both "*" and "^19.0.5" exclude prereleases by semver, so the in-repo
Pro/RSC dummy (which resolves react-on-rails-rsc@19.2.0-rc.1 via a
direct dependency + pnpm override) is unaffected: pnpm install produces
no new peer warning and pnpm-lock.yaml is unchanged.

Document the version coupling in the Pro RSC upgrade guide and add an
Unreleased CHANGELOG entry. Regenerate llms-full-pro.txt to mirror the
doc change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Address review-bot wording-accuracy feedback (claude, greptile,
coderabbit). The `"*"` -> `^19.0.5` peer change itself is correct and
unchanged; only the prose describing it was inaccurate.

`^19.0.5` means `>= 19.0.5 < 20.0.0`, which admits ALL of `19.x >=
19.0.5` (including `19.1.x` and `19.2.x`). It does not "track the React
19.0.x runtime line" and does not gate `19.2.x` behind review.

- Docs note: reworded to describe the advisory range accurately — floor
  at `19.0.5` (RSC CSS FOUC fix), ceiling below `20.0.0` (a new
  react-on-rails-rsc major is a deliberate, reviewed bump), and that
  within `19.x` the real per-version compatibility gate is the Pro node
  renderer runtime version check (rscPeerSupport.ts: rsc 19.0.x<->react
  19.0.4+, rsc 19.2.x<->react 19.2.7+), not this peer range.
- CHANGELOG: same accurate framing; fixed the PR link from /pull/3965
  (the issue) to PR 4082 while keeping Fixes Issue 3965.
- Regenerated llms-full-pro.txt to mirror the doc change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@justin808 justin808 force-pushed the jg/3965-rsc-peer-range branch from 02ea3f9 to c16a723 Compare June 18, 2026 01:50
@justin808

Copy link
Copy Markdown
Member Author

Review-thread triage (rebased onto merged #4080/#4078, now head reflects stable 19.0.5 docs):

  • codex (P1) — "Keep the documented RSC RC installable": Resolved by sequencing. This branch is rebased onto merged Pin react-on-rails-rsc to stable 19.0.5 (#3634) #4080, which flipped the Pro RSC install docs from the 19.0.5-rc.7 prerelease to stable 19.0.5. The peer ^19.0.5 admits 19.0.5, so the documented install and the peer range are now consistent (no prerelease referenced).
  • claude / greptile — CHANGELOG PR link + docs "tracks 19.0.x" wording: Addressed — CHANGELOG links [PR 4082]; the doc note + CHANGELOG now state ^19.0.5 = >=19.0.5 <20.0.0 (floor = FOUC fix, ceiling < next major) with per-version compatibility enforced by the runtime version check, not the peer range.

Resolving.

@claude

claude Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Code Review

Summary: Replaces the Pro package's optional react-on-rails-rsc peer from "*" to "^19.0.5". Small, well-justified metadata change. LGTM overall with one minor readability note.


Correctness

  • package.json change is correct. peerDependenciesMeta already marks react-on-rails-rsc as optional, so the advisory-only nature is preserved.
  • The devDependency staying at exact "19.0.5" is the right pattern (exact pin for dev reproducibility; caret range for the published advisory peer).
  • ^19.0.5 correctly excludes prereleases (e.g. 19.2.0-rc.1), so the pnpm override in the root package.json that soak-tests React 19.2 is unaffected — consistent with the "byte-identical lockfile" claim.
  • The two-layer enforcement model is correctly preserved: this peer range is a package-manager hint only; rscPeerSupport.ts remains the real runtime gate within the 19.x line.

Documentation (minor observation)

The new [!NOTE] in upgrading-existing-pro-app.md (mirrored in llms-full-pro.txt) is accurate. One minor readability concern: two consecutive [!NOTE] blocks now sit back-to-back addressing related-but-distinct concepts (generator exact-pin vs. the Pro package's peer advisory). A reader skimming quickly could miss why there are two. A one-sentence bridge like "That exact pin above is for your app's package.json; separately, the Pro npm package itself advertises the following peer advisory:" before the second callout would remove the ambiguity. Not a blocker — note 1 does already say "This is separate from the Pro package peer metadata" — but a lead-in would make it more scannable.

CHANGELOG

Entry is detailed, accurate, and correctly cross-references the issue and related PRs.

No concerns on

  • Security — peer metadata has no security surface.
  • Performance — no runtime changes.
  • Test coverage — metadata-only; existing runtime version check tests in rscPeerSupport.ts are unchanged and remain the real gate.
  • Lockfile — PR confirms byte-identical; the pnpm override for the RC prerelease in the Pro dummy is unaffected.

Comment thread docs/pro/react-server-components/upgrading-existing-pro-app.md

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/pro/react-server-components/upgrading-existing-pro-app.md`:
- Line 38: Remove the empty blockquote marker on line 38 of the
upgrading-existing-pro-app.md file. The line contains only a `>` character with
no content, which violates the markdown no-blanks-blockquote rule. Either delete
this line entirely or if a blank line is needed between blockquote sections,
place it outside the blockquote by removing the `>` marker completely.
🪄 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: d7dff8ec-6d0e-40e1-8b15-1468715460f6

📥 Commits

Reviewing files that changed from the base of the PR and between 02ea3f9 and c16a723.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • docs/pro/react-server-components/upgrading-existing-pro-app.md
  • llms-full-pro.txt
  • packages/react-on-rails-pro/package.json
✅ Files skipped from review due to trivial changes (1)
  • CHANGELOG.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/react-on-rails-pro/package.json
  • llms-full-pro.txt

Comment thread docs/pro/react-server-components/upgrading-existing-pro-app.md

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c16a7232cd

ℹ️ 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".

Comment thread packages/react-on-rails-pro/package.json
Addresses MD028 (blank line between consecutive blockquotes) and the
two-stacked-NOTE readability concern by introducing a plain-text bridge
that distinguishes the app-level exact pin from the Pro package's
optional peer advisory.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@justin808

Copy link
Copy Markdown
Member Author

Review-thread triage (head 09a5c25ff):

  1. claude — two stacked [!NOTE]s confusing / coderabbit — MD028 blank-line-in-blockquote: Fixed. Added a plain-text bridge sentence between the generator-pin note and the peer-advisory note ("That exact pin is what goes in your app's package.json. Separately, the Pro package itself declares an optional peer range…"), which both distinguishes the two concerns for readers and breaks the consecutive-blockquote MD028.
  2. codex (P2) — allow the supported RSC prerelease (19.2.0-rc.1) in the peer range: Intentional, not changing. ^19.0.5 excludes prereleases by semver — but so did the previous "*", so this is no regression. The 19.2 soak resolves react-on-rails-rsc@19.2.0-rc.1 via an explicit pnpm override + the dummy's direct dependency, not via this optional peer; pnpm install produces zero react-on-rails-rsc peer warnings before and after (verified, lockfile byte-identical). Within 19.x, the actual compatibility gate is the Pro node renderer's runtime version check (rscPeerSupport.ts, which tiers 19.2.x↔React 19.2.7+), not this advisory range. Re-adding a || 19.2.0-rc.1 prerelease special-case to the peer is exactly the maintenance liability RSC FOUC: ship stable react-on-rails-rsc@19.0.5 and pin v17 to it (native-only) #3634/Pin react-on-rails-rsc to an explicit version range in packages/react-on-rails-pro (currently "*") #3965 set out to remove (a peer range can't enumerate every coordinated prerelease across the 19.x line). Resolving.

@claude

claude Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Code Review

Overview: Replaces "*" with "^19.0.5" on the optional react-on-rails-rsc peer in the Pro package, adds documentation explaining the floor/ceiling semantics, updates the changelog, and regenerates llms-full-pro.txt. Low-risk, metadata-only change.


What's good

  • The one-line package.json change is exactly right: ^19.0.5 floors at the RSC CSS FOUC fix and caps below an unreviewed major, which is a clear improvement over "*".
  • peerDependenciesMeta correctly keeps react-on-rails-rsc marked optional: true — untouched and correct.
  • devDependencies still pins the exact 19.0.5 for local development — the right separation of advisory peer vs. reproducible dev environment.
  • The PR description correctly notes that prerelease behaviour is identical before and after (both * and ^19.0.5 exclude prereleases by default semver rules in npm/pnpm), so the lock file is unchanged.
  • CHANGELOG entry is accurate and well-scoped.

Minor concerns

1. Cognitive tension with the adjacent NOTE in the docs

The existing note just above the new addition reads:

"The RSC generator intentionally stays on React 19.0.x and does not widen generated apps to React 19.1 or 19.2 yet ... advance the React range only when the generator, docs, and package metadata policy are reviewed together."

The very next block (added here) says the peer range ^19.0.5 admits 19.1.x and 19.2.x. The PR rationale is sound — the peer is advisory while the generator pin is enforced — but a user reading top-to-bottom might wonder why the package is "admitting" versions the generator explicitly warns against widening to. A short bridging sentence between the two notes would remove the apparent contradiction (see inline comment).

2. llms-full-pro.txt is an auto-generated mirror

The diff is byte-identical to the doc change, which is correct. Worth confirming this file is always regenerated from the docs source (not hand-edited), so no drift can happen silently.

3. No test or runtime change required

Confirmed — the peer range is advisory metadata only. rscPeerSupport.ts remains the runtime gate and is not modified. No additional test coverage is needed.


Verdict

Approve. The change is correct, well-reasoned, and the documentation separating "app pin" from "Pro peer range" is a genuine improvement. The doc clarity note above is optional — worth considering in a follow-up pass, but not a blocker.

> [!NOTE]
> The generator pins `react-on-rails-rsc` to exactly `19.0.5` (no `^` or `~`). Because the RSC bundler APIs are version-coupled, record `react-on-rails-rsc` as exactly `19.0.5` in `package.json` rather than the default caret range so a later `19.1.x`/`19.2.x` is not picked up; `react` and `react-dom` stay on `~19.0.4`. This is separate from the Pro package peer metadata tracked in [issue #3609](https://github.com/shakacode/react_on_rails/issues/3609): metadata can allow RSC packages broadly enough for `npm ls`, while the generator still installs the tested exact RSC package pin.

That exact pin is what goes in your app's `package.json`. Separately, the Pro package itself declares an optional peer range, which is broader on purpose:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The two back-to-back NOTE callouts are technically correct but create a mild contradiction for anyone reading top-to-bottom: the previous NOTE says the generator deliberately avoids React 19.1/19.2, then this one says the peer range "admits" them. A short bridging sentence would close the gap, e.g.:

The advisory peer range is intentionally wider than the generator pin: the generator controls what goes into a new app, while the peer metadata simply tells npm ls / pnpm what is structurally compatible. The real per-version gate is rscPeerSupport.ts, not this range.

Optional, not a blocker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pin react-on-rails-rsc to an explicit version range in packages/react-on-rails-pro (currently "*")

1 participant