Skip to content

feat(bolt-slides): replace the slides starter with slides v2 BOU-2538 - #126

Open
geotrev wants to merge 19 commits into
mainfrom
geotrev/bou-2538-add-slides-v2-to-starters-repo
Open

feat(bolt-slides): replace the slides starter with slides v2 BOU-2538#126
geotrev wants to merge 19 commits into
mainfrom
geotrev/bou-2538-add-slides-v2-to-starters-repo

Conversation

@geotrev

@geotrev geotrev commented Aug 22, 2026

Copy link
Copy Markdown

Problem

The bolt-slides starter was JSX the agent rewrote on disk. Sharing and presenting also minted WebContainer URLs, which fail as visitor links and leak the preview origin.

Solution

Replace bolt-slides with a Pitch-style studio: decks are Postgres rows. The editor talks to deck-api; the agent writes deck / slides rows directly. Owner Present is in-place. Share and presenter links mint only on a published origin. Host identity and published origin are injected by Bolt — stackblitz/bolt#7075.

Implementation Details

  • React 19 / Vite 8 / TS 6 / @/ kept. Design-system restyle is BOU-2539, out of scope.
  • Three surfaces: editor (/), present (in-place for the owner; /present?k= for audience), presenter console (second window; own share mode). Audience present has no presenter control.
  • Access order: share token → service-role bearer → X-Deck-Owner matching DECK_OWNER_SECRET. Opt-in via .bolt/config.json previewOwnerSecret. Owner proof is not stored in localStorage.
  • Share and P are disabled in Bolt preview until a public origin exists (no WebContainer URLs). After publish, Share mints bolt.host links; P stays off in the iframe (BroadcastChannel is same-origin).
  • Skill authors table rows (not deck-api curls). Comments/profiles removed.

geotrev added 15 commits August 21, 2026 12:40
Port Donald's Pitch-style studio into the starter, keep the modern
React 19 / Vite 8 toolchain, and teach the skill that Postgres is the
only store for deck data.
…tion

Drop the Vite JSON file stand-in so the editor and the slides skill share one
database, and instruct the agent to apply the schema and deploy the function
before authoring.
Seed contentEditable HTML only when the field is unfocused so a re-render
no longer resets innerHTML and drops the typed text before it can persist.
Broadcast a Realtime ping after mutations so agent imports show in the
preview immediately, without waiting for the iframe to regain focus.
Owner Present swaps the editor for the audience view on the same URL; Esc returns to editing. The presenter console still opens a second window.
window.close() is a no-op unless the console was opened with window.open. Fall back to leaving presenter mode in the same view.
Agents author through the provisioned service role and a public /health probe; the browser gets X-Deck-Owner from host inject so the skill never mints an owner secret.
Copy uses the origin Bolt injects into the preview. Until the project is published, the modal does not copy a WebContainer URL.
Bolt injects preview owner proof. The skill no longer names that secret or tells the agent to list function secrets. Published bolt.host still needs a share token.
Share-console tabs cannot close themselves and have no editor behind them.
Keep the control for owner windows opened with P.
Declare DECK_OWNER_SECRET in .bolt/config.json so Bolt can inject a
generic preview token and copy it only when the starter asks.
Slides v2 has no comment threads or comment-author profiles. Keep the
speaker layout; it is a slide type, not that table.
The 2s timeout let /state run without X-Deck-Owner after DECK_OWNER_SECRET
was synced, so a preview refresh looked like a dead share link.
…ublic origin

P and the dock control would open a WebContainer URL in Bolt preview. Keep the control visible with a tooltip instead, and mint presenter links only from local Vite or the published site.
Gate the editor Share button with a tooltip instead of explaining publish inside the modal. The dialog always receives an origin and mints links on it.
@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

The functions gateway does not always leave the agent's Bearer on Authorization, so deck-api returned share-required and the skill fell through to SQL. Accept the service role on either header (or a same-project service_role JWT) and tell the agent never to execute_sql.
Bolt workspace .env often has only the anon key. Using an unset service role on Authorization made Kong reject the request as UNAUTHORIZED_INVALID_JWT_FORMAT. Fall back to the anon JWT and stop treating decoded JWT claims as owner.
The editor still talks to the function. Agent curls were failing once
owner proof was required; writing deck/slides directly matches how Bolt
already does DML.
Align README, migration notes, and sample copy with row authoring so
scaffolding does not undo the slides skill.
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