| name | zerg-ui |
| description | Capture Zerg UI screenshots and debug bundles. Use for UI debugging, QA, and visual verification. |
Zerg UI Capture
Quick Look (Public Pages)
For landing page or public pages, use browser-hub MCP directly:
mcp__browser-hub__browser(action="navigate", url="https://longhouse.ai")
mcp__browser-hub__browser(action="look")
Local Debug Bundle (Authenticated Views)
Requires make dev running. Produces a full debug bundle:
make ui-capture
make ui-capture PAGE=machines
make ui-capture PAGE=health
make ui-capture SCENE=empty
make ui-capture SCENE=onboarding-modal
make ui-capture SCENE=timeline-card-stress VIEWPORT=mobile
make ui-capture PAGE=session-detail SCENE=session-detail-stress
make ui-capture ALL=1
make qa-ui-workbench
Output: artifacts/ui-capture/<timestamp>/
<page>.png - Screenshot
<page>-a11y.json|yml - Accessibility snapshot (JSON if available, YAML via ariaSnapshot fallback)
trace.zip - Playwright trace (open with bunx playwright show-trace)
console.log - Console output
manifest.json - Metadata + paths
- Workbench runs also write
index.html at the run root for one-page screenshot review
Reading Bundle Artifacts
Read(file_path="artifacts/ui-capture/<timestamp>/manifest.json")
Read(file_path="artifacts/ui-capture/<timestamp>/timeline.png")
Read(file_path="artifacts/ui-capture/<timestamp>/timeline-a11y.json")
Read(file_path="artifacts/ui-capture/<timestamp>/timeline-a11y.yml")
Scenes (Deterministic States)
| Scene | What it sets up |
|---|
demo | Seeds 2 demo sessions (default) |
empty | No data, empty state UI — calls the dev-only session reset endpoint (requires AUTH_DISABLED=1) |
onboarding-modal | Shows first-time setup modal |
missing-api-key | API key required modal visible |
timeline-card-stress | Fixture-backed timeline API responses for card layout QA without relying on live demo DB shape |
session-detail-stress | Fixture-backed managed session workspace with branch seam, tool rows, active runtime strip, and dock controls |
Visual Regression (CI)
make qa-ui-baseline
make qa-ui-baseline-update
make qa-ui-baseline-mobile
SKIP_LLM=1 make qa-visual-compare
iOS Layout QA (No Simulator)
The simulator requires auth and can't be scripted past a login screen. For iOS layout work, mock the chrome in HTML and screenshot with Playwright instead:
cat > /tmp/ios-mock.html << 'EOF'
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=393, initial-scale=1">
<style>
* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, sans-serif; }
body { background:
/* mirror SwiftUI .bar material: */ .bar { background: rgba(28,28,30,0.92); border-top: 1px solid rgba(255,255,255,0.1); }
</style>
</head>
<body>
<!-- your mock layout here -->
</body>
</html>
EOF
bunx playwright screenshot --browser chromium --viewport-size "393,852" "file:///tmp/ios-mock.html" /tmp/ios-mock.png
Then Read(/tmp/ios-mock.png) to inspect with vision. Iterate HTML until the layout is right, then translate to SwiftUI. Not pixel-perfect (no SF Symbols, no blur material) but catches layout problems — crowded rows, wrong spacing, accidental tap targets — in ~2s per iteration.
Add #Preview blocks in a *Previews.swift file (see SessionViewPreviews.swift) for a Xcode canvas view once the structure is settled.
Gotchas
- Dev must be running:
curl localhost:47300/health
- Local dev has AUTH_DISABLED=1 (auto-logged-in)
- Animations disabled via CSS injection
- Trace files:
bunx playwright show-trace trace.zip to debug
- Output is in
artifacts/ui-capture/ (gitignored)