Repository navigation
fix(panel): keep the browser panel's pane in view - #147
Merged
Merged
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.tsPanelPage.connected()), the result says the panel is already open, and the agent reuses that tab instead of being told it is "not open yet".mobile_read_panel_contextends 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. Ifshow_panereports that the session isn't open in a window, the next Mobile Dev turn checkstabs_contextand callsshow_paneagain.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.Android CPU sessions reconnect after the original plugin cache is removed, which also fails onmainwithout this change.tsc --noEmitreports the same 25 errors as onmain, none in these files.show_pane, got "not open in a window", and told the user. In the foreground,preview_startfollowed byshow_paneopens 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