chore(ai-workflow): require cross-browser playwright checks

This commit is contained in:
Tommaso Casaburi
2026-04-10 14:31:49 +07:00
parent 02f8d3467e
commit a1962189d9
16 changed files with 105 additions and 31 deletions
+17 -10
View File
@@ -1,7 +1,7 @@
---
name: browser-check
model: composer-2
description: Verifies UI changes in the browser using playwright-cli. Use after making visual or interaction changes to React components, CSS, layouts, or routing to confirm they render and behave correctly.
description: Verifies UI changes in the browser using playwright-cli across Blink, Gecko, and WebKit. Use after making visual or interaction changes to React components, CSS, layouts, or routing to confirm they render and behave correctly.
---
You are a browser tester for the 5chan project. You verify that UI changes work correctly by checking the running dev server with playwright-cli.
@@ -27,14 +27,15 @@ Default to a fresh isolated `playwright-cli` browser session. If the requested v
### Step 2: Navigate and Snapshot
Use playwright-cli to check the relevant page:
Use playwright-cli to check the relevant page in all three browser engines with separate sessions:
```bash
playwright-cli open http://5chan.localhost:1355
playwright-cli snapshot
playwright-cli -s=verify-chrome open http://5chan.localhost:1355 --browser=chrome
playwright-cli -s=verify-firefox open http://5chan.localhost:1355 --browser=firefox
playwright-cli -s=verify-webkit open http://5chan.localhost:1355 --browser=webkit
```
Navigate to the specific page/route where the change should be visible.
Navigate each engine session to the specific page/route where the change should be visible.
### Step 3: Verify the Changes
@@ -43,11 +44,16 @@ Based on what the parent agent asked you to check:
- Take snapshots of the relevant UI state
- Check that elements are present and visible
- Interact with elements if needed (click buttons, open modals, etc.)
- Check mobile viewport if the change is layout-related:
- Repeat the requested checks in `chrome`, `firefox`, and `webkit`
- Check mobile viewport in each engine if the change is layout-related:
```bash
playwright-cli resize 375 812
playwright-cli snapshot
playwright-cli -s=verify-chrome resize 375 812
playwright-cli -s=verify-chrome snapshot
playwright-cli -s=verify-firefox resize 375 812
playwright-cli -s=verify-firefox snapshot
playwright-cli -s=verify-webkit resize 375 812
playwright-cli -s=verify-webkit snapshot
```
### Step 4: Report Back
@@ -62,8 +68,9 @@ playwright-cli snapshot
- description of each verification
### Results
- [PASS/FAIL] description of what was verified
- [PASS/FAIL] description of what was verified
- [PASS/FAIL] `chrome` - description of what was verified
- [PASS/FAIL] `firefox` - description of what was verified
- [PASS/FAIL] `webkit` - description of what was verified
### Screenshots
- Describe what the screenshots show (if taken)
+1 -1
View File
@@ -66,7 +66,7 @@ After all batches complete:
1. Run `yarn build` to confirm everything compiles
2. Run `yarn lint` and `yarn type-check`
3. If the plan touched React components/hooks, run `yarn doctor`
4. For UI changes, verify in the browser with playwright-cli
4. For UI changes, verify in the browser with `playwright-cli` across `chrome`, `firefox`, and `webkit`, plus a mobile viewport flow in each engine when relevant
### 6. Report
+16
View File
@@ -6,6 +6,22 @@ allowed-tools: Bash(playwright-cli:*)
# Browser Automation with playwright-cli
## Cross-Browser UI Verification
When using `playwright-cli` to verify rendering, styling, layout, or interactions in this repo, run the relevant flow in all three major browser engines:
- `chrome` for Blink
- `firefox` for Gecko
- `webkit` for Safari/WebKit coverage
Use separate named sessions per engine, compare the results, and record any engine-specific differences instead of treating Chromium output as sufficient.
```bash
playwright-cli -s=verify-chrome open http://example.com --browser=chrome
playwright-cli -s=verify-firefox open http://example.com --browser=firefox
playwright-cli -s=verify-webkit open http://example.com --browser=webkit
```
## Quick start
```bash
+1 -1
View File
@@ -89,7 +89,7 @@ After code changes, follow repo verification rules from `AGENTS.md`:
- run `yarn build`, `yarn lint`, and `yarn type-check`
- run `yarn test` after adding or changing tests
- run `yarn doctor` after React UI logic changes
- use `playwright-cli` for UI/visual changes on desktop and mobile
- use `playwright-cli` for UI/visual changes across `chrome`, `firefox`, and `webkit`, plus a mobile viewport flow in each engine when relevant
### 5. Report back on the PR before merging