1# Product demos
2
3Product Demos are curated, code-owned adapters for three product families:
4WarpLite, FactoryLite, and Agent CLI.
5Use them when a page needs to show the product doing work,
6not when static code, an editorial illustration, or a screenshot would
7explain the idea more directly.
8
9They are image-like media at the page boundary, but the content is a
10fully interactive app stage. Place a demo directly in Hero media, a Media
11Feature figure, Feature Slider media, or Card Grid media. Do not add a
12second app chrome around it.
13
14## Shared full and cropped presentations
15
16Every `ProductDemo` defaults to **Full** (`fit="contain"`): a centered
171078×732 logical app frame at UI scale 1, occupying 74% of a responsive
186:5 stage. All eight registered variants use this same frame, not separate
19native windows behind different zoom factors. The common settings live in
20`src/components/warp-lite/runtime/app-stage-geometry.ts`. UI density changes
21inside the frame; responsive fitting scales the entire frame independently.
22Tall content stays accessible through internal app scrolling.
23App breakpoints follow the logical frame, not the surrounding browser
24viewport, so the same fitted desktop UI appears in narrow media columns.
25Window chrome is shared in `src/components/warp-lite/runtime/window-chrome.ts`:
26the Warp Agent shadow, 13px/20px medium-weight titles, and a 44px title bar.
27Standalone native code review uses these metrics without adding another
28title-bar row; nested panel headers retain their own treatment. Cropped
29app shadows compensate for scene/local zoom so their visible weight matches
30the Full reference instead of getting heavier as focal-point zoom increases.
31
32**Cropped** (`fit="crop"`) always reserves a responsive 1:1 viewport.
33Each variant keeps its authored scene/density and its own X/Y/Z focal-point
34preset. Crop offsets and zoom are applied once by the app's shared geometry
35path, not again by a catalog wrapper. Passing `placement` alone does not
36select the cropped mode. Full-view settings do not alter saved crop presets.
37
38Both modes reserve matching lazy placeholders. Controls remain outside
39the fitted scene. Hidden catalog panes do not eagerly mount a second app,
40and resizing does not reset playback or user-selected app state.
41Legacy raw demo entry points retain their existing geometry; new-system
42pages and `/brand/product-demos` share the production `ProductDemo` adapter.
43
44## Approved demos
45
46### Warp Agent
47
48**Use for:** a scripted agent conversation, terminal moment, or cloud
49agent interaction inside a Warp window.
50
51**Source:** `src/components/warp-lite/home-warp-agent-demo.tsx`
52
53**Current consumer:** homepage hero.
54
55The adapter mounts `HomeWarpAgentDemoLazy` with development controls
56suppressed. Set `showWarpAgentSidebar={false}` on `ProductDemo` when a
57placement needs a more focused conversation view; it defaults to showing
58the complete Warp navigation. The default homepage stories remain
59code-owned; do not edit their beats, timing, or mini-app state from page
60JSX.
61
62### Agent CLI
63
64**Use for:** a terminal-native agent conversation, with a dedicated CLI
65composer, single-line session status, and upward-scrolling transcript.
66
67**Source:** `src/components/agent-cli/AgentCliDemo.tsx`
68
69**Catalog:** `/brand/product-demos`, Demo → Agent CLI.
70
71**Current consumer:** `/agent-cli`, in the “Introducing the Warp Agent CLI”
72media module (also shared with `/brand-workshop/agent-cli`). Embed the bare
73stage directly, without a video lightbox, extra figure frame, or second
74window chrome. This placement uses `<ProductDemo variant="agent-cli" />`,
75the shared Full default described above.
76The stage owns proportional fitting through the shared window runtime;
77its loading placeholder reserves the same ratio. Mobile keeps the complete
78window rather than enforcing the desktop minimum width. Playback controls
79remain outside the scaled window.
80
81Use `<ProductDemo variant="agent-cli" />`. Agent CLI owns its renderer,
82theme, story, and lazy stage in `src/components/agent-cli/`. It shares the
83same `WarpLiteWindow` rounded container, border/shadow, and `GlobalNav`
8444px title bar as the agent and terminal workflows, with monochrome
85top-left window controls and an **Agent CLI** title. Its dark CLI palette
86is scoped through theme tokens; the title bar is darker than the body for
87contrast. The surrounding stage and lazy placeholder use the same
88`#dedede` light-gray ground as the other product demos. The desktop theme
89is unchanged.
90Playback is shared, but the CLI does not use the desktop composer or
91Factory layout. Do not add custom window controls or another frame.
92
93The default story uses the five visual frames in Brand Audit,
94`DhBkSrAwxX1bc27BOv6Riw`, node `324:4892`: Welcome → Shell activity →
95Agent approval → Spawning agents → Agent tabs. That Figma sequence
96supersedes the earlier live-CLI approximation. It owns the palette,
97JetBrains Mono typography and the CLI body artwork. The authored 20px
98control strip is replaced by the shared title bar rather than stacked
99under it. The legacy/dev 1078×732 window sits on a fixed 1100×756 canvas; the
100additional 50px below holds playback controls, for an 806px reserved
101embed/placeholder height in that raw preview only. Standard product embeds
102use the shared Full or Cropped stage. At the approved baseline, content
103coordinates stay identical; variable body bounds keep the footer and
104questions visible when the shared frame/density settings change.
105
106Approval lists six agents; the final strip shows three explicitly ordered
107tabs plus overflow. After startup, the story follows one issue agent.
108The final frame holds with agents running until
109restart. Login labels, approval shortcuts, and tabs are scripted visuals,
110not real authentication or agent controls.
111
112Terminal rows append at the bottom and push prior output upward. History
113is retained across shell, approval, spawning, and tab states; scrolling
114up suspends automatic following. The bottom input and status dock stays
115fixed and fully opaque, swapping only for the complete approval question.
116Streaming output shows a Warping indicator in a compact row directly
117above the input. Trailing blank output rows are not reserved while loading;
118paragraph breaks reappear when the next non-empty row arrives.
119Loading, request processing, issue output, and six-agent startup derive
120from the shared story clock, so pause, restart, visibility gating, and
121seeking remain deterministic. Reduced motion shows the settled final frame.
122
123The welcome screen is fully visible immediately, with no loading label,
124fade, or front-pose delay. Its mark starts a 2D ASCII frame animation while
125a flat starfield twinkles in place: fixed stars pulse in brightness and
126cycle between dot, plus, and star glyphs. There is no radial movement or
127depth effect. Glyph frames and star pulses follow story time, so pause and
128restart apply to both; reduced motion keeps the authored artwork and
129starfield static.
130
131The conversation is a cohesive, code-owned request-to-delegation story:
132review `user-feedback` issues, inspect repository instructions and affected
133files/tests, propose six independent investigations in isolated worktrees,
134request approval, configure the harness, then start the six agents.
135The concise plan remains visible above the approval card throughout its reading hold. The prompt
136is shared between typing and submitted history; activity starts only after
137submission. The pre-approval footer says Agent, not Shell mode.
138
139The sequence lasts about 41 seconds. Each startup row shares its timestamp
140with the corresponding running status; tabs appear only after all six
141agents have started. After a short orchestrator overview, a **Shift + ↑**
142cue switches into `issue-13973`, the reference's SECRETS_REGEX issue. Its active
143tab uses the existing palette; the fixed dock stays in place and the footer
144shows the issue worktree and branch. Its own transcript replaces the
145orchestrator view. Following the supplied issue-tab reference, it repeats
146the SECRETS_REGEX sharing and memory-retention task, then shows a sent
147status message, symbol search, matching Rust files, another thought, and
148file-reading progress. Recap and progress text stream between tool rows;
149paragraph breaks preserve the reference's terminal rhythm.
150All six agents stay running. The final frame shows investigation underway,
151not a completed fix. No real issues are queried or agents
152launched. The existing IDs are illustrative references, without invented
153issue titles beyond the supplied reference. Reference JSON, unrelated spec-review output, credit counts,
154and stale durations are omitted; the unchanged diff footer shows `+0 -0`.
155Keep authored transcript lines short and explicitly split: the fixed grid
156does not automatically wrap. Do not change the UI to fit longer copy.
157
158Each session has its own append-only history. The existing
159`selectedAgentId` state identifies the focused issue; seeking backward
160reconstructs the orchestrator's history without leaking child output.
161Optional `streamDurationMs` on timestamped terminal entries reveals
162characters through the CLI presentation layer only, preserving Unicode.
163Desktop playback keeps full rows unchanged. Pause, seek, restart, offscreen
164gating, and reduced motion still use the shared clock, with no extra timers.
165Reduced motion shows the complete focused investigation as a static frame.
166
167The front pose is the authored Warp ASCII logo, including its offset
168contours and split center—not a generic rounded box. The animation traces
169those exact strokes and dots, starting from the front pose without holding it.
170
171#### Scripted keypress cues
172
173Highlight a command before its scripted action so viewers can follow
174what was selected. Use `ui.agentCliKeypress` with `enter`, `tab`, `shift-up`, `ctrl-e`, or
175`ctrl-c`; `null` clears the highlight. The approval footer renders a
176blue, selection-like highlight on that key only, without changing layout.
177
178Let the question remain readable first, highlight its shortcut for about
179150–250ms, then advance to the result. The default story highlights
180**Enter** immediately before spawning the six agents.
181
182The default story first flashes **Ctrl + E**, then replaces the roster
183inside the same purple box with **Edit agent configuration** and
184**Which harness should the agents use?**. It reuses the shared card's
185`choices` and `focusedChoiceIndex` fields. The selected row cycles through
186Warp → Claude Code → Codex → Warp, with brief **Tab** cues. A 180ms
187**Enter** cue confirms Warp before startup. Browsing other choices does
188not change the queued agents' harness; all six launch with Warp. The
189choices are scripted text, not focusable inputs or global key handlers.
190
191```ts
192import type { Story } from '@/components/warp-lite/stories/schema'
193import { CLI_KEYFRAMES } from '@/components/agent-cli/stories/figma-sequence'
194
195const beats: Story['beats'] = [
196 // Show the keypress before applying the action.
197 { id: 'press-enter', type: 'patchState', atMs: CLI_KEYFRAMES.accept,
198 durationMs: CLI_KEYFRAMES.spawning - CLI_KEYFRAMES.accept,
199 patch: { ui: { agentCliKeypress: 'enter' } } },
200 // Explicitly clear the cue in the next state transition.
201 { id: 'spawn', type: 'patchState', atMs: CLI_KEYFRAMES.spawning,
202 patch: {
203 ui: { agentCliKeypress: null, agentCliScreen: 'spawning' },
204 composer: { confirmationCard: null },
205 } },
206]
207```
208
209`durationMs` does **not** automatically clear UI state. Always author the
210clear and the corresponding action/result beat. Cues use the story clock
211and remain deterministic when paused, restarted, or scrubbed. They are
212visual feedback only—not real key handlers, clicks, or agent execution.
213
214For isolated development comparisons, use `/dev/agent-cli?frame=welcome`,
215`shell`, `loading`, `approval`, `configuration`, `claude`, `codex`, `warp`,
216`accept`, `spawning`, `tabs`, `switch-agent`, `agent`, `streaming`, or
217`investigation`. Omit `frame` to play the full
218sequence. These preview routes return 404 outside development.
219
220### Terminal WarpLite presentations
221
222**Use for:** the Terminal product slider only. These variants are
223purpose-built, static WarpLite illustrations rather than general
224homepage-agent stories:
225
226- `terminal-multithreaded-workflows` shows parallel sessions with branch,
227 worktree, and pull-request context.
228- `terminal-native-code-editing` opens the native diff-review panel.
229- `terminal-customizable-appearance` keeps a static agent conversation while
230 rotating scoped theme palettes; reduced-motion users see one stable theme.
231
232The catalog's Full view uses the same common frame as every other app.
233The production Terminal Feature Slider explicitly selects `fit="crop"`,
234keeping its per-variant focal-point zoom and offsets in a square media well.
235Customizable appearance uses always-visible **Theme 1 • Theme 2 • Theme 3**
236selectors in an external control group at the stage's bottom-right.
237Each selects its palette directly, with the current choice highlighted.
238The controls stay outside the scaled/cropped app, so they retain their
239size and remain accessible on both desktop and touch. The title bar stays
240clear; no hover-only action slot or crop-specific title-bar offset is needed.
241
242## Placement alignment
243
244In `/brand/product-demos`, select any variant and switch **Placement** to
245**Cropped**. The square staging well lets you drag the preview, then
246reports its `X`, `Y`, and `Z` zoom values. Use those values to update that
247variant's entry in `PRODUCT_DEMO_CROP_PRESETS`; each demo has an
248independent saved crop. Terminal Feature Slider variants read directly from
249their respective preset entries.
250
251### Factory Computer Use
252
253**Use for:** proof before shipping: investigate an activation drop on the
254contact-sales page, inspect the browser, restore hidden testimonials,
255and open PR #436 for review.
256
257**Source:** `src/components/computer-use/ComputerUseDemo.tsx`
258
259**Current consumers:** `/factories` and `/brand/product-demos`.
260
261Use `<ProductDemo variant="factory-computer-use" />` directly in a Media
262Feature figure. The page owns the explanatory heading and body. The demo
263uses the common Full frame and a saved square crop preset, shared window
264chrome, local trusted-by assets, and the existing scanner.
265
266Playback finishes once and holds the proof/PR scene. Pause and restart
267controls sit outside the fitted scene. A single elapsed projection owns
268chat/browser transitions, scanner wipe/fluid/pulse, dots, and the logo strip.
269Offscreen or document-hidden time never advances it; user pause survives
270viewport changes. Resizing and changing Full/Cropped do not restart it.
271Reduced motion immediately settles the final still; disabling reduced
272motion leaves that still until explicit restart. Near-viewport loading is
273separate from actual visible playback. Zero-sized hidden panes do not load
274additional instances, even under reduced motion. No real form inputs,
275navigation, browser automation, or agent execution occurs.
276
277The legacy `src/app/factories/computer-use-demo.tsx` remains unchanged for
278the homepage: its heading, styling, and original one-shot behavior are not
279affected by the promoted stage. Scanner clock control is opt-in.
280
281### Factory Activity
282
283**Use for:** an autonomous Factory task pipeline, plan approval, or
284Factory workspace narrative.
285
286**Source:** `src/components/factory-lite/FactoryLiteStage.tsx`
287
288**Current consumer:** `/oz`.
289
290The adapter mounts `FactoryLiteDemoLazy` with `defaultFactoryStory`. That
291story is the approved default activity narrative. A new Factory story is
292a code-owned story-data task, not a new page component.
293
294### Factory Benchmarks
295
296**Use for:** a static Factory Benchmarks workspace showcase.
297
298**Source:** `src/components/factory-lite/FactoryBenchmarksTemplateStage.tsx`
299
300The adapter mounts `FactoryBenchmarksTemplateStageLazy`. It intentionally
301uses the stage's static benchmark data and locked Benchmarks page rather
302than a Factory playback story. Full uses the common frame with internal
303scrolling; entering Explore does not enlarge or recenter that frame.
304Legacy/cropped presentations retain the taller authored benchmark scene.
305
306## Non-negotiable embed contract
307
308Always use the Product Demo adapter or its underlying `*Lazy` wrapper.
309Never mount a raw Lite engine. The lazy wrapper reserves the correct
310placeholder size, defers the heavy client chunk, and preserves reduced
311motion behavior.
312
313Full stages fit the common logical frame even on phones. Cropped stages
314intentionally clip their authored scenes inside a square. Do not apply
315page-level `object-fit`, extra transforms, or another clipping wrapper;
316select the approved mode on the adapter. Brand-system layout owns the
317surrounding media region, caption, and spacing.
318
319Lite owns its app chrome, window theme, typography, stage coordinates,
320and playback controls. Do not substitute brand-system tokens inside the
321demo or expose development controls in a production placement.
322
323Stage geometry and UI-density ownership are shared across every app.
324Do not change a single app's full-frame size to fit a page or use crop
325presets to resize the default Full view. The crop alignment overlay belongs
326only to the catalog, never to production embeds.
327
328## Placement examples
329
330Import `ProductDemo` from `src/components/brand-system` and hand the
331adapter directly to a media slot. The page chooses the surrounding layout;
332the demo itself remains unchanged.
333
334```tsx
335<Hero media={<ProductDemo variant="warp-agent" />} />
336
337<MediaFeature
338 headline="Factory activity"
339 lead="Follow a task from triage through review."
340 href="/oz"
341 figure={<ProductDemo variant="factory-activity" />}
342/>
343
344<FeatureSlider
345 headline="Measure and improve"
346 items={[{
347 title: "Benchmark quality and cost",
348 body: "Compare configurations in a real Factory workspace.",
349 media: <ProductDemo variant="factory-benchmarks" />,
350 }]}
351/>
352```
353
354Use a static editorial illustration instead when the point is conceptual,
355when a full product interaction would distract from the message, or when
356the page cannot reserve the Lite stage's required media area.
357
358## New stories and flows
359
360The initial catalog does not expose agent-kit, GTM, fraud, generated
361stories, or parameterized flows. Reuse a registered mini-app and approved
362story before authoring a new one.
363
364When a page needs a new WarpLite story, FactoryLite story, mini-app, or
365parameterized flow, follow the repository Lite demo authoring guidance.
366Keep stories, beats, parameters, timing, and stage geometry code-owned.
367Add the variant to this catalog only after it has an approved production
368consumer.