#!/usr/bin/env node /** * Visual acceptance harness for the pi2 web console (WS-F in * `/tmp/pi2d-port/PLAN.md` §3.3). * * Shoots the built console (`web/dist`) through the zero-dependency fixture * server (`scripts/ui-mock-server.mjs`), across 4 pages × 3 viewports × 2 * themes, and asserts the parity invariants that a screenshot alone cannot * prove: no console error, no horizontal overflow, no `.tabbar`, no navigation * on `/connect`, and the per-page primary-button budget (workspaces = 1, * status = 0, connect = 1). * * Usage: * pnpm --dir web build # prerequisite * node scripts/ui-shots.mjs --serve-static --round r1 --out /tmp/pi2d-port/shots/r1 * node scripts/ui-shots.mjs --base http://127.0.0.1:7676 # against a real daemon * node scripts/ui-shots.mjs --serve-static --matrix=quick # 1440×900 × light/dark * * Options: * --serve-static spawn the mock daemon and serve `web/dist` from it * --base shoot an already running daemon instead (implies no spawn) * --out output dir (default: /tmp/pi2d-port/shots/) * --round