by adom
The hero-image lab with a human gate: `hero-studio pose <owner/slug>` opens the studio in front of the human, posed for their package, and blocks until they click Generate, producing the provenance-stamped 2000x1250 PNG the registry's hero gate requires. The image carries the title and artwork; the exported image also bakes the type pill (top right) and full wiki slug (bottom right); the page shows the hero bare, and only the homepage marquee overlays its own dynamic info. Every hero wears its P
master
Colby Knox
Full test suite in the page repo: npm test runs here (the published package carries only test/brand.mjs)
625499c
#!/bin/bash
# Pixel-parity harness for the wizard redesign: drives 12 canonical poses
# through a running studio server and composes each to a PNG.
#
# test/parity.sh <outdir> # server on $HERO_STUDIO_PORT or 8898
# python3 test/pixdiff.py <a> <b> # compare two runs; exit 1 on any diff
#
# The export view must stay pixel-identical across refactors: run once before
# a change, once after, and diff. Uses circuitSeed 424242 so the circuitry
# theme is deterministic.
set -e
OUT=$1
[ -z "$OUT" ] && { echo "usage: parity.sh <outdir>"; exit 2; }
mkdir -p "$OUT"
ROOT=$(cd "$(dirname "$0")/.." && pwd)
S=http://127.0.0.1:${HERO_STUDIO_PORT:-8898}
T='"aiThread":"parity harness"'
post() { curl -s -X POST "$S$1" -H 'Content-Type: application/json' -d "$2" > /dev/null; }
reset() {
post /preset "{$T,\"name\":\"studio-default\"}"
post /state "{$T,\"showcase\":{\"src\":\"\",\"full\":false,\"cover\":false,\"chrome\":\"\"},\"bgImage\":{\"src\":\"\",\"cover\":false},\"headline\":\"\",\"subtitle\":\"\",\"accentWords\":null,\"page\":\"adom/adom-tts\",\"guides\":false,\"marqueePreview\":false,\"verify\":false,\"tour\":false,\"circuitSeed\":424242}"
}
shoot() { curl -s -o "$OUT/$1.png" "$S/compose.png"; echo " $1: $(stat -c%s "$OUT/$1.png") bytes"; }
for L in bleed-bottom bleed-right bleed-top contained mirror showcase; do
reset; post /state "{$T,\"layout\":\"$L\"}"; shoot "layout-$L"
done
reset; post /state "{$T,\"theme\":\"circuitry\",\"circuitSeed\":424242}"; shoot theme-circuitry
reset; post /state "{$T,\"theme\":\"gradient\",\"gradAngle\":200,\"titleMode\":\"both\",\"show\":{\"description\":true}}"; shoot theme-gradient-both
reset; post /showcase-file "{$T,\"path\":\"$ROOT/generated/latest.png\"}"; post /state "{$T,\"showcase\":{\"chrome\":\"bare\"},\"layout\":\"bleed-right\"}"; shoot showcase-bare
reset; post /showcase-file "{$T,\"path\":\"$ROOT/generated/latest.png\"}"; post /state "{$T,\"showcase\":{\"full\":true},\"overlay\":{\"logo\":true}}"; shoot fullimport-stamp
reset; post /state "{$T,\"page\":\"adom/adom-tts\",\"brand\":{\"accent\":\"#ff7a1e\",\"bg\":\"#101820\"},\"overlay\":{\"slug\":true}}"; shoot brand-slug
reset; post /state "{$T,\"mode\":\"component\",\"comp\":{\"id\":\"sm02b-srss-tb\",\"imgSrc\":\"phong\",\"layout\":\"photo-left\",\"mpn\":\"eyebrow\"},\"theme\":\"pcb\"}"; shoot component-phong
reset