CodeIssuesPull RequestsActionsSecurityInsights
✨ AI
More
Settings

feat(design): render manifest — the contract for the full visual sweep #5532

Merged⚡ AI-generatedXSccantynz wants to mergefix/digest-palette-and-design-auditmainopened 8d ago
1 changed file+51−0
Addedscripts/design-render-manifest.mjs+51−0View fileUnifiedSplit
1// Design-render manifest — the contract for a full visual sweep.
2//
3// Owner ask 2026-08-25: "a full design render of each page — we have lots
4// of CSS problems." This script derives the COMPLETE page list from the
5// same router-derived surface registry the spine monitors (never a
6// hand-curated list — the partial-coverage-that-renders-as-complete trap),
7// fills repo-scoped params with a real public repo, and emits the render
8// contract as JSON: every page x viewport x theme.
9//
10// Consumers:
11// - the Vapron browser-rendering service (headless sweep → PNGs)
12// - the Claude-in-Chrome extension flow (interactive review)
13// - any future nightly design-render job on the estate
14//
15// Usage: bun scripts/design-render-manifest.mjs [--repo owner/name] > manifest.json
16//
17// Theme note for renderers: dark mode is applied by setting cookie
18// `theme=dark` before load (the pre-paint script reads it); light needs no
19// cookie. Screenshot after network-idle + 300ms settle.
20
21import { surfaceSpecs } from "../src/lib/surface-monitor.ts";
22
23const argIdx = process.argv.indexOf("--repo");
24const repo = argIdx >= 0 ? process.argv[argIdx + 1] : "ccantynz/Gluecron.com";
25
26const specs = surfaceSpecs({ repo });
27const pages = [...new Set(specs.map((s) => s.path))].sort();
28
29const manifest = {
30 generatedAt: new Date().toISOString(),
31 base: "https://gluecron.com",
32 repoParam: repo,
33 viewports: [
34 { name: "desktop", width: 1440, height: 900 },
35 { name: "tablet", width: 768, height: 1024 },
36 { name: "mobile", width: 390, height: 844 },
37 ],
38 themes: [
39 { name: "light", cookie: null },
40 { name: "dark", cookie: "theme=dark" },
41 ],
42 settle: { waitUntil: "networkidle", extraMs: 300 },
43 output: "png per page x viewport x theme, named <path-slug>--<viewport>--<theme>.png",
44 pages,
45 totalRenders: pages.length * 3 * 2,
46};
47
48console.log(JSON.stringify(manifest, null, 2));
49console.error(
50 `[design-render-manifest] ${pages.length} pages -> ${manifest.totalRenders} renders (3 viewports x 2 themes)`
51);
052
c comment · e edit title · m merge · a approve · r request changes · ? shortcuts