Repository navigation
feat(ui-visual): design-review workflow and status check for UI PRs (warren-a694) - #1359
Merged
Merged
Conversation
…and reports a design-review check (warren-a694) .github/workflows/ui-design-review.yml runs the ui-design-review skill through claude-code-action (pinned by commit) after each ui-visual run, validates the verdict with scripts/design-review/verdict.ts, and reports the result as the `design-review` check run on the PR head plus one sticky comment keyed by <!-- design-review -->. - gate (pull_request_target): every PR head into main gets the check at once, success "Skipped: no src/ui changes" or queued, so the check warren-dbef makes required never hangs. - prepare (workflow_run): trusts the artifact's PR number only when that PR's head is the run's head sha, maps changed files to manifest pages, stages only in-scope screenshots and the src/ui diff. - evaluate: contents: read token, scoped tools, no web tools, fixed prompt with no PR text, model/turn/budget caps from repo variables. - report: re-validates in a fresh checkout and fails closed on a missing or invalid verdict. Logic lives in pure, unit-tested modules under scripts/design-review/.
jayminwest
added a commit
that referenced
this pull request
Oct 9, 2026
…e (warren-598d) (#1361) * feat(ui-visual): design-review workflow runs the evaluator on UI PRs and reports a design-review check (warren-a694) (#1359) .github/workflows/ui-design-review.yml runs the ui-design-review skill through claude-code-action (pinned by commit) after each ui-visual run, validates the verdict with scripts/design-review/verdict.ts, and reports the result as the `design-review` check run on the PR head plus one sticky comment keyed by <!-- design-review -->. - gate (pull_request_target): every PR head into main gets the check at once, success "Skipped: no src/ui changes" or queued, so the check warren-dbef makes required never hangs. - prepare (workflow_run): trusts the artifact's PR number only when that PR's head is the run's head sha, maps changed files to manifest pages, stages only in-scope screenshots and the src/ui diff. - evaluate: contents: read token, scoped tools, no web tools, fixed prompt with no PR text, model/turn/budget caps from repo variables. - report: re-validates in a fresh checkout and fails closed on a missing or invalid verdict. Logic lives in pure, unit-tested modules under scripts/design-review/. * feat(auto-merge): require ui-visual and design-review success for UI PRs before arming (warren-dbef) * docs(ui): AGENTS.md UI conventions section and a UI definition of done (warren-598d) Adds a UI conventions section to AGENTS.md that pairs each rule with the check that holds it: the Tailwind arbitrary-value ratchet, the GritQL primitive and inline-style bans, check:ui-visual, the golden baseline approval label, and the design-review rubric. Folds the UI merge-gate paragraph out of Protected paths into it and moves the repro-first section next to it. The PR template gains a collapsed UI definition of done, and src/ui/README.md links both UI design records.
jayminwest
added a commit
that referenced
this pull request
Oct 9, 2026
…o-merge refuses without it (warren-4780) (#1356) * feat(ui-visual): human-only approval for golden baseline changes; auto-merge refuses without it (warren-4780) auto-merge.yml gains a UI baseline approval check next to Article IX. A PR that changes scripts/ui-visual/__golden__/ or the comparison machinery arms only when a human approver applied ui-baseline-approved to the exact baseline content the head carries. The gate reads the labeler from the issue events API (never label presence), the head the approver saw from the repository activity API, and compares baseline object ids. It runs the base branch's copy of scripts/ui-visual/baseline-approval.ts, fails closed, and disarms on refusal. The arm step now also refuses to arm a head the gates did not judge. Adds the label, CODEOWNERS routing, and docs/design/ui-visual-gate.md. * feat(auto-merge): require ui-visual and design-review success for UI PRs before arming (warren-dbef) (#1360) * docs(ui): AGENTS.md UI conventions section and a UI definition of done (warren-598d) (#1361) * feat(ui-visual): design-review workflow runs the evaluator on UI PRs and reports a design-review check (warren-a694) (#1359) .github/workflows/ui-design-review.yml runs the ui-design-review skill through claude-code-action (pinned by commit) after each ui-visual run, validates the verdict with scripts/design-review/verdict.ts, and reports the result as the `design-review` check run on the PR head plus one sticky comment keyed by <!-- design-review -->. - gate (pull_request_target): every PR head into main gets the check at once, success "Skipped: no src/ui changes" or queued, so the check warren-dbef makes required never hangs. - prepare (workflow_run): trusts the artifact's PR number only when that PR's head is the run's head sha, maps changed files to manifest pages, stages only in-scope screenshots and the src/ui diff. - evaluate: contents: read token, scoped tools, no web tools, fixed prompt with no PR text, model/turn/budget caps from repo variables. - report: re-validates in a fresh checkout and fails closed on a missing or invalid verdict. Logic lives in pure, unit-tested modules under scripts/design-review/. * feat(auto-merge): require ui-visual and design-review success for UI PRs before arming (warren-dbef) * docs(ui): AGENTS.md UI conventions section and a UI definition of done (warren-598d) Adds a UI conventions section to AGENTS.md that pairs each rule with the check that holds it: the Tailwind arbitrary-value ratchet, the GritQL primitive and inline-style bans, check:ui-visual, the golden baseline approval label, and the design-review rubric. Folds the UI merge-gate paragraph out of Protected paths into it and moves the repro-first section next to it. The PR template gains a collapsed UI definition of done, and src/ui/README.md links both UI design records.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Seed
warren-a694(planpl-10db, step 15). Adds.github/workflows/ui-design-review.yml, which runs theui-design-reviewevaluator on PRs that touchsrc/ui. It reports the result as adesign-reviewcheck run on the PR head and as one sticky PR comment.What it does
gatepull_request_targetsrc/uichange getssuccess("Skipped: no src/ui changes") at once. Any other PR gets a queued "Waiting for ui-visual" check, so a required check never hangs.prepareworkflow_runofUI visual, or dispatchwarren-70d9pattern). Maps changed files to manifest pages and stages only the in-scope screenshots plus thesrc/uidiff. Sets the check to in_progress.evaluatemode == review)anthropics/claude-code-actionpinned to6fed3ca(v1.0.245). The prompt is fixed and carries no PR text: page ids come from the manifest and the sha from the API. Allowed tools areRead(./**), Glob, Grep, Skill,Edit(./.design-review/verdict.json)andBash(bun run scripts/design-review/verdict.ts:*). There are no web tools.reportAll logic lives in pure, unit-tested modules under
scripts/design-review/(scope,outcome,github,gate,prepare,report,usage). Every job runs only the default branch's code. Model text in the comment is escaped, with mentions, links, HTML and table breaks neutralized and credential-shaped strings redacted.Cost guardrails are repo variables, all optional:
DESIGN_REVIEW_MODEL(defaultclaude-opus-5-5)DESIGN_REVIEW_MAX_TURNS(default 60)DESIGN_REVIEW_MAX_BUDGET_USD(default 5)The evaluator also gets only the in-scope screenshots. It falls back to every page when a shared file changes or GitHub caps the file list.
Contract for warren-dbef
The contract is documented in
docs/design/ui-design-review.mdsection 7 and in the workflow header.design-review. Its source app is GitHub Actions, because it is created through the Checks API with the workflow'sGITHUB_TOKEN.successonly on a valid PASS or a skip.failureon FAIL, on an invalid or missing verdict, or when ui-visual failed.gh workflow run ui-design-review.yml -f run_id=<ui-visual run id>.Deviation
The sticky marker is
<!-- design-review -->, fromstickyMarker("design-review"). The seed text says<!-- ui-design-review -->.Validation
bun run check:all --bail: 12/12 gates green on the final head (via the pre-commit hook). 81 new tests inscripts/design-review/. actionlint is clean.allow_closed=truewas used because process(ui-visual): repro-first convention for UI bugs, worked example red->green for the outcomes histogram (warren-9fd7, warren-e9cd) #1357 is merged.design-reviewsuccess onbf5c594f. The comment on #1357 was updated in place and lists 2 pre-existing findings. Cost $0.54, 38 turns.mode=skip, check success "Skipped: no src/ui changes", and the evaluator was not run.gatejob (pull_request_target) and theworkflow_runtrigger only run once this is on main. They are unit-tested.Follow-ups
design-reviewand pin its source to GitHub Actions.preparejob can crash before it outputs the PR number. In that case a queued check stays queued.