diff --git a/internal/embed-smoke.mjs b/internal/embed-smoke.mjs index 36e0246b3..93ce5246e 100644 --- a/internal/embed-smoke.mjs +++ b/internal/embed-smoke.mjs @@ -91,7 +91,22 @@ for (const t of list) { if (verdict.errorCard) r.why = 'ProfileLoader error card shown' else if (verdict.nodes < 5) r.why = `shadow DOM nearly empty (${verdict.nodes} nodes)` else { r.ok = true; r.why = `${verdict.nodes} nodes${verdict.canvas ? ' + canvas' : ' (no canvas — DOM profile)'}` } - } catch (e) { r.why = 'mount timeout / ' + String(e.message || e).slice(0, 100) } + } catch (e) { + // ★ DO NOT COLLAPSE EVERY REJECTION INTO "mount timeout" — that is a DIAGNOSIS, and it was + // the WRONG one. A malformed @element in the manifest made querySelector throw a SyntaxError; + // reported as "mount timeout", it accused big-picture (tab-1 of the cap-5 SPA) of being a + // broken plugin for as long as this suite has existed. The plugin was fine; the SELECTOR was + // invalid. Name what actually happened and let the reader diagnose. + const msg = String(e.message || e) + if (/SyntaxError|is not a valid selector|failed to execute 'queryselector'/i.test(msg)) { + r.why = `INVALID SELECTOR — @element is not a bare tag: ${JSON.stringify(t.element)} ` + + '(fix the @element JSDoc in the bundle\'s root .vue; it is copied verbatim into manifest.json)' + } else if (/Timeout|exceeded/i.test(msg)) { + r.why = 'mount timeout / ' + msg.slice(0, 100) + } else { + r.why = 'error / ' + msg.slice(0, 100) + } + } if (errors.length && r.ok) r.why += ` · ${errors.length} pageerror(s): ${errors[0]}` results.push(r) console.log(` ${r.ok ? '✓' : '✗'} ${t.bundle}/${t.profile} <${t.element}> — ${r.why}`) diff --git a/plugin-designs/big-picture/big-picture.vue b/plugin-designs/big-picture/big-picture.vue index 5d5dc4e46..a18cd502d 100644 --- a/plugin-designs/big-picture/big-picture.vue +++ b/plugin-designs/big-picture/big-picture.vue @@ -34,7 +34,17 @@ * * @profile big-picture * @bundle big-picture - * @element bp-big-picture (this composite) + bp-research-header + people-groups-grid (nested) + * @element bp-big-picture + * + * ★ @element MUST BE A BARE TAG — ONE VALID CSS SELECTOR, NOTHING ELSE. + * It was previously prose: "bp-big-picture (this composite) + bp-research-header + + * people-groups-grid (nested)". generate-tree copies @element VERBATIM into manifest.json, and + * consumers feed that value straight to document.querySelector(). The prose threw + * "SyntaxError: Failed to execute 'querySelector'", which embed-smoke's catch-all reported as + * "mount timeout" — so a DATA defect in this comment masqueraded as a BROKEN PLUGIN, on the one + * bundle that is tab-1 of the cap-5 SPA. big-picture mounts fine; only this string was invalid. + * Every other bundle in the repo declares a single bare tag; this was the lone outlier. + * The nested elements are documented above and in @composes — they do not belong in @element. * * Becomes tab-1 of the Cat-5 SPA. */