Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

feat(widgets): prove the deployed glance card renders, not just the one on disk

nirholas23ea927b7a06
diff --git a/docs/native-widgets.md b/docs/native-widgets.md
index fe0522c1b..46fd338b1 100644
--- a/docs/native-widgets.md
+++ b/docs/native-widgets.md
@@ -94,6 +94,15 @@ The board holds three moving parts: the `widgets` member of the PWA manifest (ge
`widgets.updateByTag`. `npm run check:windows-widget` verifies all three against each other
without Windows, and it is in `npm run gate`.
+That run reads this working tree, which is not the same question as "does the widget work right
+now". A pinned slot draws whatever is **deployed**, so a fix that is green here is still invisible
+to the board until it ships. `npm run check:windows-widget:live` asks the deployed question: it
+fetches the live manifest, service worker, card and data endpoint, binds them with the deployed
+worker's own payload builder in the board's own templating engine, and fails when the origin is
+serving a card that would render nothing. Point it elsewhere with
+`node scripts/check-windows-widget.mjs --live --base https://staging.example`. It needs the
+network, so it stays out of `npm run gate`; run it after a deploy that touched the widget.
+
Two traps are worth knowing before you touch the card, because both draw an empty slot rather
than an error, and neither is visible outside a real board:
diff --git a/package.json b/package.json
index 7f79956be..202ab8658 100644
--- a/package.json
+++ b/package.json
@@ -444,6 +444,7 @@
"check:macos-icon": "node apple/scripts/make-macos-icon.mjs --check",
"check:apple-widget": "node scripts/check-apple-widget.mjs",
"check:windows-widget": "node scripts/check-windows-widget.mjs",
+ "check:windows-widget:live": "node scripts/check-windows-widget.mjs --live",
"ios:open": "npm --prefix ios run open",
"clean:worktrees": "node scripts/clean-deploy-worktrees.mjs",
"prep:worktree": "node scripts/prepare-deploy-worktree.mjs",
diff --git a/prompts/finish/916-roadmap-native-widgets.md b/prompts/finish/916-roadmap-native-widgets.md
index 59081ce05..fee3847a1 100644
--- a/prompts/finish/916-roadmap-native-widgets.md
+++ b/prompts/finish/916-roadmap-native-widgets.md
@@ -1,12 +1,17 @@
# RM-WIDGETS: Native widgets, the agent on the home screen and the desktop
-**Status 2026-09-09: all four tasks are built and re-verified live, and the
-2026-09-04 worker fix is now deployed** (production `/glance-sw.js` is
-byte-identical to `public/glance-sw.js` as of revision 00418). **This file stays
-because two Definition of done lines cannot be closed from this machine** (one
-needs a Windows 11 machine, one needs an Apple Developer account), and the
-campaign's rule is to leave a work order in place until every line of it passes.
-Read "What remains", not the history above it.
+**Status 2026-09-09: all four tasks are built, and the 2026-09-04 worker fix is
+deployed** (production `/glance-sw.js` is still byte-identical to
+`public/glance-sw.js` at revision 00420). **The 2026-09-09 card fix is not
+deployed**, so a pinned Windows slot renders nothing today: production serves
+commit `880bdcef8` (2026-09-08 18:57Z) and the fix landed in `fe05babf6`
+(2026-09-09 05:41Z). That is now a one-command fact rather than a guess, via
+`npm run check:windows-widget:live` (added 2026-09-09), which binds the deployed
+card with the deployed worker in the board's own engine and currently exits 1.
+**This file stays because two Definition of done lines cannot be closed from this
+machine** (one needs a Windows 11 machine, one needs an Apple Developer account),
+and the campaign's rule is to leave a work order in place until every line of it
+passes. Read "What remains", not the history above it.
**How to run this:** paste this whole file into a fresh Claude Code chat opened in
`/workspaces/three.ws`. Also read `prompts/finish/_context/roadmap-00-README.md` and `CLAUDE.md`.
@@ -22,7 +27,7 @@ platform is a rendering job against it. Product documentation:
| --- | --- | --- |
| 1. The card endpoint, two encodings | `api/glance/card.js`, `api/glance/mine.js`, `api/glance/token.js`, `api/glance/template.js` | Live in production. Verified 2026-09-03: `mine?format=png` answers `200 image/png` unauthenticated with `x-glance-state: signed-out`, `token` answers `401` with no session, and a real mint on the QA account fetched every size, theme and scale. |
| 2. Android home screen widget | `solana-mobile/android-overlay/`, applied by `scripts/apply-overlay.mjs` inside `build-apk.sh` | In a signed APK (1.1.0, versionCode 2). All five emulator checks recorded in `solana-mobile/docs/CHECKLIST.md` section 7b. |
-| 3. Windows 11 widget | `widgets` member in `vite.config.js`, `public/glance-sw.js`, `api/glance/template.js` | Live: production `manifest.webmanifest` carries the member and `/glance-sw.js` serves 200. Guarded by `npm run check:windows-widget`. The card fix of 2026-09-09 is not deployed yet. |
+| 3. Windows 11 widget | `widgets` member in `vite.config.js`, `public/glance-sw.js`, `api/glance/template.js` | Live: production `manifest.webmanifest` carries the member and `/glance-sw.js` serves 200. Guarded by `npm run check:windows-widget` (offline, in `npm run gate`) and `npm run check:windows-widget:live` (deployed origin). The card fix of 2026-09-09 is not deployed yet, and the live guard fails on exactly that. |
| 4. macOS and iOS WidgetKit | `apple/` (shared `GlanceKit/`, extension `GlanceWidget/`, Mac app `macos/`), plus a `GlanceWidgetExtension` target in `ios/native/App/App.xcodeproj` | Written, wired, and guarded by `npm run check:apple-widget`. Not built: no Mac, and no signing identity. |
The one live number is **moves in the last 24 hours**, computed from the agent's
@@ -41,10 +46,14 @@ Neither line is code, and neither can be closed from this machine.
with the signed-in account's real card, refreshes, and that its click targets
land on the right routes. Owner, or anyone with a Windows 11 machine.
- **Run it against a deploy that carries 2026-09-09's card fix.** Everything
- about this line that can be checked without a board now is, mechanically, by
- `npm run check:windows-widget` (11 checks, in `npm run gate`). What is left
- for the human is genuinely only "a person sees the pixels".
+ **Run it against a deploy that carries 2026-09-09's card fix**, and do not
+ spend the trip before then: `npm run check:windows-widget:live` answers that
+ in one command, and today it exits 1 with `the deployed Adaptive Card differs
+ from api/_lib/glance-adaptive.js`. When it goes green, the deploy carries the
+ fix and the board check is worth a human's time. Everything about this line
+ that can be checked without a board now is, mechanically: 11 offline checks
+ in `npm run gate`, plus 5 more against the deployed origin. What is left for
+ the human is genuinely only "a person sees the pixels".
Four defects have been found here so far, none of them visible from Linux and
each of which would have failed this check on its own. Three came from reading
@@ -67,7 +76,13 @@ Neither line is code, and neither can be closed from this machine.
card rather than skipping the one binding, so the widget rendered **nothing
at all**. Both the code and the test that covered it shared the same wrong
assumption, which is why the guard now uses the real engine. Fixed in
- `api/_lib/glance-adaptive.js`; **this one still needs a deploy.**
+ `api/_lib/glance-adaptive.js`; **this one still needs a deploy** (any routine
+ deploy of `main` carries it, nothing widget-specific is required).
+
+ A fifth class of defect stands behind those four: a fix that is green in the
+ tree and absent from the deploy, which is what the widget is living through
+ right now. `--live` covers that class, so no future card change can be
+ believed shipped on the strength of a local run.
2. **Signing and shipping the two Apple binaries.** An Apple Developer account
is the blocker for both halves, not just the App Store one: the Mac app needs
a Developer ID certificate and the iOS extension needs App Store signing.
diff --git a/prompts/finish/_context/production-100-00-INDEX.md b/prompts/finish/_context/production-100-00-INDEX.md
index ca6f667fd..06497bd4e 100644
--- a/prompts/finish/_context/production-100-00-INDEX.md
+++ b/prompts/finish/_context/production-100-00-INDEX.md
@@ -95,7 +95,7 @@ run in parallel, H waits on owner gates, I is anytime, J is the parallel swarm.
| Creation consolidation (retired 2026-09-02) | Redirects and the save fix shipped. Its residue (Studio wardrobe, the `/embed` retirement and the `/start` decision) is unowned by any file; re-open a numbered order under this prefix if it is picked up. |
| Parametric avatar editor | Done 2026-09-03: 306 sliders, server-side proportion bake, free-sculpt brush, `specs/PARAMETRIC_AVATAR.md`. |
| Developer resources (order retired; owner step open) | Agent side shipped: `npm run export:satellites` stages the public examples repo offline. What remains is OWNER-ACTIONS row 16 (create the org and repo, then push), and the cross-links after it. |
-| [../roadmap/native-widgets.md](../916-roadmap-native-widgets.md) | All four tasks built. The card endpoint, the Android widget and the Windows manifest are live in production (re-verified 2026-09-04, including the Apple hand-off); task 4's WidgetKit extension, Mac app and iOS target are in `apple/` and guarded by `npm run check:apple-widget`. What is left is not code: signing and shipping the two Apple binaries needs row 17, and an in-board Windows check needs a Windows 11 machine. One caveat: 2026-09-04 fixed three defects in the Windows service worker (the Adaptive Card was never fetched, the refresh was never registered, a slot pinned before activation stayed empty), so run that board check only against a deploy carrying it. |
+| [../roadmap/native-widgets.md](../916-roadmap-native-widgets.md) | All four tasks built. The card endpoint, the Android widget and the Windows manifest are live in production (re-verified 2026-09-04, including the Apple hand-off); task 4's WidgetKit extension, Mac app and iOS target are in `apple/` and guarded by `npm run check:apple-widget`. What is left is not code: signing and shipping the two Apple binaries needs row 17, and an in-board Windows check needs a Windows 11 machine. One caveat: 2026-09-04 fixed three defects in the Windows service worker (the Adaptive Card was never fetched, the refresh was never registered, a slot pinned before activation stayed empty) and 2026-09-09 fixed a fourth in the card itself (a dotted array index the board's expression engine refuses, which empties the whole widget), so run that board check only against a deploy carrying both. The worker fix is live; the card fix is not. `npm run check:windows-widget:live` decides that in one command against any origin, and it exits 1 against production as of 2026-09-09. |
| [../gcp-credits/05-catalog-animation-seeding.md](../904-gcp-credits-05-catalog-animation-seeding.md) | Partial: the catalog seed runs at scale (56,898 avatars); the generated motion library has 0 clips. |
| Materialize (retired 2026-09-02) | Shipped: the print engine, quote and catalog, checkout on both lanes, fulfillment adapters and the operator console, on-chain certificates, the fabrication gate, docs and `specs/PRINT_PIPELINE.md`. Evidence in [materialize-PROGRESS.md](materialize-PROGRESS.md). |
| Simulation readiness (retired 2026-09-03) | Shipped: all 8 build tasks. Versioned grader, applied schema and store, the free `grade_sim_readiness` MCP tool and `GET /api/sim-readiness` over one shared handler, grading on the forge write path, the signed `simReadiness` field in provenance v2 (v1 credentials still verify), the badge and details panel on `/m/:id` and `/viewer`, and `docs/sim-readiness.md`. |
diff --git a/prompts/finish/_context/roadmap-00-README.md b/prompts/finish/_context/roadmap-00-README.md
index 36b48745d..54286d059 100644
--- a/prompts/finish/_context/roadmap-00-README.md
+++ b/prompts/finish/_context/roadmap-00-README.md
@@ -88,7 +88,7 @@ retired; they remain readable in git history
|---|---|---|
| [generation-suite.md](../009-roadmap-generation-suite.md) | Meshy and Tripo class parity, and production truth for every generation endpoint | Open. Step 0 and tasks 1 and 2 are done (2026-09-03): the truth table was rebuilt from live probes, and every row is green except the undeployed talking-avatar lane. That sweep found the default free image lane failing 44 of 49 generations for 12 hours while every status surface read green; it is restored and hardened, and `trellis_selfhost` now has a live health probe. Tasks 3 to 8 (pipeline tools in `/forge`, preview then refine, export formats, PBR controls, job webhooks, community gallery) are untouched. |
| [developer-resources-repos.md](roadmap-developer-resources-repos.md) | The public examples satellite repo and its one-way export | Done, retired 2026-09-03. `npm run export:satellites` stages 72 files and passes all four smoke stages; the docs, `llms.txt` and `llms-full.txt` cross-links are live. Only the owner-gated publish remains (create the `three-ws` org, run the printed push), tracked as row 16 of [production-100-OWNER-ACTIONS.md](production-100-OWNER-ACTIONS.md). |
-| [native-widgets.md](../916-roadmap-native-widgets.md) | Native widgets on the Android, Windows, macOS and iOS home screens | Built, all four surfaces. Android and Windows are live in production; the Apple sources are in `apple/`. Open only on what code cannot do: an Apple Developer account to sign the two binaries (owner action 17) and a Windows 11 machine for the in-board check, which wants a deploy carrying 2026-09-04's service worker fix. |
+| [native-widgets.md](../916-roadmap-native-widgets.md) | Native widgets on the Android, Windows, macOS and iOS home screens | Built, all four surfaces. Android and Windows are live in production; the Apple sources are in `apple/`. Open only on what code cannot do: an Apple Developer account to sign the two binaries (owner action 17) and a Windows 11 machine for the in-board check, which wants a deploy carrying 2026-09-09's Adaptive Card fix. Whether a given origin carries it is no longer a guess: `npm run check:windows-widget:live` binds the deployed card with the deployed worker in the board's own engine, and it exits 1 against production today. |
### Strategy and reference (read, do not execute)
diff --git a/scripts/check-windows-widget.mjs b/scripts/check-windows-widget.mjs
index e8a186bda..a435fc203 100644
--- a/scripts/check-windows-widget.mjs
+++ b/scripts/check-windows-widget.mjs
@@ -3,7 +3,9 @@
* Verifies the Windows 11 "Agent glance" widget against the contract the
* widgets board actually enforces.
*
- * node scripts/check-windows-widget.mjs
+ * node scripts/check-windows-widget.mjs # this working tree
+ * node scripts/check-windows-widget.mjs --live # what three.ws is serving
+ * node scripts/check-windows-widget.mjs --live --base https://staging.example
*
* Why this exists. The board is the one surface no machine in this repo can
* open: it needs Windows 11, Edge, and the PWA installed. Everything it does
@@ -22,9 +24,13 @@
* dotted index empties the entire widget.
*
* A green run means the manifest, the worker, the endpoints and the card agree
- * with each other and with the board's documented contract. It does not mean
- * anyone has seen the widget on a board; that is still a human step, and it is
- * the last open line of prompts/finish/916-roadmap-native-widgets.md.
+ * with each other and with the board's documented contract. `--live` says the
+ * same about a deployed origin, which the offline run cannot: a fix that is
+ * green here is still invisible to the board until it ships, and on 2026-09-09
+ * production was serving the unparseable card while every check on this disk
+ * passed. It does not mean anyone has seen the widget on a board; that is
+ * still a human step, and it is the last open line of
+ * prompts/finish/916-roadmap-native-widgets.md.
*/
import { readFileSync, existsSync } from 'node:fs';
@@ -37,6 +43,18 @@ import { adaptiveTemplate } from '../api/_lib/glance-adaptive.js';
const REPO = resolve(dirname(fileURLToPath(import.meta.url)), '..');
const read = (rel) => readFileSync(join(REPO, rel), 'utf8');
+const argv = process.argv.slice(2);
+/** `--base https://x` and `--base=https://x` both work, like the sibling checks. */
+function flag(name, fallback) {
+ const eq = argv.find((arg) => arg.startsWith(`--${name}=`));
+ if (eq) return eq.slice(name.length + 3);
+ const at = argv.indexOf(`--${name}`);
+ if (at >= 0 && argv[at + 1] && !argv[at + 1].startsWith('--')) return argv[at + 1];
+ return fallback;
+}
+const LIVE = argv.includes('--live');
+const BASE = flag('base', 'https://three.ws').replace(/\/$/, '');
+
const problems = [];
const fail = (msg) => problems.push(msg);
let checks = 0;
@@ -44,6 +62,10 @@ const pass = (msg) => {
checks++;
console.log(`[windows-widget] ok ${msg}`);
};
+/** Print "ok" only when the step that just ran added no problems of its own. */
+const passUnless = (before, msg) => {
+ if (problems.length === before) pass(msg);
+};
// https://learn.microsoft.com/en-us/microsoft-edge/progressive-web-apps/how-to/widgets
// `ms_ac_template` and `data` are what make the widget renderable at all; the
@@ -213,10 +235,14 @@ pass(`the worker registers the ${widget.update}s refresh the manifest advertises
// ------------------------------------------------------------------- card ---
-/** The worker's own payload builder, which is what the board binds. */
-function loadPayloadBuilder() {
+/**
+ * The worker's own payload builder, which is what the board binds. Taking the
+ * source as an argument is what lets `--live` run the DEPLOYED worker against
+ * the DEPLOYED card, rather than proving the two files on this disk agree.
+ */
+function loadPayloadBuilder(source) {
const self = { addEventListener() {}, registration: {} };
- runInNewContext(sw, {
+ runInNewContext(source, {
self,
caches: undefined,
fetch: undefined,
@@ -228,51 +254,60 @@ function loadPayloadBuilder() {
return self.__threewsGlancePayload;
}
-const glancePayload = loadPayloadBuilder();
+/** The three states a pinned slot can be in, as the data endpoint reports them. */
+const CARD_STATES = [
+ ['signed out', { signedIn: false, signInUrl: 'https://three.ws/login' }],
+ ['no agent yet', { signedIn: true, card: null, createUrl: 'https://three.ws/create' }],
+ [
+ 'a live agent',
+ {
+ signedIn: true,
+ card: {
+ name: 'Atlas Scout',
+ headline: 'Working.',
+ url: 'https://three.ws/agents/abc',
+ metric: { label: 'Moves today', value: 17 },
+ stats: [
+ { label: 'This week', value: 96 },
+ { label: 'All time', value: 400 },
+ { label: 'Days live', value: 12 },
+ ],
+ },
+ },
+ ],
+];
+
+/**
+ * Bind one card in the board's own templating engine and report what a pinned
+ * slot would draw. The engine throws on the whole card rather than skipping a
+ * bad binding, so a single unparseable path renders as nothing at all.
+ */
+function expandCard(template, payload, label, where = '') {
+ let card;
+ try {
+ card = new Template(structuredClone(template)).expand({ $root: payload });
+ } catch (err) {
+ fail(`${where}the card does not expand in the board's engine for "${label}": ${err.message}`);
+ return null;
+ }
+ if (JSON.stringify(card).includes('${')) {
+ fail(`${where}the card still holds unbound expressions for "${label}", which draw as empty rows`);
+ }
+ for (const action of card.actions || []) {
+ if (!/^https:\/\//.test(action.url || '')) {
+ fail(`${where}the "${action.title}" button goes to "${action.url}" for "${label}", not a real route`);
+ }
+ }
+ return card;
+}
+
+const glancePayload = loadPayloadBuilder(sw);
if (typeof glancePayload !== 'function') {
fail('the worker no longer exposes its payload builder, so the card cannot be checked against it');
} else {
- const STATES = [
- ['signed out', { signedIn: false, signInUrl: 'https://three.ws/login' }],
- ['no agent yet', { signedIn: true, card: null, createUrl: 'https://three.ws/create' }],
- [
- 'a live agent',
- {
- signedIn: true,
- card: {
- name: 'Atlas Scout',
- headline: 'Working.',
- url: 'https://three.ws/agents/abc',
- metric: { label: 'Moves today', value: 17 },
- stats: [
- { label: 'This week', value: 96 },
- { label: 'All time', value: 400 },
- { label: 'Days live', value: 12 },
- ],
- },
- },
- ],
- ];
const template = adaptiveTemplate();
- for (const [label, body] of STATES) {
- let card;
- try {
- card = new Template(structuredClone(template)).expand({ $root: glancePayload(body) });
- } catch (err) {
- fail(`the card does not expand in the board's engine for "${label}": ${err.message}`);
- continue;
- }
- const text = JSON.stringify(card);
- if (text.includes('${')) {
- fail(`the card still holds unbound expressions for "${label}", which draw as empty rows`);
- }
- for (const action of card.actions || []) {
- if (!/^https:\/\//.test(action.url || '')) {
- fail(`the "${action.title}" button goes to "${action.url}" for "${label}", not a real route`);
- }
- }
- }
- pass(`the card expands in the board's own engine for all ${STATES.length} states`);
+ for (const [label, body] of CARD_STATES) expandCard(template, glancePayload(body), label);
+ pass(`the card expands in the board's own engine for all ${CARD_STATES.length} states`);
}
// The two buttons are the widget's only click targets, and a fallback that
@@ -291,6 +326,121 @@ for (const url of fallbacks) {
}
pass(`${fallbacks.length} fallback targets in the card resolve to real routes and assets`);
+// ------------------------------------------------------------------- live ---
+
+/**
+ * `--live` runs the same contract against a DEPLOYED origin instead of this
+ * disk. It exists because every check above passes on a commit that has not
+ * shipped: on 2026-09-09 the card fix was green here and production was still
+ * serving the template that rendered nothing, which is invisible from Linux
+ * and would have cost a human a trip to a Windows board to discover. This
+ * fetches what the board fetches, binds it with the deployed worker's own
+ * payload builder, and says whether a pinned slot would draw.
+ */
+async function fetchDeployed(path) {
+ const url = new URL(path, BASE).toString();
+ const res = await fetch(url, {
+ headers: { 'user-agent': 'three-ws-windows-widget-check' },
+ signal: AbortSignal.timeout(20000),
+ });
+ return { url, res, text: res.ok ? await res.text() : '' };
+}
+
+async function checkLive() {
+ console.log(`[windows-widget] live probe against ${BASE}`);
+
+ let mark = problems.length;
+ const manifest = await fetchDeployed('/manifest.webmanifest');
+ if (!manifest.res.ok) {
+ fail(`live: ${manifest.url} answered ${manifest.res.status}, so the board can find no widget to pin`);
+ return;
+ }
+ const deployedWidget = (JSON.parse(manifest.text).widgets || [])[0];
+ if (!deployedWidget) {
+ fail('live: the deployed manifest declares no widgets member, so the widget is unpinnable');
+ return;
+ }
+ for (const field of ['tag', 'ms_ac_template', 'data', 'type', 'update']) {
+ if (JSON.stringify(deployedWidget[field]) !== JSON.stringify(widget[field])) {
+ fail(
+ `live: the deployed manifest declares ${field} ${JSON.stringify(deployedWidget[field])} but this tree declares ${JSON.stringify(widget[field])}`,
+ );
+ }
+ }
+ passUnless(mark, `live: the deployed manifest declares the ${deployedWidget.tag} widget as this tree does`);
+
+ mark = problems.length;
+ const worker = await fetchDeployed('/glance-sw.js');
+ if (!worker.res.ok) {
+ fail(`live: ${worker.url} answered ${worker.res.status}, so nothing services a pinned slot`);
+ return;
+ }
+ if (worker.text !== sw) {
+ fail('live: the deployed /glance-sw.js differs from public/glance-sw.js, so the board runs worker code this check never read');
+ }
+ passUnless(mark, 'live: the deployed worker is byte-identical to public/glance-sw.js');
+
+ const deployedPayload = loadPayloadBuilder(worker.text);
+ if (typeof deployedPayload !== 'function') {
+ fail('live: the deployed worker exposes no payload builder, so its card cannot be bound here');
+ return;
+ }
+
+ mark = problems.length;
+ const card = await fetchDeployed(deployedWidget.ms_ac_template);
+ if (!card.res.ok) {
+ fail(`live: ${card.url} answered ${card.res.status}, so the board has no card to draw`);
+ return;
+ }
+ let deployedTemplate;
+ try {
+ deployedTemplate = JSON.parse(card.text);
+ } catch (err) {
+ fail(`live: ${card.url} did not answer JSON: ${err.message}`);
+ return;
+ }
+ if (JSON.stringify(deployedTemplate) !== JSON.stringify(adaptiveTemplate())) {
+ fail(
+ `live: the deployed Adaptive Card differs from api/_lib/glance-adaptive.js, so ${BASE} predates the card in this tree`,
+ );
+ }
+ passUnless(mark, 'live: the deployed Adaptive Card is the one this tree generates');
+
+ mark = problems.length;
+ const data = await fetchDeployed(deployedWidget.data);
+ if (!data.res.ok) {
+ fail(`live: ${data.url} answered ${data.res.status}, so a pinned slot has nothing to bind`);
+ return;
+ }
+ let body;
+ try {
+ body = JSON.parse(data.text);
+ } catch (err) {
+ fail(`live: ${data.url} did not answer JSON: ${err.message}`);
+ return;
+ }
+ expandCard(deployedTemplate, deployedPayload(body), 'the live signed-out response', 'live: ');
+ for (const [label, state] of CARD_STATES) {
+ expandCard(deployedTemplate, deployedPayload(state), label, 'live: ');
+ }
+ passUnless(mark, `live: the deployed card binds the live response and all ${CARD_STATES.length} states in the board's engine`);
+
+ mark = problems.length;
+ const assets = [...(deployedWidget.icons || []), ...(deployedWidget.screenshots || [])];
+ for (const asset of assets) {
+ const probe = await fetchDeployed(`/${String(asset.src).replace(/^\//, '')}`);
+ if (!probe.res.ok) {
+ fail(`live: the widget picker asset ${asset.src} answered ${probe.res.status}`);
+ continue;
+ }
+ const type = probe.res.headers.get('content-type') || '';
+ if (!type.startsWith('image/')) fail(`live: ${asset.src} is served as "${type}", not an image`);
+ }
+ passUnless(mark, `live: all ${assets.length} icons and screenshots the picker shows are served`);
+}
+
+if (LIVE) await checkLive();
+
// ---------------------------------------------------------------- verdict ---
if (problems.length) {