feat(bolt-slides): replace the slides starter with slides v2 BOU-2538 - #126
Open
geotrev wants to merge 19 commits into
Open
feat(bolt-slides): replace the slides starter with slides v2 BOU-2538#126geotrev wants to merge 19 commits into
geotrev wants to merge 19 commits into
Conversation
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.
|
|
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.
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.
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-slideswith a Pitch-style studio: decks are Postgres rows. The editor talks todeck-api; the agent writesdeck/slidesrows 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
@/kept. Design-system restyle is BOU-2539, out of scope./), present (in-place for the owner;/present?k=for audience), presenter console (second window; own share mode). Audience present has no presenter control.X-Deck-OwnermatchingDECK_OWNER_SECRET. Opt-in via.bolt/config.jsonpreviewOwnerSecret. Owner proof is not stored inlocalStorage.bolt.hostlinks; P stays off in the iframe (BroadcastChannelis same-origin).deck-apicurls). Comments/profiles removed.