Skip to content

Playwright browser streaming for agents - #5

Merged
selfcontained merged 1 commit into
mainfrom
feature/playwright-streaming
Mar 10, 2026
Merged

Playwright browser streaming for agents#5
selfcontained merged 1 commit into
mainfrom
feature/playwright-streaming

Conversation

@selfcontained

Copy link
Copy Markdown
Owner

Summary

  • Adds implementation plan for enabling agents to stream their Playwright browser session as a live MJPEG video feed in the Dispatch UI
  • Agent makes one call (dispatch-stream start --playwright <port>), backend handles everything via CDP Page.startScreencast
  • Validated at ~37 FPS with ~13KB JPEG frames, zero additional npm dependencies (Node 25 native WebSocket)

Key design decisions

  • MJPEG over HTTP — browsers render natively in <img> tags, zero frontend complexity
  • No DB changes — stream state is in-memory Map
  • Server-driven capture — agent only calls once, backend runs the CDP loop independently
  • iOS Simulator streaming planned as follow-up (validated at ~4.5 FPS via subprocess loop)

Implementation scope (docs only for now)

See docs/playwright-streaming-plan.md for the full plan covering:

  • src/stream-manager.ts (new) — CDP WebSocket consumer + MJPEG multiplexer
  • src/server.ts — new stream routes, SSE events, hasStream injection
  • bin/dispatch-stream (new) — shell script for agents
  • Frontend — live mode toggle + pulsing LIVE badge in media sidebar

Test plan

  • Implementation PR(s) to follow

🤖 Generated with Claude Code

Adds a detailed plan for enabling agents to stream their Playwright
browser session as a live MJPEG video feed in the Dispatch UI.
Validated CDP screencast at ~37 FPS with ~13KB JPEG frames.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@selfcontained
selfcontained merged commit 7206fd8 into main Mar 10, 2026
1 check passed
selfcontained added a commit that referenced this pull request Jul 8, 2026
…s, seed data

- Restyle feedback items as bordered cards with visual separation (#5)
- Clip long file paths from the left using direction:rtl so filenames stay visible (#1)
- Add framer-motion AnimatePresence expand/collapse on feedback item detail (#3)
- Dim file links not found in current diff with tooltip fallback (#2)
- Fix file navigation to only scroll when target file exists in diff (#2)
- Add review seed data with resolved/pending items and thread messages (#4)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant