feat: minimal panel by default + start the dashboard from the UI (v0.4.0)#11
Conversation
…4.0)
Fixes the long-standing blank Browser panel and lets you manage the dashboard without a terminal.
Root cause of the blank panel: full mode iframes agent-browser's dashboard through our sub-path
reverse proxy, but that dashboard is a Next.js app whose assets are ROOT-ABSOLUTE (/_next/...,
/favicon.ico). Served at /plugins/agent_browser/panel/dash/, the browser then fetches /_next/...
at the console root — which we don't proxy → every chunk 404s → blank. The dashboard only supports
being proxied at a distinct ORIGIN (its --help: "a proxied/forwarded URL such as
dashboard.agent-browser.localhost"), never a sub-path; there's no base-path flag. Unfixable cleanly
from our side. (Reproduced with the installed binary, v0.27.1.)
Fix:
- **Default panel_mode → minimal**: a live screenshot + nav toolbar through the gated same-origin
routes. Works everywhere (host + member), no dashboard/daemon/proxy needed. Verified e2e against
the real binary (navigated example.com → a live 1280px frame rendered in the panel).
- **Dashboard control in the UI** (both modes): a status dot + Start/Stop, gated
GET/POST /api/plugins/agent_browser/dashboard. Start it up entirely from the panel — verified e2e
(status→start→running→stop). Status is a live loopback probe (there's no `dashboard status` CLI).
- **Full mode is honest now**: keeps the embed but explains the blank ("can't load through a
sub-path proxy") and links out to the dashboard's own origin ("open directly ↗"), which works
on a local/host setup. The port is interpolated into the page.
Tests +2 (dashboard control endpoint, default-mode), updated panel-page assertions. 20 tests, ruff
clean. No change to the browser tools.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
👀 Quinn is reviewing — verdict (PASS / WARN / FAIL) + findings to follow. |
There was a problem hiding this comment.
QA Audit — PR #11 | feat: minimal panel by default + start the dashboard from the UI (v0.4.0)
VERDICT: WARN (non-blocking — CI still queued; formal PASS/FAIL on re-dispatch)
CI Status
- test: queued
Diff Review
- Default
panel_mode→minimalfixes the long-standing blank panel (Next.js root-absolute assets can't resolve through sub-path proxy). Solid root-cause analysis. - New
GET/POST /api/plugins/agent_browser/dashboardendpoints: live loopback probe + start/stop subprocess. Gated under plugin-data router — safe. __DASH_PORT__server-side injection into page HTML is clean — no extra API roundtrip needed.- Both panel modes now surface dashboard status + control. Full mode explains the blank and links out to dashboard origin.
Observations
- LOW: clawpatch unavailable — repo not in project registry. Review limited to diff analysis.
- LOW: CI (
test) still queued — formal verdict deferred until checks terminal. - MEDIUM:
dashAct("start")in both panel pages has no guard against double-clicks — two rapid starts could spawn duplicate daemon processes. The UI shows "…" but the button remains clickable. Consider abusyflag (the existinggo()handler already has this pattern at line ~395). - Observation:
page.replace("__DASH_PORT__", str(port))runs against the minimal page too (no-op since no placeholder there). Harmless but slight waste — could gate onmode == "full". - Positive: all error paths degrade gracefully (null render on fetch failure, caught exceptions in status probe). Subprocess calls use
asyncio.to_thread— consistent with existing nav actions.
— Quinn, QA Engineer
|
Submitted COMMENT review on #11. |
…se proxy Per the design call (minimal is the real panel; full is an honest launcher): full mode no longer ships a blank/half-rendered proxy iframe. It's now a launcher card — "Open dashboard ↗" (the dashboard's own origin, which is the only place its root-absolute Next.js assets load) + the Start/Stop control + a pointer to minimal mode. Removes the now-dead sub-path reverse proxy (HTTP + WebSocket /panel/dash) that could never serve the dashboard's assets, plus its unused imports (Request/WebSocket/StreamingResponse) and the 502 test. Also fixes a stale code-level default (build_panel_router defaulted panel_mode to "full" while the manifest defaults to "minimal"). Launcher render verified headless (card + Open-↗ to the real origin + Start control, no errors). 19 tests, ruff clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
QA Audit — PR #11 | feat: minimal panel by default + start the dashboard from the UI (v0.4.0)
VERDICT: WARN (CI queued — non-terminal; re-review on green)
CI Status
test: queued ⏳
Diff Review (first 200 of 608 lines visible)
- ✅ Default
panel_mode→minimal— correct fix for the blank-panel root cause (Next.js root-absolute assets can't resolve under a sub-path reverse proxy) - ✅ Removed the entire
/panel/dashHTTP+WS reverse proxy — dead code that could never work; removal is clean - ✅ Import cleanup mirrors the proxy removal (
Request,WebSocket,StreamingResponsedropped) - ✅ CHANGELOG + README updated with honest explanation of the
fullmode limitation
Observations
- GAP/MEDIUM: Diff truncated at 200/608 lines — the dashboard control endpoint implementation (
POST /api/plugins/agent_browser/dashboard), the_FULL_PAGEtemplate, and test changes are beyond the visible prefix. Can't verify the new endpoint's error handling, loopback probe logic, or that the port interpolation in_FULL_PAGEuses the configureddashboard_port. - LOW: Clawpatch structural review unavailable — repo not in project registry. Diff-based review only.
- No unresolved CodeRabbit threads.
The architectural direction is sound. Re-review on CI green to confirm tests pass and to assess the unseen 408 lines.
— Quinn, QA Engineer
|
Submitted COMMENT review on |
Fixes the blank Browser panel and lets you start the dashboard from the UI (no terminal) — both reported.
Why it was blank (reproduced with the installed binary, v0.27.1)
Full mode iframes agent-browser's dashboard through our sub-path reverse proxy (
/plugins/agent_browser/panel/dash/). But that dashboard is a Next.js app whose assets are root-absolute (/_next/static/...,/favicon.ico). The browser resolves those against the console root, which we don't proxy → every chunk 404s → the app never hydrates → blank. The dashboard only supports being proxied at a distinct origin (its--help: "a proxied/forwarded URL such asdashboard.agent-browser.localhost") — never a sub-path, and there's no base-path flag. So our proxy embed can't be fixed cleanly.The fix
panel_mode→minimal— a live screenshot + nav toolbar through the gated same-origin routes. No dashboard, no daemon, no proxy; works on host and member. Verified e2e against the real binary (typedexample.com→ Go → a live 1280px frame rendered in the panel).GET/POST /api/plugins/agent_browser/dashboard. Start it up entirely from the panel. Verified e2e (status → start → running → stop → stopped). Status is a live loopback probe (there's nodashboard statusCLI subcommand).No change to the browser tools. Tests +2 (dashboard control endpoint, default-mode), updated panel assertions — 20 tests, ruff clean.
🤖 Generated with Claude Code