Skip to content

feat(app): demo session in the debug bar - #57282

Closed
kitlangton wants to merge 68 commits into
betafrom
debug-demo-session
Closed

kitlangton wants to merge 68 commits into
betafrom
debug-demo-session

Conversation

@kitlangton

@kitlangton kitlangton commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Why

Timeline motion (streaming text, tool rows growing, the Working line, the activity pill, the queue dock) is hard to watch on demand: it needs a model doing the right things at the right speed. The debug bar now has a Demo session that drives an open session through those states on OpenCode Drive's simulated model, so anyone tuning the timeline can trigger each state, slow it down, or loop it.

What Changes

  • A DEMO cell in the debug bar (dev and Beta builds only, next to MOTION) opens a small panel: Paragraph, Code block, Shell, Patch, Long turn, Finish turn, Message, Steer, Burst, Queue, Subagent, Bg shell, Auto-play, and a 0.25×–2× speed slider.
  • Each control sends a real prompt ([demo:<action> <speed>×] …) to the routed session. Finish turn interrupts it; Queue uses queue delivery; Auto-play loops a scripted mix, including a steer and a queued prompt mid-turn.
  • script/drive/demo-session.ts starts an isolated Drive server whose simulated model answers those prompts. Shell commands, patches, file reads and the background subagent run for real in Drive's throwaway project, so everything reaches the app through the normal server, event stream, data and timeline path.
  • Anything typed into the composer gets a random 5–10 s turn, seeded by the conversation so far: reasoning, prose, lists and code between one to three real shell builds, often a patch and parallel reads, sometimes a background subagent or shell, then a summary. Typed text containing short or code gets those replies instead.
  • Routing a session on the simulated model opens the debug bar and its Demo panel, which lists the typed-prompt keywords.
  • The controls are disabled unless the session runs on Drive's simulation provider, so a demo prompt never goes to a real model or a real conversation.

Scope

Debug bar only; production builds drop the panel at build time, like the Motion workspace. No changes to the client data layer, server or protocol. The Drive script follows the existing script/drive/*.ts pattern (opencode-drive run …), documented in script/drive/demo-session.md.

Verification

  • bun typecheck and bun test src/debug in packages/gui-extensions; bun run lint:changed origin/beta.
  • Ran every action against the Drive script over HTTP: all produce the expected parts (real shell, patch, 5 parallel reads, background subagent and shell that report back).
  • Headless Chromium against a production build connected to the Drive server: opened the debug bar from the palette, pressed DEMO and each control, then Auto-play for 16 s, with no page errors. This clip was recorded on a local combination with fix(app): smooth timeline row motion #57224 (timeline motion):

https://problems.kitlangton.com/media/wsobxg2Sh2W2VwlC2uJnzw.mp4

@kitlangton

kitlangton commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor Author

CI note: the red checks look unrelated to this change. unit (linux) fails check:generated (stale OpenAPI docs), which is also red on beta's own latest test run. The e2e failures are Home session, command palette, mobile session, question dock and SSH settings specs; the Home ones match #57281, which merged just before this branch's base. This PR only touches the debug bar's dev/Beta-only demo panel and a Drive script, which no e2e spec loads.

While the timeline follows its end, rows grow to their measured height on one spring instead of landing, and the end
rides that growth onto the composer. A row leaving near the end fades where it was while the rows above close its
gap. Space the composer frees while rows grow is held under the last row for the reply to rise into. Scroll offsets
stay on the layout grid, a prompt sent from the composer flies into its bubble, and Working and the background hint
fade in their lane without doubling up.
The queue panel springs open and closed with a soft edge and keeps its last prompts while it closes, the activity
pill fades out, the placeholder crossfades, and the Queue hint no longer flashes on every send. With reduced motion,
the queue panel lands at once and the remaining fades stay short.
@kitlangton

Copy link
Copy Markdown
Contributor Author

Folding these controls into the Knobs pages (#58896) instead.

@kitlangton kitlangton closed this Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant