mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-11 21:57:14 +03:00
The list of Live chrome surfaces was inlined into live-browser.js as a function-scope const when live/ui-core.mjs was deleted for having zero in-repo references. It had one out-of-repo reference. The private impeccable-site repo imports it at build time: its Live UI lab must hold a snapshot for every surface Live defines, and the site build fails with the surface name when one is missing. Inlining put the list out of reach of every Node importer, so the site had to regex it back out of the browser script, and the guard only kept passing because the site's materialized copy of skill/ was stale. A guard that reads a list the site itself maintains guards nothing, so the fix is a real export rather than a better parser. skill/scripts/live/ui-surfaces.mjs is now the single definition. The browser-runtime constraint is unchanged and satisfied the same way the command palette already solves it: live-browser.js is served raw and injected as a classic <script>, so it cannot import an ES module. The /live.js assembler serializes the module into window.__IMPECCABLE_LIVE_UI_SURFACES__ in the prelude it already writes for the token, port and vocabulary, and live-browser.js reads the global. assembleLiveBrowserScript defaults the value from the module rather than taking it from live-server.mjs, so the bundle carries the canonical inventory by construction instead of by a caller remembering to pass it. The emitted inventory is byte-identical to the inlined one. tests/live-ui-surfaces.test.mjs pins both halves of the seam: the module is the definition (live-browser.js must not redeclare it), the prefix the module builds ids from matches the PREFIX live-browser.js hardcodes, and the assembled bundle still carries the list. live-server.test.mjs gets the matching integration check against a served /live.js. One existing assertion changed. live-browser-regression.test.mjs checked that the steer Send control is registered as live chrome by matching the text of the inline literal's last line. That encoded where the list was written, not what it contains; it now asserts membership in the imported LIVE_UI_COMPONENT_IDS, which is the behaviour it was after. Verified with the full default suite plus a live-e2e fixture run (vite8-react-modal), so the overlay is exercised end to end in a browser. AI-assisted via Claude Code under maintainer direction. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>