Commit 86af600
feat(panel): fully interactive CDP-screencast viewport — full switchover (v0.6.0) (#14)
* feat(panel): fully interactive CDP-screencast viewport — full switchover (v0.6.0)
Replace the entire dashboard-embed / screenshot panel approach with a single
fully drivable browser viewport. A live CDP screencast (event-driven JPEG frames)
is painted on a <canvas> and operator mouse/keyboard/scroll are forwarded back via
Input.dispatch*, all over a gated same-origin WebSocket — so it works on the host
AND a remote fleet member, and you can drive the page alongside the agent.
New:
- browser_stream.py — a second-CDP-client bridge (Page.startScreencast out, input
in) + single-use ticket auth. resolve_page_target/pick_page_target/input_to_cdp
are pure + host-free-tested.
- browser_panel.py — the interactive canvas page + gated POST /stream-ticket and the
self-gated WS /stream. WS auth: the host's operator-bearer middleware is HTTP-only
and skips WS handshakes, so the panel mints a ticket over the gated HTTP route and
presents it on the WS URL; the handler validates + burns it.
Full switchover (no backward compatibility):
- Removed panel_mode (interactive is the only panel), the screenshot `minimal` mode
and /shot, and the `full` dashboard-embed page.
- Removed the browser_dashboard tool (16 tools now), lifecycle.py (dashboard daemon
boot/shutdown surface), and the /dashboard control routes.
- Removed config: panel_mode, dashboard_port, manage_dashboard.
Validated end-to-end against the real agent-browser binary through the production
routes (bad ticket refused, ticket minted, real frame streamed, keys + click land).
34 host-free tests pass; ruff clean.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(panel): Start button + configurable homepage (home_url)
The empty viewport was a dead end. Now, when no page is open, the panel shows a
Start button, and a new `home_url` config sets the page it opens to:
- home_url set → the panel auto-opens it once; the button reads "Open <host>"
- home_url blank → the button opens about:blank (no auto-open)
home_url is injected as a JS string literal via json.dumps + `<`→< so a
value containing `</script>` can't break out of the inline script. Editable in
Settings ▸ Plugins. 35 tests pass; ruff clean.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 1bfd7f9 commit 86af600
13 files changed
Lines changed: 731 additions & 479 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
3 | 29 | | |
4 | 30 | | |
5 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
| |||
75 | 74 | | |
76 | 75 | | |
77 | 76 | | |
78 | | - | |
79 | 77 | | |
80 | 78 | | |
81 | 79 | | |
82 | 80 | | |
83 | 81 | | |
84 | 82 | | |
85 | 83 | | |
86 | | - | |
87 | | - | |
| 84 | + | |
| 85 | + | |
88 | 86 | | |
89 | 87 | | |
90 | 88 | | |
91 | | - | |
| 89 | + | |
92 | 90 | | |
93 | 91 | | |
94 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | 48 | | |
56 | | - | |
57 | | - | |
58 | | - | |
| 49 | + | |
0 commit comments