Skip to content

feat(viewer): add host-overridable ss:main slot for the main content pane#119

Merged
benvinegar merged 2 commits into
mainfrom
feat/ss-main-slot
Jun 24, 2026
Merged

feat(viewer): add host-overridable ss:main slot for the main content pane#119
benvinegar merged 2 commits into
mainfrom
feat/ss-main-slot

Conversation

@benvinegar

Copy link
Copy Markdown
Member

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:main is meant to be projected conditionally: the embedder mounts a slot="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 — add main: "ss:main" to SLOTS
  • viewer/src/App.tsx — wrap the <main> body in <slot name={SLOTS.main}> with the current board (onboard + session view) as fallback
  • viewer/embed.d.ts — document the new region in the public embed contract
  • e2e/embed-main-slot.spec.ts — prove the host pane takes over while the sidebar stays visible and the board's #stream hides (native <slot> fallback mechanics)

Test

npx playwright test e2e/embed-main-slot.spec.ts --project=chromium passes; full npm run build green.

🤖 Generated with Claude Code

benvinegar and others added 2 commits June 23, 2026 22:37
…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>
@benvinegar benvinegar merged commit 12bb6b4 into main Jun 24, 2026
9 checks passed
@benvinegar benvinegar deleted the feat/ss-main-slot branch June 24, 2026 03:14
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