Skip to content

Follow up RSC node renderer test guide copy-paste hazards #3273

@justin808

Description

@justin808

Follow-up from merged PR #3223 and review comment #3223 (comment).

PR #3223 added the RSC + node-renderer system test recipe. The merged guide is usable, but a few review notes remain worth handling together because they affect copy-paste safety and reader scanability.

Recommended updates

  • Clarify the Minitest story. The current intro says Minitest users can reuse the ENV setup and ReactOnRails::TestHelper.ensure_assets_compiled, but must provide their own suite-level renderer lifecycle harness. Either add an abbreviated Minitest lifecycle recipe or explicitly state that the renderer lifecycle section is RSpec-only and a Minitest variant is future work.
  • Promote the hook-ordering requirement near the Step 2 require_relative "support/rsc_node_renderer" line. The current Caveats bullet is accurate, but the ordering is critical enough to be visible before readers copy the snippet.
  • Move the metatag warning before the Step 2 copy-paste block and add an immediately actionable narrowed-regex example such as spec/(system/rsc|features/rsc).
  • Add a short .gitignore reminder for generated test-only paths:
    • tmp/node-renderer-bundles-test-*
    • log/node-renderer-test-*.log

Optional while touching the guide

  • Mention that teams adopting the 3900 port range can check for existing services first, e.g. lsof -i :3900-3910.
  • Either document the symlinked Rails.root/tmp limitation of the current start_with? guard or harden the example with Pathname#realpath.
  • Consider warning on loopback Errno::ETIMEDOUT in the pre-spawn port probe instead of silently proceeding, since it is unusual on 127.0.0.1.

Context

This is docs-only follow-up polish. It does not block the merged PR, but it should make the official RSC node-renderer test setup recipe safer for app authors to copy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions