feat(web): scripted full-screen product demo mode#3927
Closed
vibegui wants to merge 3 commits into
Closed
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>
Storefront demo: - The agent now proposes a real WORK PLAN inline in the chat — a sprint of task cards — and waits for the viewer to approve (ghost cursor clicks "Approve & start"). Tasks then tick live; the first deliverable is a pull-request card (checks → merge), then deploy + re-audit. - Ends with a "get this every morning" card to connect Slack / Teams for a daily automated audit. - Inline cards render via a tiny part-renderer registry (chat/message/parts/extra-part-renderers.ts) the demo registers into — the core chat renderer stays demo-agnostic (empty registry in normal use). Agents demo: - Replaced the top org tabs with a real Studio-style sidebar of agents. You switch agents from the sidebar; background work keeps running and a notification dot appears on an agent's icon when its task finishes. Fix: card outputs are replaced immutably on each update so the compiler-memoized cards actually re-render (in-place mutation was silently dropped). 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. Now includes inline sprint/PR/daily-digest cards and an agent sidebar with background notifications; each demo plays once and then shows a CTA end card.
New Features
Refactors
DemoChatStreamContext; updates to card outputs are applied immutably so memoized components re-render reliably.Written for commit 813d948. Summary will update on new commits.