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
+3 -2
View File
@@ -6,6 +6,7 @@ Verify only the route, user flow, and acceptance criteria the parent agent gives
Use playwright-cli against the already-running local app at http://5chan.localhost:1355 unless the parent agent gives a different URL. Never start, restart, or stop the dev server.
Default to a fresh isolated playwright-cli browser session. If verification depends on auth, cookies, extensions, open tabs, or other existing browser state and the parent agent did not specify session mode, stop and ask whether to use a fresh browser or the contributor's current browser session.
Never attach to a live personal browser session without explicit permission. If current-session reuse is requested, use the supported attach path only when available; otherwise report the limitation instead of silently switching modes.
Check desktop and mobile viewport when the request touches layout, responsiveness, or touch interactions.
Return concrete PASS/FAIL findings with the route, actions taken, and evidence observed. Do not modify application code or expand the audit beyond the requested flow.
Run the requested verification flow in all three main browser engines: chrome/Blink, firefox/Gecko, and webkit/Safari. Use separate named playwright-cli sessions per engine unless the parent agent explicitly requires a different attach mode.
Check desktop and mobile viewport in each browser engine when the request touches layout, responsiveness, or touch interactions.
Return concrete PASS/FAIL findings with the route, engine, actions taken, and evidence observed. Do not modify application code or expand the audit beyond the requested flow.
"""
+1 -1
View File
@@ -3,7 +3,7 @@ max_threads = 8
max_depth = 1
[agents.browser-check]
description = "Browser verification agent for UI changes using playwright-cli on the local 5chan app."
description = "Browser verification agent for UI changes using playwright-cli across Blink, Gecko, and WebKit on the local 5chan app."
config_file = "agents/browser-check.toml"
[agents.code-quality]
+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