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
← Commit history
Publish 0.23.4
4 files changed
+20−5
package.json+1−1@@ -2,7 +2,7 @@ "slug": "hero-studio", "title": "Hero Studio", "type": "app",- "version": "0.23.3",+ "version": "0.23.4", "description": "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 PAGE OWNER's brand guide (<owner>/brand): colors, type, logo and background themes, Adom's included; an unresolved guide holds unbranded rather than borrowing Adom's look. Placement is fixed for all. The floating app window is the showcase: it auto-loads a real screenshot from the package's wiki page (screenshots/, docs/), takes a manual import, or a full-hero import (the human-ratified re-stamp path for existing heroes). The pose gate opens in verification mode: per-item checklist (title, subtitle, showcase, type match) and a Generate that unlocks only fully confirmed. Includes showcase bleeds, brand tile themes, gradient angles, pixel-faithful wiki marquee and index-card previews, and a component-hero mode with a photo/raytrace/phong fallback ladder.", "license": "MIT", "tags": [
page.json+1−1@@ -2,7 +2,7 @@ "slug": "hero-studio", "title": "Hero Studio", "type": "app",- "version": "0.23.3",+ "version": "0.23.4", "description": "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 PAGE OWNER's brand guide (<owner>/brand): colors, type, logo and background themes, Adom's included; an unresolved guide holds unbranded rather than borrowing Adom's look. Placement is fixed for all. The floating app window is the showcase: it auto-loads a real screenshot from the package's wiki page (screenshots/, docs/), takes a manual import, or a full-hero import (the human-ratified re-stamp path for existing heroes). The pose gate opens in verification mode: per-item checklist (title, subtitle, showcase, type match) and a Generate that unlocks only fully confirmed. Includes showcase bleeds, brand tile themes, gradient angles, pixel-faithful wiki marquee and index-card previews, and a component-hero mode with a photo/raytrace/phong fallback ladder.", "license": "MIT", "tags": [
public/js/app.js+6−1@@ -1806,7 +1806,12 @@ Promise.all([ const el = document.querySelector(location.hash); if (el) setTimeout(() => el.scrollIntoView({ block: 'start' }), 300); }- if (RENDER_VIEW) return; // render view: the state it loaded is the state it renders+ if (RENDER_VIEW) {+ // The renderer waits on this mark (plus fonts and images) rather than on network+ // silence, so a background request can never stall a Generate again (hero-studio#67).+ document.body.dataset.rendered = '1';+ return; // render view: the state it loaded is the state it renders+ } const es = new EventSource('events'); es.addEventListener('state', e => { receiveState(JSON.parse(e.data)); syncPagesIfStale(state); render(); }); es.addEventListener('fit', e => { let m = null; try { m = (JSON.parse(e.data) || {}).max; } catch {} setTimeout(() => runFit(m), 80); });
render-hero.mjs+12−2@@ -15,8 +15,18 @@ const browser = await puppeteer.launch({ try { const page = await browser.newPage(); await page.setViewport({ width: 1680, height: 1080, deviceScaleFactor: 2 });- await page.goto(url, { waitUntil: 'networkidle2', timeout: 30000 });- await new Promise(r => setTimeout(r, 1200)); // fonts + images settle+ // Wait for the render view's own "rendered" mark, its fonts and every image,+ // not for network silence: a page that keeps any request going (a stream, a+ // poll, a write loop) never goes idle, and Generate then died at the 30 s+ // navigation timeout (hero-studio#67).+ await page.goto(url, { waitUntil: 'load', timeout: 30000 });+ await page.waitForFunction(+ () => document.body.dataset.rendered === '1'+ && document.fonts.status === 'loaded'+ && [...document.images].every((i) => i.complete),+ { timeout: 30000, polling: 100 },+ );+ await new Promise(r => setTimeout(r, 400)); // one more frame for late layout await page.waitForFunction(() => !window.__tracePending, { timeout: 30000 }); await page.evaluate(async () => { await window.__traceReady; if (window.__traceError) throw new Error(window.__traceError); }); const hero = await page.$('#hero');