Skip to content

feat(claude): show the panel in a browser and download its runtime - #72

Merged
hannojg merged 10 commits into
mainfrom
poc/browser-panel
Oct 30, 2026
Merged

hannojg merged 10 commits into
mainfrom
poc/browser-panel

Conversation

@hannojg

@hannojg hannojg commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

Ships Mobile Dev's device panel to Claude Code through a browser beside the chat, in a plugin that fits Anthropic's plugin directory.

  • Browser panels: hosts without MCP Apps, such as Claude Code, get a private loopback link to the shared panel, which the agent opens in its browser pane. The page relays what an MCP Apps host would get as model context (selected devices, attached logs, screenshots, notes) to the server, and the agent reads it with mobile_read_panel_context.
  • Panel runtime download: the directory limits every file to 5 MiB, so Claude's packages leave out Baguette, serve-emu and the iOS mirror. Packaging packs them into mobile-dev-<version>-panel-runtime-darwin-arm64.tar.gz, which each GitHub release attaches, and pins its size and SHA-256 in dist/panel-runtime.json. On the first panel open the server downloads, verifies and extracts it into ${CLAUDE_PLUGIN_DATA}. Claude's server gets the panel back, and its skill opens it in the browser.
  • Test deployments: a prerelease version such as 0.1.172-test.1 publishes a GitHub prerelease with every package, stays off release/latest and release/claude, and is left out of later release notes.
  • Also merges the project website and the brand design guide.

Telemetry

Adds browser_panel.sessions, browser_panel.context_update and browser_panel.context_bytes, and panel_runtime.ready and panel_runtime.download_bytes, all without URLs, paths, IDs or content, and honoring opt-out. Download failures use the new expected download_failed outcome; checksum, archive and filesystem failures are captured as panel_runtime.prepare errors. See docs/telemetry.md.

Testing

  • Unit tests for the browser panel, its context relay and the runtime download (caching, sharing, checksum and archive rejection, HTTP failure with retry, version pruning, prerelease versions).
  • Host tests: the Claude and browser projects, including the 5 MiB file check.
  • npm run test:claude: installs the copied plugin's runtime from its pinned archive, starts Baguette from it and opens the browser panel.
  • Manually: the packaged plugin in the Claude desktop app's browser pane, streaming a simulator from the downloaded runtime.
  • Not yet tested: the download from a real GitHub release. That needs a test deployment after this merges.

🤖 Generated with Claude Code

hannojg and others added 10 commits October 29, 2026 17:22
Browser panels now advertise model context and relay each update to their
own session's context endpoint. The new mobile_read_panel_context tool lets
the agent read the devices, logs, screenshots and notes a tab shares, most
recent tab first; a tab's context goes away with its session. The opening
tool's result asks the agent to show the page in the foreground and points
it at the new tool.

Adds browser_panel.context_update and browser_panel.context_bytes metrics,
Claude Code setup docs, and unit and host tests for the relay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds the Astro website, docs/DESIGN.md for brand visuals, the README
banner, and an AGENTS.md pointer to the design guide.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	README.md
#	packages/core/src/index.ts
#	packages/core/src/plugin.ts
#	packages/core/src/server-feature.ts
#	packages/core/src/stdio-server.ts
#	packages/skills/mobile-dev/SKILL.md
#	tooling/host-runtime.mjs
#	tooling/hosts/build.mjs
#	tooling/smoke-plugin.mjs
The Claude plugin directory limits every file to 5 MiB, so Claude's packages
leave out the panel's native parts (Baguette, serve-emu, the iOS mirror addon
and its service). Packaging packs them into
mobile-dev-<version>-panel-runtime-darwin-arm64.tar.gz, which the release
attaches, and pins its size and SHA-256 in dist/panel-runtime.json.

On the first panel open the server downloads the archive, verifies it,
refuses entries outside the parts and links, and extracts it into the
plugin's data folder, where other sessions reuse it. Baguette, serve-emu and
the iOS mirror service resolve their files through the new panel runtime
locator. Claude's server gets the panel back, shown in a browser beside the
chat, and its skill opens it there.

Adds panel_runtime.ready and panel_runtime.download_bytes metrics and a
download_failed expected outcome. The smoke test installs the copied
plugin's runtime from its archive and opens the browser panel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A version such as 0.1.172-test.1 now publishes a GitHub prerelease with
every package, including Claude's panel runtime archive, stays off the
Codex and Claude marketplace branches, and is left out of later release
notes. The panel runtime pin and its installed folders accept prerelease
versions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	package-lock.json
#	package.json
#	packages/core/src/serve-emu.ts
#	packages/core/test/telemetry.test.ts
#	packages/shared/src/version.ts
The Codex updater rejected and could not compare the running build's
version when it is a prerelease such as 0.1.172-test.1. It now accepts
one for the running build, compares it as the release it precedes, and
keeps store and published versions plain. Also gives the panel runtime
pruning test time on a loaded machine.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pruning started while the finished download still removed its temporary
archive and staging folder, so reading one of them could fail and stop
the pass, leaving older versions behind. It now runs after that cleanup
and skips entries that another server's download removes meanwhile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hannojg
hannojg merged commit 0c64132 into main Oct 30, 2026
11 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