Skip to content

fix(panel): keep the browser panel's pane in view - #147

Merged
hannojg merged 1 commit into
mainfrom
fix/browser-panel-reshow
Nov 25, 2026
Merged

hannojg merged 1 commit into
mainfrom
fix/browser-panel-reshow

Conversation

@hannojg

@hannojg hannojg commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

Problem

In the Claude desktop app's Code tab, opening Mobile Dev's panel page with the browser tool loads it into a hidden Browser pane and leaves only a card in the chat. The agent has to call the host's pane-showing tool (show_pane) as well, and that does nothing while the user is not viewing the session. Nothing retried later, so the user had to click the card.

Change

  • packages/core/src/browser-panel.ts
    • The opening instructions now say a browser tool reporting the page as opened doesn't mean it is visible. Unless the host reports the pane in view, the agent calls the host's pane-showing tool. If that tool says the user isn't viewing the chat, the agent tells the user where the panel is and shows the pane again on its next Mobile Dev turn.
    • When a panel tab is already connected (PanelPage.connected()), the result says the panel is already open, and the agent reuses that tab instead of being told it is "not open yet".
    • When a tab has shared context, mobile_read_panel_context ends with a short hint to show a hidden pane. Agents read context before device work, so a pane left hidden gets shown then.
  • apps/claude/skills/mobile-dev/SKILL.md: the same rule for the Code tab. If show_pane reports that the session isn't open in a window, the next Mobile Dev turn checks tabs_context and calls show_pane again.

Hosts are still told what to do through what they can do, not their names. Only the Claude skill names the Code tab's tools.

Testing

  • node --test packages/core/test/browser-panel.test.ts: 11/11 pass. New checks cover the first-open and already-connected results and the context hint.
  • Core and Claude test suites: 978 pass. 1 fails, Android CPU sessions reconnect after the original plugin cache is removed, which also fails on main without this change.
  • tsc --noEmit reports the same 25 errors as on main, none in these files.
  • Manual check in the Code tab with a rebuilt 0.1.195 plugin: with the session in the background, the agent called show_pane, got "not open in a window", and told the user. In the foreground, preview_start followed by show_pane opens the pane. Not yet checked: the agent re-showing the pane on its next turn.

Telemetry

This only changes the text sent to the agent and adds no new code path to measure. The browser-panel session and context metrics already in place cover it.

🤖 Generated with Claude Code

Opening the panel page can leave the host's browser pane hidden, and a
pane-showing tool does nothing while the user is not viewing the chat.
The opening result now tells the agent not to treat "opened" as visible,
reuses an already connected tab, and asks the agent to show the pane
again on its next Mobile Dev turn. Panel context reads carry the same
hint, and the Claude skill spells out the Code tab's check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
mobile-dev Ready Ready Preview Nov 25, 2026 8:55am UTC

Request Review

@hannojg
hannojg merged commit 27fe9de into main Nov 25, 2026
15 checks passed
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