From 2ca98dcfb5b5472f17269a7c367b9cbc6fb6e664 Mon Sep 17 00:00:00 2001 From: Cirdes Date: Sun, 22 Nov 2026 11:21:55 -0300 Subject: [PATCH 1/2] [Chore] Finish the Ruby 4.0.10 bump: gem/.ruby-version, audit README, devcontainer note Follow-ups from the Cubic review of #676: - gem/.ruby-version was still 3.3.3 while gem/.tool-versions says 4.0.10 - audit/README.md listed Ruby 3.4 as the prerequisite - both devcontainer Dockerfiles explain why they stay on 4.0.9 Co-Authored-By: Claude Opus 5.5 --- audit/README.md | 2 +- docs/.devcontainer/Dockerfile | 3 ++- gem/.devcontainer/Dockerfile | 3 ++- gem/.ruby-version | 3 +-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/audit/README.md b/audit/README.md index 9b59a374d..d82bebf3d 100644 --- a/audit/README.md +++ b/audit/README.md @@ -20,7 +20,7 @@ Tests use `ShadcnAudit::FakeShell` (`test/test_helper.rb`): stub canned stdout b ## Prerequisites -Ruby 3.4 (via mise, as below, or an equivalent version manager; without mise, drop `mise exec --`), `gh` authenticated (`gh auth status`), Node and pnpm, Playwright's Chromium for `collect` (above), and, for the remaining browser steps and the component video, the headless `audit-chrome` MCP declared in the repo's `.mcp.json` (Claude Code asks once to approve it). `comment --post` attaches the report's `videos` with `gh pr comment --attach` (gh >= 2.101). The audit runs its two dev servers in Herdr panes when `HERDR_ENV=1`, otherwise as background shell processes; either way it stops them at the end. `preview` boot commands use `mise exec --` only when `mise` is on PATH. +Ruby 4.0 (via mise, as below, or an equivalent version manager; without mise, drop `mise exec --`), `gh` authenticated (`gh auth status`), Node and pnpm, Playwright's Chromium for `collect` (above), and, for the remaining browser steps and the component video, the headless `audit-chrome` MCP declared in the repo's `.mcp.json` (Claude Code asks once to approve it). `comment --post` attaches the report's `videos` with `gh pr comment --attach` (gh >= 2.101). The audit runs its two dev servers in Herdr panes when `HERDR_ENV=1`, otherwise as background shell processes; either way it stops them at the end. `preview` boot commands use `mise exec --` only when `mise` is on PATH. A component gets its own `component_map/.yml` (keys in [`component_map/README.md`](component_map/README.md)) and also needs fixtures in `fixtures//` (`content.yml`, `shadcn.tsx`, `rubyui.rb`). diff --git a/docs/.devcontainer/Dockerfile b/docs/.devcontainer/Dockerfile index ab41ca1cd..fd33eb0cd 100644 --- a/docs/.devcontainer/Dockerfile +++ b/docs/.devcontainer/Dockerfile @@ -1,4 +1,5 @@ -# Make sure RUBY_VERSION matches the Ruby version in .ruby-version +# Should match .ruby-version. Held at 4.0.9 until ghcr.io/rails/devcontainer/images/ruby +# publishes a 4.0.10 tag; bump it then. ARG RUBY_VERSION=4.0.9 FROM ghcr.io/rails/devcontainer/images/ruby:$RUBY_VERSION diff --git a/gem/.devcontainer/Dockerfile b/gem/.devcontainer/Dockerfile index ab41ca1cd..fd33eb0cd 100644 --- a/gem/.devcontainer/Dockerfile +++ b/gem/.devcontainer/Dockerfile @@ -1,4 +1,5 @@ -# Make sure RUBY_VERSION matches the Ruby version in .ruby-version +# Should match .ruby-version. Held at 4.0.9 until ghcr.io/rails/devcontainer/images/ruby +# publishes a 4.0.10 tag; bump it then. ARG RUBY_VERSION=4.0.9 FROM ghcr.io/rails/devcontainer/images/ruby:$RUBY_VERSION diff --git a/gem/.ruby-version b/gem/.ruby-version index 92fd9f951..2d2d68106 100644 --- a/gem/.ruby-version +++ b/gem/.ruby-version @@ -1,2 +1 @@ -3.3.3 - +4.0.10 From 8e9b5951893aaca5cbae05e5b64e49ba3d52152d Mon Sep 17 00:00:00 2001 From: Cirdes Date: Sun, 22 Nov 2026 11:28:17 -0300 Subject: [PATCH 2/2] [Documentation] Point agent docs and audit skills at Ruby 4.0 Co-Authored-By: Claude Opus 5.5 --- .claude/skills/shadcn-audit/SKILL.md | 4 ++-- .claude/skills/shadcn-drift/SKILL.md | 4 ++-- gem/AGENTS.md | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.claude/skills/shadcn-audit/SKILL.md b/.claude/skills/shadcn-audit/SKILL.md index 33b132315..736e36ab2 100644 --- a/.claude/skills/shadcn-audit/SKILL.md +++ b/.claude/skills/shadcn-audit/SKILL.md @@ -29,7 +29,7 @@ judging, and writing `report.json`. Run every CLI call from `audit/`: cd audit && mise exec -- bundle exec exe/shadcn-audit … ``` -(Without mise, drop `mise exec --` and use a Ruby 3.4 on PATH.) +(Without mise, drop `mise exec --` and use a Ruby 4.0 on PATH.) Each subcommand prints one JSON object. On failure it is `{"error": "…"}` with exit status 1: read the message, fix the cause, and re-run; never treat @@ -38,7 +38,7 @@ an error as an empty result. Talk to the user in their language; ## Prerequisites -- Ruby 3.4 (via mise, as in `gem/.tool-versions`, or an equivalent version +- Ruby 4.0 (via mise, as in `gem/.tool-versions`, or an equivalent version manager) with `cd audit && bundle install` done. - `gh` authenticated (`gh auth status`) with read access to `ruby-ui/ruby_ui`; posting the comment needs write access. diff --git a/.claude/skills/shadcn-drift/SKILL.md b/.claude/skills/shadcn-drift/SKILL.md index 350a13995..8285171da 100644 --- a/.claude/skills/shadcn-drift/SKILL.md +++ b/.claude/skills/shadcn-drift/SKILL.md @@ -26,13 +26,13 @@ Run every CLI call from `audit/`: cd audit && mise exec -- bundle exec exe/shadcn-audit … ``` -(Without mise, drop `mise exec --` and use a Ruby 3.4 on PATH.) Each call +(Without mise, drop `mise exec --` and use a Ruby 4.0 on PATH.) Each call prints one JSON object; `{"error": …}` with exit 1 is a failure. Report it, never treat it as "nothing changed". ## Prerequisites -Ruby 3.4 with `cd audit && bundle install`, `git`, and `gh` authenticated +Ruby 4.0 with `cd audit && bundle install`, `git`, and `gh` authenticated (read is enough; the commit list comes from the GitHub API). No browser, no Node. diff --git a/gem/AGENTS.md b/gem/AGENTS.md index 51491a407..f129cd2fd 100644 --- a/gem/AGENTS.md +++ b/gem/AGENTS.md @@ -28,7 +28,7 @@ RubyUI components mirror shadcn's **Base UI** build with the **vega** style and - **New component in the audit:** create [`audit/component_map/.yml`](../audit/component_map/README.md) (one file per component, so parallel PRs don't conflict) and add fixtures in `audit/fixtures//` (`content.yml`, `shadcn.tsx`, `rubyui.rb`, the same strings on both sides and one `data-audit-trigger`); without fixtures the browser checks have nothing to render. If `shadcn.tsx` renders other shadcn components (e.g. Form's fixture uses Input and Checkbox), list them under `fixture_shadcn` so the sandbox installs them. - **Deliberate differences:** register them in the component's file under [`audit/divergences/`](../audit/divergences/) (`.yml`) in the same PR, with a reason. Unregistered differences show up as findings. - **Licensing:** mirror shadcn's classes, structure and behavior (MIT). Port *behavior* from Base UI and React Aria, never their source. If code is ever ported, its license notice goes in alongside it. -- **Before opening a component PR:** run the audit. In Claude Code, `/shadcn-audit`; in any other agent, read [`SKILL.md`](../.claude/skills/shadcn-audit/SKILL.md) (and its `references/`) and follow that procedure with the CLI in [`audit/`](../audit/README.md). Prerequisites: Ruby 3.4 (via mise or equivalent), `gh` authenticated, Node and pnpm, and the chrome-devtools MCP. Servers run in Herdr panes when `HERDR_ENV=1`, otherwise as background shell processes; stop them at the end. +- **Before opening a component PR:** run the audit. In Claude Code, `/shadcn-audit`; in any other agent, read [`SKILL.md`](../.claude/skills/shadcn-audit/SKILL.md) (and its `references/`) and follow that procedure with the CLI in [`audit/`](../audit/README.md). Prerequisites: Ruby 4.0 (via mise or equivalent), `gh` authenticated, Node and pnpm, and the chrome-devtools MCP. Servers run in Herdr panes when `HERDR_ENV=1`, otherwise as background shell processes; stop them at the end. ## Commands @@ -98,7 +98,7 @@ When writing or reviewing a Stimulus controller, follow the **`ruby-ui-stimulus` ## CI -GitHub Actions (`.github/workflows/ci.yml`) runs `rake test` and `rake standard` against Ruby 3.3 and 3.4 on every push to main and on PRs. +GitHub Actions (`.github/workflows/ci.yml`) runs `rake test` and `rake standard` against Ruby 3.3, 3.4 and 4.0 on every push to main and on PRs. ## PR Template