Captures dashboard screenshots across the state matrix and (optionally) critiques them using the 9-dimension AI rubric.
Usage
mix scoria.ui.shots [options]Options
--critique— Run the critique pass after capturing screenshots.Requires `ANTHROPIC_API_KEY` to be set. Writes per-screen findings JSON alongside the PNGs.--url— Base URL for the local dev server(default: `http://localhost:4799/scoria`).--tenant-empty— Tenant slug for the empty-state captures(default: `empty-tenant`).--tenant-seeded— Tenant slug for the populated-state captures(default: `acme-corp`).--release-id— UUID of the seeded draft prompt template to navigateto the release workbench. If omitted, the script follows the first release link on the /prompts list.
Prerequisites
Node.js >= 18installed and onPATH.Playwright+ Chromium installed:npm install -g playwright && npx playwright install chromiumThe dev server must be running with seed data applied:
mix run priv/repo/dev_seed.exs make dev
Screenshot pass
The screenshot pass shells out to priv/dev/shots.mjs via Node.js. It does
not start the Elixir application — the Node/Playwright process drives the
running dev server directly. Outputs land in priv/shots/{date}/.
Critique pass (--critique)
Starts the Elixir app (to access ReqLLM), then calls the UI critique screen
function on each screen's canonical state
(populated × desktop × dark) and writes a findings JSON file alongside
the PNG. After the per-screen loop completes, aggregates the findings
into priv/shots/gap_register.md (the stable top-level baseline path).