feat(plugin+ci): browser pass over UI changes via bundled Playwright MCP; smoke every Vercel preview - #27
Merged
Conversation
…MCP; smoke every Vercel preview Plugin 1.3.0 ships a headless Playwright MCP server. /write-pr runs a mandatory browser pass on any rendered change (desktop + phone, console clean, screenshots) and /review-pr repeats it against the Vercel preview. A reusable ci-e2e-smoke workflow plus a thin deployment_status caller visits each repo's first routes on every Preview deployment. Bigger payment-path changes can be asked for one real transaction as optional evidence; no wallet keys go to agents or CI. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
The hole, and the fix
/review-prstep 5 and rules §3/§4 told the agent to "load in a normal browser and click through" but granted no tool that could. Frontend regressions reached review with nobody having looked at the page, and every product is a Vercel-hosted Next.js app with wallet and payment flows.This PR adds the mechanism in three coupled pieces, one toolchain:
claude-plugin/.mcp.json, pinned@playwright/mcp@0.0.79)./write-prgets step 2b: a mandatory browser pass on any rendered change — navigate, snapshot, interact, read console + network, screenshot on desktop and a phone viewport, loop until console errors are zero./review-prstep 5 repeats it against the Vercel preview built from the pinned head, to refute rather than trust. Both commands allowlistmcp__plugin_pm-kit_playwright..github/workflows/ci-e2e-smoke.yml+ thincallers/e2e-smoke.ymlondeployment_status. Visits each listed route on the preview, fails on HTTP ≥ 400, an off-origin redirect (Vercel Authentication), a framework error overlay, or any console error / uncaught exception / failed same-origin request, desktop and phone. The spec lives once ine2e-smoke/; repos carry only the caller. Hasworkflow_dispatchso a smoke change is proven green and red from pm-kit before callers see it.e2e-smokegreen means and does not, and — for bigger payment-path changes — one real transaction from the author's own wallet as optional evidence verified at the receipt. PR template,CLAUDE.mdtemplate, README, SETUP-GUIDE (new Step 2b),apply.sh(adds the caller for Node repos) updated.Trade-off that picked the design: the smoke tests the deployed preview, not a runner build. It sees exactly what a user gets (Vercel env, edge config), at the cost of running on deploy timing rather than on
ci— which is why it starts as a non-required check.What this does NOT do / residual risk
e2e-smokeis informational until promoted. 0 of 9 repos run it today; each needs the caller (Step 2b). Only mondeto-admin and askbots need the bypass secret — their previews sit behind Vercel Authentication (verified via the Vercel API; saluto and mondeto-web are open).workflow_dispatchfor a workflow not yet on the default branch (HTTP 404: workflow ci-e2e-smoke.yml not found on the default branch). Local runs against live previews are the evidence below; the two dispatch runs are the first ops step after merge./review-prstep 4 now says so.@mainand the workflow checks oute2e-smoke/frommain: a smoke-spec change on a branch is not exercised by callers until merged. That is what the dispatch trigger is for.net::ERR_ABORTED(the page cancelling its own request). Without the filter a healthy saluto preview goes 2/2 red.Judgement calls
.mcp.json, drop the allowlist entry.e2e-smoke/into a repo..nvmrc— the app is already deployed; only the spec runs.mcp__plugin_pm-kit_playwright(verified scoped name below) rather than 29 per-tool entries.npx playwright install chromiumstep; rules §3 gains the optional-transaction rule. Happy to split any of these out.Issues
Refs: none filed — this came from team guidance on frontend testing standards.
Stacking / conflicts
Branched off
main, independent. No open PRs in pm-kit. Merge-order hazard: merging triggerssync-templates.yml, which opens rule/PR-template PRs in the 9 repos;plugin-version-guardrequires the 1.2.1 → 1.3.0 bump present here.Verification evidence
Plugin loads and exposes the scoped tools (headless session,
--plugin-dir ./claude-plugin):Smoke, typecheck + both directions against live previews (
cd e2e-smoke && npm ci && npx playwright install chromium):Mutation count (spec mutated, run, restored; control 2/2 green after):
Workflow + script checks:
Not verified here: the two CI runs (blocked pre-merge, see above); the browser pass inside a real
/review-pron a product-repo PR (tool names verified, procedure not yet exercised end-to-end).Remaining ops steps
gh workflow run ci-e2e-smoke.yml -f url=<saluto preview> -f routes=/(green) and… -f routes=/definitely-missing-route(red); paste both run links hereclaude plugin update pm-kitthennpx playwright install chromiumapply.shon a branch, setroutes:, open PR, confirme2e-smokeappears on the previewVERCEL_AUTOMATION_BYPASS_SECRET(own terminal)mini-quiz-admine2e-smoketo a required check once green for a couple of weeksChecklist
mainQuestions for the maintainer
celo-org/pm-kit/.github/workflows/ci-e2e-smoke.yml@GigaHierz/add-playwright-fe-testswould do it, but that touches a product repo — your call.apply.sh)?Co-Authored-By: Claude Fable 5.1 noreply@anthropic.com
🤖 Generated with Claude Code