feat(viewer): add host-overridable ss:main slot for the main content pane#119
Merged
Conversation
…pane
Adds a fourth host-overridable region to the embeddable engine: `ss:main`,
wrapping the whole main content pane (onboarding + session stream). The slot's
fallback is the engine's normal board, so a plain embed and self-hosted sideshow
are unchanged.
Unlike the always-on footer/empty/session-action overrides, this one is meant to
be projected conditionally: an embedder projects a `slot="ss:main"` child only
while its own full-pane view is active (e.g. sideshow cloud's Settings page),
taking over the main area while the sidebar — session list and account footer —
stays put. When no child is assigned, the engine falls back to the board.
- host.ts: add `main: "ss:main"` to SLOTS
- App.tsx: wrap the <main> body in <slot name={SLOTS.main}> with the board as fallback
- embed.d.ts: document the new region in the public contract
- e2e: prove the host pane takes over while the sidebar stays and the board hides
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a fourth host-overridable region to the embeddable engine:
ss:main, wrapping the whole main content pane (onboarding + session stream).The slot's fallback is the engine's normal board, so a plain (host-less) embed and self-hosted sideshow render identically — self-hosted parity preserved.
Why
The existing slots (
ss:aside-foot,ss:empty,ss:session-actions) are always-on, fine-grained overrides. They can't express "take over the main area but keep the sidebar." Sideshow cloud needs exactly that for a full-page Settings view: the engine's sidebar (session list + account footer) should stay while a host-owned page fills the main pane.Unlike the other overrides,
ss:mainis meant to be projected conditionally: the embedder mounts aslot="ss:main"child only while its view is active; when no child is assigned, the engine falls back to the board. No new host API surface beyond one slot name.Changes
viewer/src/host.ts— addmain: "ss:main"toSLOTSviewer/src/App.tsx— wrap the<main>body in<slot name={SLOTS.main}>with the current board (onboard + session view) as fallbackviewer/embed.d.ts— document the new region in the public embed contracte2e/embed-main-slot.spec.ts— prove the host pane takes over while the sidebar stays visible and the board's#streamhides (native<slot>fallback mechanics)Test
npx playwright test e2e/embed-main-slot.spec.ts --project=chromiumpasses; fullnpm run buildgreen.🤖 Generated with Claude Code