feat(web): scripted full-screen product demo mode#3927
Open
vibegui wants to merge 2 commits into
Open
Conversation
Add a public, fully-mocked walkthrough that drives the REAL Studio chat components from a recorded stream — no backend, MCP transport, or auth. Framework (apps/mesh/src/web/demo/): - Director: a non-React class that owns all timing via @decocms/std sleep and mutates external Stores; components subscribe via useSyncExternalStore, so no useEffect is needed to animate. Screenplays read as a storyboard (await d.user/stream/think/tool/parallel/endTurn) and support multiple parallel chat tracks plus org switching, previews, a ghost cursor, and a typed terminal. - Chat seam: DemoChatStreamProvider supplies a scripted ChatStreamContextValue (via an exported DemoChatStreamContext) so the real renderers paint it identically to a live stream. - DemoProviders: mock ProjectContext + a network-free QueryClient. Two demos, each on its own URL (/demo chooser, /demo/<id>), light mode: - /demo/storefront — business user drops in a URL and gets an accurate perf+SEO diagnosis scorecard, a fix plan, parallel fixes, and a re-audit. - /demo/agents — Studio as a web Conductor: ghost cursor opens the connect- desktop modal, a mocked iTerm runs `bunx decocms link` then minimizes to "connected", then work runs across two orgs in parallel (chat + live preview) while switching context. The autoplay runner is guarded by a per-stores singleton with deferred teardown so the dev runtime's spurious effect re-runs can't restart a scenario mid-play. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Reworked the scripted demos for rhythm and a real ending.
- Pacing: deliberate beats with anticipation captions, reading holds after
big content (diagnosis / result tables), staggered parallel fixes, and
smoother typing speeds.
- Transitions: caption fade/slide, org-workspace crossfade on switch, preview
iframe fade-in on change, and cursor-driven org switching (the ghost cursor
glides to and clicks the org tab) instead of hard cuts.
- Ending: the demo no longer loops silently — after a full play-through it
shows an end card ("Get started free" / "Watch again"). The runner plays
once, then awaits a replay signal.
Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Summary
A public, fully-mocked, full-screen product demo (oya.ai-style) that animates the real Studio chat components from a scripted stream — no backend, MCP transport, or auth. The whole thing is a reusable framework: a demo reads top-to-bottom like a storyboard.
Two demos, each on its own URL (light mode)
/demo/storefront— business user drops in a URL → accurate perf+SEO diagnosis scorecard (real GFM table) → fix plan → parallel fixes → re-audit before/after → deploy./demo/agents— Studio as a web Conductor: the ghost cursor clicks Connect desktop → the real link modal opens → a mocked iTerm window runs `bunx decocms link` then minimizes → modal flips to Connected → work runs across two orgs in parallel (chat + live preview), switching context while the first org keeps building in the background./demo— a chooser linking to both. No cross-scenario auto-advance.How it works (
apps/mesh/src/web/demo/)The autoplay runner is guarded by a per-`stores` singleton with deferred teardown, so the dev runtime's spurious passive-effect re-runs (React Compiler / StrictMode) can't abort + restart a scenario mid-play.
Affected areas
Testing
🤖 Generated with Claude Code
Summary by cubic
Adds a public, full-screen Demo Mode that scripts the real Studio chat UI with no backend or auth. Includes paced beats, captions, smooth transitions, and a CTA end card; each demo plays once and then waits for replay.
New Features
/demochooser and/demo/$scenario(single scenario per URL; play-once then end card with “Get started free” and “Watch again”).useSyncExternalStore) and an autoplay runner hardened against StrictMode re-runs; addsbeat()pacing and stagecaption()overlays.DemoChatStreamProviderfeeds a scriptedChatStreamContextValueto the real chat renderers.ProjectContext+ dedicated@tanstack/react-queryclient (staleTime: Infinity, no network, no auth)./demo/storefront— paste URL → measured perf/SEO scorecard (real GFM) → approved plan → staggered parallel fixes → re-audit → deploy./demo/agents— connect desktop flow (bunx decocms link) → live preview → work runs across two orgs in parallel while switching context.Refactors
DemoChatStreamContextfromcomponents/chat/chat-context.tsxto let demos supply a scripted stream (no app behavior change).Written for commit 9c2257e. Summary will update on new commits.