From e7eeb4d02aabe09b62fb3259a882505429518afc Mon Sep 17 00:00:00 2001 From: doxa-maps Date: Tue, 22 Sep 2026 03:55:18 +0000 Subject: [PATCH] golden-path-check: walk the develop-a-plugin-and-see-it-live path end to end The north star is that an admin agent can author a plugin, build it, publish it and see it live. Every step was documented and individually verified, but never walked in one pass by following the doc as written. This plugin is that walk, authored from the documented three-file minimum. It stays useful afterwards: it reads the manifest.json it was published beside and reports what the catalog actually contains -- bundle and profile counts, how many profiles describe themselves, and whether it is listed. If you can see it answering, the path worked. Deliberately dependency-free: no map engine, no token, no data API, so it can mount when everything else is broken, which is when someone reaches for it. The walk found a real defect in my own plugin, which is the point of doing it. The first version wrapped the element in ProfileLoader (copied from a MAP bundle) without createPinia. ProfileLoader builds three stores in setup(), so setup threw -- and a thrown setup removes the subtree silently. Build green, manifest listed it, nothing complained. Only smoke:embeds caught it: "shadow DOM nearly empty (1 nodes)". That is exactly what Step 3b exists for and why the doc puts it before publish. The fix is the cap-1 pattern doxa-vision-card already uses: mount the root SFC directly. ProfileLoader earns its cost for a map plugin; it is the wrong wrapper for an element that draws no tiles and takes no token. Verified: 17 -> 18 bundles, 26 -> 27 profiles, auto-discovered with no config edit; renders 19 shadow nodes reporting live catalog state; embed suite 41/41. --- .../golden-path-check/golden-path-check.vue | 169 ++++++++++++++++++ plugin-designs/golden-path-check/index.html | 47 +++++ plugin-designs/golden-path-check/index.js | 41 +++++ 3 files changed, 257 insertions(+) create mode 100644 plugin-designs/golden-path-check/golden-path-check.vue create mode 100644 plugin-designs/golden-path-check/index.html create mode 100644 plugin-designs/golden-path-check/index.js diff --git a/plugin-designs/golden-path-check/golden-path-check.vue b/plugin-designs/golden-path-check/golden-path-check.vue new file mode 100644 index 000000000..11f26f2d7 --- /dev/null +++ b/plugin-designs/golden-path-check/golden-path-check.vue @@ -0,0 +1,169 @@ + + + + + diff --git a/plugin-designs/golden-path-check/index.html b/plugin-designs/golden-path-check/index.html new file mode 100644 index 000000000..27f8b251c --- /dev/null +++ b/plugin-designs/golden-path-check/index.html @@ -0,0 +1,47 @@ + + + + + + doxa-maps · golden-path-check staging + + + + + + + +
+

golden-path-check · staging

+

+ The capability-1 self-test of the develop-a-plugin-and-see-it-live path. It reads the + manifest.json it was published beside and reports what the catalog contains. +

+ +
+
<golden-path-check>
+
+ +
+
+
+ + + + diff --git a/plugin-designs/golden-path-check/index.js b/plugin-designs/golden-path-check/index.js new file mode 100644 index 000000000..a26fd3b5c --- /dev/null +++ b/plugin-designs/golden-path-check/index.js @@ -0,0 +1,41 @@ +/** + * plugin-designs/golden-path-check/index.js + * + * Bundle entry for the GOLDEN PATH CHECK — the capability-1 self-test of the + * develop-a-plugin-and-see-it-live path. + * + * Usage from a host page: + * + * + * + * Registers ONLY its own tag (one-shot-define safety: never re-register another bundle's tag, + * never import another plugin's components). + * + * ★ MOUNTS THE ROOT SFC DIRECTLY — no ProfileLoader. This is the cap-1 pattern, and it is the + * SAME choice doxa-vision-card makes. It is also a defect this plugin HIT and fixed, which is + * worth recording because it is the first thing a new plugin author will get wrong: + * + * The first version wrapped this element in ProfileLoader (copying all-people-groups, a MAP + * bundle) but omitted `app.use(createPinia())`. ProfileLoader creates uiStore/mapStore/ + * dataStore in its setup(), so without Pinia its setup THREW — and a thrown setup() removes + * the subtree SILENTLY. The build stayed green, the manifest listed the bundle, and only + * `bun run smoke:embeds` caught it: "shadow DOM nearly empty (1 nodes)". That is exactly the + * failure Step 3b of the golden path exists to catch, and why the doc puts it BEFORE publish. + * + * The fix is not "add Pinia". ProfileLoader exists to parse profile-config, resolve a profile + * .vue, and wire a token / dataSource / colorSet / stores — a MAP plugin's needs. This element + * draws no tiles, fetches no API and takes no token, so routing it through the loader would + * add three stores and a config parser to a component that wants none of them. A cap-1 element + * mounts its own SFC; reach for ProfileLoader when you actually need what it provides. + */ + +import { defineCustomElement } from 'vue' +import GoldenPathCheck from './golden-path-check.vue' + +const GoldenPathCheckElement = defineCustomElement(GoldenPathCheck) + +if (typeof customElements !== 'undefined' && !customElements.get('golden-path-check')) { + customElements.define('golden-path-check', GoldenPathCheckElement) +} + +export default GoldenPathCheckElement