Skip to content

Add Hacker News demo comparison, lessons learned, and repo status docs#13

Open
justin808 wants to merge 13 commits into
mainfrom
docs/ror-pro-lessons-learned
Open

Add Hacker News demo comparison, lessons learned, and repo status docs#13
justin808 wants to merge 13 commits into
mainfrom
docs/ror-pro-lessons-learned

Conversation

@justin808
Copy link
Copy Markdown
Member

@justin808 justin808 commented Apr 19, 2026

What changed

  • added a detailed React on Rails Pro vs Next.js comparison for the Hacker News demo
  • added a lessons-learned doc covering the implementation issues, upstream product gaps, and documentation follow-ups
  • updated the README to link the new docs and to mark this repo as the canonical public demo
  • added a repo-status and archive-handoff doc comparing this repo to the older react-on-rails-hn-rsc-demo repo

Why

The demo implementation is complete enough that the next problem is product positioning and repo clarity: which repo should be the public reference, what did we learn from the build, and what should happen to the older demo repo.

Validation

  • pnpm exec tsc --noEmit
  • bin/rails test (blocked in the sandbox: PostgreSQL socket /tmp/.s.PGSQL.5432 was not reachable)

Note

Medium Risk
Mostly documentation, but it also updates CI/toolchain setup, webpack RSC manifest scanning, and several Ruby dependencies (including Rails/Puma), which could affect build/test stability and runtime behavior.

Overview
Adds substantial project docs to position this repo as the canonical Hacker News RSC demo, including a detailed React on Rails Pro vs Next.js comparison, implementation lessons learned, and an archive handoff plan for the legacy repo.

Updates developer/CI tooling by pinning Ruby/Node versions, installing JS deps in CI via pnpm, refreshing GitHub Actions versions, and making test boot fail fast by generating React on Rails packs before compiling assets.

Adjusts build/runtime configuration by scoping React Flight client-reference discovery via a shared rscClientReferences config passed into RSCWebpackPlugin, binding Puma to a configurable host, and refreshing Gemfile.lock (Rails 8.1.3, Puma 8.0.0, and related gem bumps).

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

Summary by CodeRabbit

  • Documentation

    • Added repository status and archive plan documentation
    • Added comprehensive comparison guide between React on Rails Pro and Next.js approaches
    • Added lessons learned document detailing real-world challenges encountered during development
  • Chores

    • Pinned Ruby 3.4.3 and Node.js 24.8.0 versions across configuration files
    • Enhanced CI workflow with JavaScript toolchain setup and pnpm caching
  • Tests

    • Improved test setup validation for asset generation

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 19, 2026

Warning

Rate limit exceeded

@justin808 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 47 minutes and 17 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 47 minutes and 17 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d24d6ba3-5219-4be8-b940-c3066e876143

📥 Commits

Reviewing files that changed from the base of the PR and between bac4f94 and 49b856b.

⛔ Files ignored due to path filters (1)
  • Gemfile.lock is excluded by !**/*.lock
📒 Files selected for processing (9)
  • .github/workflows/ci.yml
  • README.md
  • config/puma.rb
  • config/webpack/clientWebpackConfig.js
  • config/webpack/rscClientReferences.js
  • config/webpack/serverWebpackConfig.js
  • docs/react-on-rails-pro-lessons-learned.md
  • docs/react-on-rails-pro-vs-nextjs.md
  • docs/repo-status-and-archive-plan.md

Walkthrough

This PR establishes explicit version pinning for Ruby (3.4.3) and Node.js (24.8.0), adds JavaScript toolchain setup (pnpm, Node.js) to CI test jobs, introduces comprehensive documentation including repository status and comparison guides, initializes a database schema file, and adds a test assertion for React on Rails pack generation. Approximately 780 lines added across configuration, documentation, and test files.

Changes

Cohort / File(s) Summary
Version Pinning
.ruby-version, .tool-versions
Establish Ruby 3.4.3 and Node.js 24.8.0 as canonical versions for the project using both file formats.
CI Toolchain Setup
.github/workflows/ci.yml
Configure test and system-test jobs with pnpm 10.22.0, Node.js 24.8.0, and frozen lockfile installation; Ruby setup and scan_ruby/lint jobs remain unchanged.
Documentation
README.md, docs/react-on-rails-pro-vs-nextjs.md, docs/react-on-rails-pro-lessons-learned.md, docs/repo-status-and-archive-plan.md
Add repository status section clarifying canonical repo status, expand framework comparison with benchmark/decision guidance, document real implementation challenges and proposed product improvements, and outline archive/handoff plan.
Database Schema
db/schema.rb
Introduce auto-generated Active Record schema file with schema version 0, plpgsql extension enabled, and no initial table definitions.
Test & Script Changes
test/test_helper.rb, bin/brakeman
Add assertion that react_on_rails:generate_packs task completes successfully in test environment; remove --ensure-latest flag prepending from brakeman script.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Versions locked in place so tight,
Pnpm flows with Node's delight,
Docs now sing of Rails and React,
Schema blooms—the plan's intact!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the primary changes: adding comparison, lessons learned, and repo status documentation files.
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 docs/ror-pro-lessons-learned

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.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

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, but it could not run because on-demand usage is turned off. To enable Bugbot Autofix, turn on on-demand usage and set a spend limit in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a85f6d7. Configure here.

Comment thread .github/workflows/ci.yml Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
docs/react-on-rails-pro-vs-nextjs.md (1)

118-136: Add enough benchmark methodology to make the numbers reproducible.

The caveats are helpful, but the precise timing/build numbers should include commands or scripts used, iteration count, warmup policy, cache-reset policy, and exact repo SHAs for both apps.

📝 Proposed section to add before the measurements
 ## Performance Findings
 
 These measurements were taken locally on:
@@
 - Ruby `3.4.3`
+
+### Measurement Method
+
+- Record the exact commands or scripts used for each measurement.
+- Record the number of iterations and whether the first run was discarded as warmup.
+- Record whether build artifacts, framework caches, and renderer bundle caches were reset between runs.
+- Record the exact commits tested for both this repo and the Next.js reference app.
 
 The Next.js app was benchmarked against a shared local fake Hacker News API so the measurements were not dominated by public API/network jitter. The Rails app used the same fake API.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/react-on-rails-pro-vs-nextjs.md` around lines 118 - 136, Extend the
"Performance Findings" section by adding a reproducibility subsection that lists
the exact commands/scripts used to run benchmarks (e.g., build, start, and
benchmarking commands), the repository SHAs for both Next.js and Rails demos,
the iteration count and warmup policy (how many warm runs and measured runs),
cache/reset policy between runs (e.g., OS cache drop, server restarts, DB
reset), environment variables and config toggles, and any harness or fake-API
invocation details; reference the "Performance Findings" heading so reviewers
can find and insert the new subsection before the measurements.
docs/react-on-rails-pro-lessons-learned.md (1)

24-129: Demote numbered child headings to preserve the document hierarchy.

The current ## 1, ## 2, etc. headings sit at the same level as their parent sections, which flattens generated TOCs. Use ### for the numbered subsections under each parent.

📝 Representative heading fix
 ## Issues We Actually Hit
 
-## 1. Client component boundaries were easy to misconfigure
+### 1. Client component boundaries were easy to misconfigure
@@
-## 2. The Node renderer VM does not behave like a normal Node app
+### 2. The Node renderer VM does not behave like a normal Node app
@@
 ## Recommended Issues to File Upstream
 
-## 1. Improve dev-mode error reporting for RSC stream failures
+### 1. Improve dev-mode error reporting for RSC stream failures
@@
 ## Recommended Documentation Updates for React on Rails
 
-## 1. Add a “Common RSC Failure Modes” page
+### 1. Add a “Common RSC Failure Modes” page

Also applies to: 152-221, 223-290, 304-334

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/react-on-rails-pro-lessons-learned.md` around lines 24 - 129, The
numbered subsections under "Issues We Actually Hit" are using H2 ("## 1. ...",
"## 2. ...", etc.) and should be demoted to H3 so they are nested under the
parent H2; update each numbered heading (e.g., "1. Client component boundaries
were easy to misconfigure", "2. The Node renderer VM does not behave like a
normal Node app", "3. RSC test setup was more manual than it should be", "4.
Streamed RSC errors were not observable enough", "5. Route-level 404 handling is
a real integration concern", and "6. Rspack is not yet a clean option for this
RSC path") from "##" to "###" throughout
docs/react-on-rails-pro-lessons-learned.md (also apply the same change to the
later sections referenced in the review: the blocks around lines 152-221,
223-290, and 304-334) so the TOC and hierarchy are correct.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/repo-status-and-archive-plan.md`:
- Around line 63-65: Update the "Current Blocker" paragraph (the heading "##
Current Blocker" and the sentence claiming archiving is irreversible) to remove
the incorrect claim that archiving cannot be undone; instead state that archived
repositories can be unarchive according to GitHub, and reframe the blocker as
the repository becoming read-only during archiving and requiring explicit
maintainership approval to proceed. Ensure the revised text mentions the
reversible nature of archive/unarchive and that the real concerns are the
read-only transition and the need for maintainers' explicit decision.

---

Nitpick comments:
In `@docs/react-on-rails-pro-lessons-learned.md`:
- Around line 24-129: The numbered subsections under "Issues We Actually Hit"
are using H2 ("## 1. ...", "## 2. ...", etc.) and should be demoted to H3 so
they are nested under the parent H2; update each numbered heading (e.g., "1.
Client component boundaries were easy to misconfigure", "2. The Node renderer VM
does not behave like a normal Node app", "3. RSC test setup was more manual than
it should be", "4. Streamed RSC errors were not observable enough", "5.
Route-level 404 handling is a real integration concern", and "6. Rspack is not
yet a clean option for this RSC path") from "##" to "###" throughout
docs/react-on-rails-pro-lessons-learned.md (also apply the same change to the
later sections referenced in the review: the blocks around lines 152-221,
223-290, and 304-334) so the TOC and hierarchy are correct.

In `@docs/react-on-rails-pro-vs-nextjs.md`:
- Around line 118-136: Extend the "Performance Findings" section by adding a
reproducibility subsection that lists the exact commands/scripts used to run
benchmarks (e.g., build, start, and benchmarking commands), the repository SHAs
for both Next.js and Rails demos, the iteration count and warmup policy (how
many warm runs and measured runs), cache/reset policy between runs (e.g., OS
cache drop, server restarts, DB reset), environment variables and config
toggles, and any harness or fake-API invocation details; reference the
"Performance Findings" heading so reviewers can find and insert the new
subsection before the measurements.
🪄 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: b79c0d40-901d-4e5a-a7bc-91668d50d701

📥 Commits

Reviewing files that changed from the base of the PR and between 79f9b81 and bac4f94.

⛔ Files ignored due to path filters (1)
  • Gemfile.lock is excluded by !**/*.lock
📒 Files selected for processing (10)
  • .github/workflows/ci.yml
  • .ruby-version
  • .tool-versions
  • README.md
  • bin/brakeman
  • db/schema.rb
  • docs/react-on-rails-pro-lessons-learned.md
  • docs/react-on-rails-pro-vs-nextjs.md
  • docs/repo-status-and-archive-plan.md
  • test/test_helper.rb
💤 Files with no reviewable changes (1)
  • bin/brakeman

Comment thread docs/repo-status-and-archive-plan.md Outdated
Consolidated validated dependency updates from the closed Dependabot PRs. Includes the Puma 8 bind-host hardening needed for Docker/Kamal compatibility.
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.

1 participant