Skip to content

docs: Eitri preview — architecture, Eitri questions, preview-provider protocol#377

Open
hugo-ccabral wants to merge 1 commit into
mainfrom
docs/eitri-preview
Open

docs: Eitri preview — architecture, Eitri questions, preview-provider protocol#377
hugo-ccabral wants to merge 1 commit into
mainfrom
docs/eitri-preview

Conversation

@hugo-ccabral

@hugo-ccabral hugo-ccabral commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

What

Design + hand-off for Eitri preview, now that Studio decouples the CMS pane from the preview pane (preview can live in a different environment).

  • Architecture decision: prefer A. Eitri-hosted embeddable web preview; fall back to B. run eitri-cli in a deco sandbox; reject C (reimplementing eitri-luminus — approximate + permanent fork/drift debt). Enabled by the fact that eitri-luminus is web-React (DaisyUI/Tailwind), not React Native — a browser can render it. Blocker noted: luminus/bifrost aren't on public npm (only eitri-cli is).
  • Questions for the Eitri team that gate A/B (embeddable preview? content injection? headless CLI? automation auth? registry egress? …).
  • Preview-provider protocol (v1): the key point — it's not new. A decoupled provider implements deco's existing surface at a configurable origin:
    • render contract = the /live/previews/* endpoint (resolvePreview.ts: GET ?props=&resolveChain= / POST {__resolveType, __props, __decofile} → HTML),
    • live channel = the LiveControls editor::inject postMessage (+ recommended ready/error/resize/select messages),
    • per-app .deco/preview.json (provider/url/device mobile-frame/auth).

Docs-only (no release). Companion to eitri-stack-design.md + deco-fs-contract.md.

🤖 Generated with Claude Code


Summary by cubic

Add a design doc for Eitri preview that explains how Studio’s decoupled preview will work for Eitri apps: prefer an Eitri‑hosted web embed, fall back to a eitri-cli sandbox, and reject reimplementing eitri-luminus. It defines the v1 preview-provider protocol (reuse /live/previews/*, editor::inject postMessage, app-level .deco/preview.json) and lists the open questions that gate A/B; docs-only change.

Written for commit 28d42ff. Summary will update on new commits.

Review in cubic

… protocol

Records the decoupled-preview plan for Eitri: prefer an Eitri-hosted embeddable
web preview (A), fall back to running eitri-cli in a deco sandbox (B), and
reject reimplementing eitri-luminus primitives (C — approximate + fork/drift
debt). Includes the questions that gate A/B for the Eitri team, and the
preview-provider protocol: it reuses deco's EXISTING surface (the
/live/previews/* render endpoint + the LiveControls editor::inject postMessage
channel) hosted at a configurable origin, plus a per-app .deco/preview.json
(provider/url/device-frame/auth).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@hugo-ccabral
hugo-ccabral requested a review from a team July 16, 2026 18:01
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