Skip to content

Commit 1bfd7f9

Browse files
mabry1985claude
andauthored
feat(panel): full mode gets an "Open ↗" to pop the dashboard into a new tab (v0.5.1) (#13)
Even with the dashboard embedded inline, you sometimes want it in a full browser tab. Adds an "Open ↗" button to the full-mode bar, shown whenever the dashboard is on this machine (loopback host, not fleet-proxied) — and a top-level new-tab nav reaches the http dashboard even from an https console, where the embedded frame is mixed-content-blocked (the https message now points at it). Verified headless (link shows + points at the dashboard's own origin). Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent f7fe151 commit 1bfd7f9

5 files changed

Lines changed: 21 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## v0.5.1
4+
- **Full mode: an "Open ↗" button** to pop the dashboard out into a full browser tab, alongside the
5+
inline embed. Shown whenever the dashboard is on this machine (loopback host) — including over an
6+
https console, where the new-tab nav reaches the http dashboard even though the embedded frame
7+
can't.
8+
39
## v0.5.0
410
- **`full` is the default again, and it embeds the dashboard inline.** Full mode iframes
511
agent-browser's dashboard at its own **local origin** (`http://<host>:<port>/`) — so on a local

browser_panel.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,10 @@ async def _dash_control(body: dict = Body(...)):
173173
.card .d{color:var(--pl-color-fg-muted);line-height:1.6}
174174
.card code{background:var(--pl-color-bg-subtle,rgba(127,127,127,.16));padding:.1em .35em;border-radius:4px}
175175
</style></head><body>
176-
<div class="bar"><b>Browser</b><span id="dash" title="agent-browser dashboard"></span></div>
176+
<div class="bar"><b>Browser</b><span id="dash" title="agent-browser dashboard"></span>
177+
<span style="flex:1"></span>
178+
<a id="openlink" class="pl-btn pl-btn--ghost pl-btn--sm" target="_blank" rel="noopener"
179+
title="Open the dashboard in a new tab" style="display:none">Open ↗</a></div>
177180
<div class="stage">
178181
<iframe id="f" referrerpolicy="no-referrer" allow="clipboard-read; clipboard-write"></iframe>
179182
<div id="msg"><div class="card"><div class="t" id="mt"></div><div class="d" id="md"></div></div></div>
@@ -184,6 +187,11 @@ async def _dash_control(body: dict = Body(...)):
184187
try { kit = await import(BASE + "/_ds/plugin-kit.js"); kit.initPluginView(); }
185188
catch (e) { kit = { initPluginView(){}, apiFetch: (p, i) => fetch(BASE + p, i) }; }
186189
190+
// Open-in-new-tab — show it whenever the dashboard is on THIS machine (loopback host, not
191+
// fleet-proxied), so you can pop the embedded dashboard out into a full tab. A top-level
192+
// new-tab nav reaches the http dashboard even from an https console (unlike the embed).
193+
if(LOCAL){ const o=$("openlink"); o.href=DASH_URL; o.style.display=""; }
194+
187195
function showFrame(){ $("f").src=DASH_URL; $("f").style.display="block"; $("msg").style.display="none"; }
188196
function showMsg(title, html){ $("mt").textContent=title; $("md").innerHTML=html;
189197
$("msg").style.display="flex"; $("f").style.display="none"; }
@@ -213,8 +221,9 @@ async def _dash_control(body: dict = Body(...)):
213221
if(MIXED){
214222
renderDash(null);
215223
showMsg("Can't embed the dashboard over https",
216-
"The console is served over https, but agent-browser's dashboard is http — browsers block that mix. "
217-
+ "Open the console at <code>http://localhost</code>, or set <code>panel_mode: minimal</code>.");
224+
"The console is served over https, but agent-browser's dashboard is http — browsers block that mix "
225+
+ "for an embedded frame. Use <b>Open ↗</b> above to view it in a new tab, set "
226+
+ "<code>panel_mode: minimal</code>, or open the console at <code>http://localhost</code>.");
218227
return;
219228
}
220229
const running = await dashRunning(); renderDash(running);

protoagent.plugin.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
id: agent_browser
22
name: Agent Browser
3-
version: 0.5.0
3+
version: 0.5.1
44
description: >-
55
Browser automation for protoAgent, backed by **agent-browser** (vercel-labs) — a
66
fast native-Rust CLI/daemon that drives Chrome over CDP with accessibility-tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "agent-browser-plugin"
3-
version = "0.5.0"
3+
version = "0.5.1"
44
description = "Browser-automation plugin for protoAgent, backed by vercel-labs/agent-browser (tools + skill + workflows + a live browser panel)."
55
requires-python = ">=3.11"
66

tests/test_agent_browser.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ def test_panel_page_full_mode_embeds_local_or_errors():
191191
assert "LOOPBACK" in html # local detection (loopback host + not fleet-proxied)
192192
assert "Open the console locally" in html # the clear error shown when NOT local
193193
assert "/api/plugins/agent_browser/dashboard" in html # the start/stop control
194+
assert 'id="openlink"' in html and "Open ↗" in html # open the dashboard in a new tab
194195
assert "panel_mode: minimal" in html # the remote alternative the error points at
195196
# the dead sub-path proxy is gone; the port placeholder is interpolated.
196197
assert "/panel/dash" not in html

0 commit comments

Comments
 (0)