github shakacode/react_on_rails v17.0.0.rc.3

pre-release4 hours ago

Added

  • Machine-readable doctor output (FORMAT=json): bin/rails react_on_rails:doctor FORMAT=json (and ReactOnRails::Doctor.new(format: :json)) now emits a stable, versioned JSON report — schema_version, ror_version, overall status, per-check entries with stable snake_case ids (pass/warn/fail status, most-severe message, full details), and a summary of check counts — so coding agents and tooling can consume diagnosis results without parsing the human-formatted text. Stray check output is routed to stderr so stdout stays valid JSON; the default human-readable output and exit-code semantics are unchanged. Split out from the MCP-server RFC in Issue 3870. Closes Issue 3943. PR 3948 by justin808.
  • Consumer-facing AI-agent guidance scaffolded into generated and installed apps: rails generate react_on_rails:install (and therefore create-react-on-rails-app, which delegates to it) now writes a concise, app-scoped AGENTS.md plus thin editor-pointer files (CLAUDE.md, .cursor/rules/react-on-rails.mdc, .github/copilot-instructions.md) so an AI coding agent dropped into a fresh app already knows how to register a component, use the react_component view helper, choose .client/.server bundles, recover from the top runtime errors (sourced from SmartError), and run bin/rails react_on_rails:doctor. The errors section tracks the live SmartError messages, and the editor files are pointers (not copies). Emission is gated by --agent-files/--no-agent-files (default on) in both paths and never overwrites an existing file. Cross-links the eval-harness work in Issue 3832. Closes Issue 3868. PR 3924 by justin808.
  • First-party font optimization helper (a next/font/local analog): New ReactOnRails::FontHelper#react_on_rails_font_face view helper returns <head> markup for a committed, self-hosted .woff2 font: a <link rel="preload" as="font" type="font/woff2" crossorigin>, an @font-face with font-display: swap, and an optional metric-matched fallback @font-face (size-adjust plus ascent-override / descent-override / line-gap-override) so the system fallback occupies the same space as the web font and the swap produces no layout shift (CLS). Self-hosting through the asset pipeline avoids any third-party font-host request. Includes a new Font Optimization docs page (self-hosting, preload, font-display, the size-adjust fallback technique with a worked Inter-over-Arial derivation, subsetting guidance, and a CLS note) and a runnable dummy-app example. v1 covers the next/font/local committed-file path and the non-streaming react_component_hash head-injection path. Closes Issue 3875 (partial). Deferred sub-tasks tracked in Issue 3921. PR 3923 by justin808.
  • Stable SmartError codes and generated error reference: SmartError messages now include stable ROR### codes and canonical documentation URLs, and docs/oss/reference/error-reference.md is generated from the SmartError definitions with a drift check. Fixes Issue 3894. PR 3936 by justin808.
  • Preload link helper for generated component packs: Added react_on_rails_preload_links so layouts can emit preload, modulepreload, and stylesheet preload tags for auto-bundled component packs from the Shakapacker manifest. Fixes Issue 3889. PR 3935 by justin808.
  • Tailwind CSS v4 generator option: rails generate react_on_rails:install --tailwind and create-react-on-rails-app --tailwind now install Tailwind CSS v4, wire @tailwindcss/postcss for Webpack or Rspack, and style the generated server-rendered HelloWorld example with extracted component CSS support. Interactive create-react-on-rails-app runs recommend Tailwind by default while still allowing users to opt out. Fixes Issue 3895. PR 3937 by justin808.

Fixed

  • [Pro] Node renderer drains workers on SIGTERM/SIGINT instead of orphaning them: The Pro Node renderer master now installs SIGTERM and SIGINT handlers before forking workers, so supervisors (Foreman, local dev, process managers) that signal the master gracefully drain workers — sending the shutdown message, waiting a short grace period, calling cluster.disconnect(), then awaiting each worker's exit event — instead of killing only the master and leaving orphaned worker processes behind. Shutdown uses signal-style exit codes (SIGINT → 130, SIGTERM → 143), reuses a shutdown-time worker snapshot for the hard SIGKILL fallback so disconnected-but-still-running workers are not missed, and suppresses reforks while a shutdown is in progress. Fixes Issue 3863. PR 3882 by justin808.

Don't miss a new react_on_rails release

NewReleases is sending notifications on new releases.