Skip to content

feat(host): generate dist/index.html for Pulsar CEF + browser hosts - #2

Merged
ClodoCapeo merged 1 commit into
mainfrom
feat/host-html-bootstrap
May 2, 2026
Merged

feat(host): generate dist/index.html for Pulsar CEF + browser hosts#2
ClodoCapeo merged 1 commit into
mainfrom
feat/host-html-bootstrap

Conversation

@ClodoCapeo

Copy link
Copy Markdown
Member

Summary

  • Solar's library mode produces no index.html. The broadcast host (Pulsar CEF, editor preview iframe) needs one to load solar.js and call mount().
  • This PR adds scripts/build-host-html.mjs — a postbuild step that generates dist/index.html with an inline ES-module bootstrap mirroring src/dev-entry.tsx but production-defaulted (broadcast mode, no test token, console.error only).
  • Bumps to v0.1.1. Tag v0.1.1 after merge → release workflow publishes the new tarball.

Why now

Wave 4 Pulsar wiring loads https://<gate>/orion/static/solar/v{N}/index.html?orion=...&token=...&mode=broadcast (chantier-pulsar-wiring § Scope > URL acceptance contract). Without index.html the URL contract is unfulfilled.

The Vite config already documented this gap inline:

// The HTML wrapper consumed by Pulsar CEF is built
// in a follow-up step (see scripts/build-html.* — out of scope for
// the initial scaffold).

This PR closes that follow-up.

Test plan

  • npm run lint clean
  • npm run typecheck clean
  • npm test 43/43
  • npm run build produces dist/index.html (1992 B) alongside the JS chunks
  • npm run check:bundle still passes (the host HTML is not gz-budgeted — it's a separate static file)
  • CI green on this PR before merge
  • Tag v0.1.1 after merge → release workflow publishes solar-v0.1.1.tgz with index.html included

🤖 Generated with Claude Code

Solar is a library bundle, but the broadcast host (Pulsar CEF, also
the editor preview iframe) loads it as a static URL — it needs an
HTML entry that imports solar.js, reads URL query params, and calls
mount(). Vite's library mode strips index.html ; this PR adds a
postbuild script that generates dist/index.html with an inline ES
module bootstrap mirroring the dev-entry harness, but production-
ready (defaults to broadcast mode, no test-token, console.error
only — no chrome on the broadcast surface).

The HTML is 1992 bytes raw, references ./solar.js relatively so any
host that serves the unpacked tarball at a path can load it without
template substitution.

Bumps to v0.1.1 ; release workflow on tag push will publish the
updated tarball with index.html alongside the chunks.
@ClodoCapeo
ClodoCapeo merged commit f487831 into main May 2, 2026
5 checks passed
@ClodoCapeo
ClodoCapeo deleted the feat/host-html-bootstrap branch May 2, 2026 20:34
ClodoCapeo added a commit that referenced this pull request Jun 13, 2026
…1 I7) (#24)

`core.animation.play@1` rendered dead at the antenna — the box sat 100×100
pinned at (0,0), immobile, with no translateX and no fade (live frame-diff,
tir I7 #2) — despite a correct render-bundle (keyframed `frame` wrapper with
the target's geometry, animated transform/opacity, target nested beneath).

Two distinct bugs in `@lumencast/runtime`'s keyframe path, both dropping the
animated geometry:

- The `KeyframePlayer` wrapped the subtree in a `display:contents` motion.div.
  `display:contents` generates no box, so the browser silently dropped the
  transform/opacity/filter framer-motion wrote — the wrapper geometry never
  composited and the nested target rendered at its default origin. The player
  is now a real compositing box (`position:absolute; inset:0`) and the
  containing block for the absolutely-positioned target, preserving its x/y.
- `compileForFramer` emitted the authored `translateX`/`translateY` channels
  verbatim, but framer-motion animates transform via `x`/`y`; the translate
  was ignored even on a real box (only opacity survived). Mapped to framer
  keys.

Both repair the EXISTING keyframe player (no new runtime primitive, ADR 011 §6
#6); shipped as a committed patch-package patch over @lumencast/runtime@0.6.0
since the code lives in the bundled dependency. Solar re-bundles the patched
runtime into dist/. The wipe-cover degenerate cover is preserved (byte-pinned
shape unchanged). New runtime test proves the wrapper composites
translateX(400px)+opacity:1 with the nested 160×160 target at (80,360).

Bumped to v0.2.9 so the release tgz carries the fix to Orion's static serve.

Refs ADR 011 I7

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant