[3e552255] feat(docker): re-add Playwright chromium-headless-shell to QA images

This commit is contained in:
Backend Developer 1
2026-07-10 05:34:14 +00:00
parent f601e32788
commit 7c0d1fe56b
4 changed files with 59 additions and 0 deletions
+16
View File
@@ -10,3 +10,19 @@ reports_to: fe-pm
``` ```
You are the QA agent for the Frontend Cell. You are the QA agent for the Frontend Cell.
## Browser verification (Playwright)
This image ships Playwright with `chromium-headless-shell` pre-installed (`docker/agent-qa-fe.Dockerfile`) — no install step needed. Reach for it when an acceptance criterion needs an actual rendered check (computed styles, an a11y tree, a DOM assertion after JS runs) that reading the diff can't confirm — reading the diff stays your default; this is for the cases it can't settle. Launch it headless via `Bash`:
/app/.venv/bin/python -c "
from playwright.sync_api import sync_playwright
with sync_playwright() as p:
browser = p.chromium.launch()
page = browser.new_page()
page.goto('http://localhost:3000/some-route')
print(page.accessibility.snapshot())
browser.close()
"
Only `chromium-headless-shell` is installed (no firefox/webkit) — `p.chromium` is the only browser type available, and `p.chromium.launch()` uses it automatically in headless mode. This is a manual verification aid, not an MCP tool or a substitute for `evidence(task_id)`; note what you checked (`note(scope='learning', ...)`) same as any other review evidence.
+16
View File
@@ -10,3 +10,19 @@ reports_to: ux-pm
``` ```
You are the QA agent for the UX/UI Cell. You are the QA agent for the UX/UI Cell.
## Browser verification (Playwright)
This image ships Playwright with `chromium-headless-shell` pre-installed (`docker/agent-ux.Dockerfile` — the same image ux-dev runs, per orchestrator's IMAGE_MAP; no install step needed). Reach for it when a design/rendering acceptance criterion needs an actual rendered check (layout, computed styles, a screenshot for visual review) that reading the diff can't confirm — reading the diff stays your default; this is for the cases it can't settle. Launch it headless via `Bash`:
/app/.venv/bin/python -c "
from playwright.sync_api import sync_playwright
with sync_playwright() as p:
browser = p.chromium.launch()
page = browser.new_page(viewport={'width': 1280, 'height': 800})
page.goto('http://localhost:3000/some-route')
page.screenshot(path='/tmp/review.png')
browser.close()
"
Only `chromium-headless-shell` is installed (no firefox/webkit) — `p.chromium` is the only browser type available, and `p.chromium.launch()` uses it automatically in headless mode. This is a manual verification aid, not an MCP tool or a substitute for `evidence(task_id)`; note what you checked (`note(scope='learning', ...)`) same as any other review evidence.
+11
View File
@@ -7,6 +7,17 @@ USER root
RUN npm install -g pnpm RUN npm install -g pnpm
# Playwright + chromium-headless-shell (not full chromium) for FE QA's
# browser-based rendering/a11y checks — scoped to this image so agent-dev-fe
# stays lean. Browsers land in /app/.playwright (not /app/.venv) so the
# closing chown only touches this new ~small dir, never the pre-owned .venv
# tree (a chown -R over .venv would COW-duplicate the whole thing into this
# layer — see the 0.19.0 lean-images CHANGELOG note on agent-grok's chown -R).
ENV PLAYWRIGHT_BROWSERS_PATH=/app/.playwright
RUN uv pip install --python /app/.venv/bin/python playwright \
&& /app/.venv/bin/playwright install --with-deps chromium-headless-shell \
&& chown -R agent:agent /app/.playwright
USER agent USER agent
LABEL role="frontend-qa" LABEL role="frontend-qa"
+16
View File
@@ -8,5 +8,21 @@ FROM roboco-agent-base
# - Image generation tools # - Image generation tools
# - Design token management # - Design token management
USER root
# Playwright + chromium-headless-shell for UX-QA's browser-based design/
# rendering verification. No dedicated ux-qa image exists — ux-qa runs this
# same image as ux-dev (see orchestrator.py IMAGE_MAP), so ux-dev picks this
# up too. Browsers land in /app/.playwright (not /app/.venv) so the closing
# chown only touches this new dir, never the pre-owned .venv tree (a
# chown -R over .venv would COW-duplicate the whole thing into this layer —
# see the 0.19.0 lean-images CHANGELOG note on agent-grok's chown -R).
ENV PLAYWRIGHT_BROWSERS_PATH=/app/.playwright
RUN uv pip install --python /app/.venv/bin/python playwright \
&& /app/.venv/bin/playwright install --with-deps chromium-headless-shell \
&& chown -R agent:agent /app/.playwright
USER agent
LABEL role="ux-designer" LABEL role="ux-designer"
LABEL description="UX/UI agent - design, prototyping, design system" LABEL description="UX/UI agent - design, prototyping, design system"