Repository navigation
Description
Parent
#1645 (hub #1643). Follows #1687 (PR #1716).
Problem
After #1687 the phone can watch and take over a Bot's Browser only inside the in-app full client: a WebView that loads the desktop viewer page (packages/browser/src/viewer-local.ts). It works, but it feels like a web page in an app: small hit targets, desktop toolbars, no native gestures, and the keyboard and safe areas don't behave like the rest of the app. Vain (thread) wants a native viewer as the next step.
The local viewer already speaks a simple protocol that a native screen can reuse: JPEG frames from a CDP screencast over HTTP long-poll (frame?slug=…&after=<seq>, with x-frame-seq and x-frame-mode), JSON input over POST input, and pause and resume through /api/browser/takeover.
What to build
A native Browser screen in apps/mobile, opened from the Bot's DM (for example from the chat header or the Bot profile sheet), that:
- shows the live frames, fitted to the screen and zoomable with pinch;
- shows who is driving (Bot or Human) and offers Pause Bot / Resume;
- while paused, maps touch to input in two modes, like the web viewer and RustDesk: direct (tap where you touch) and trackpad (drag moves a cursor, tap clicks), plus scroll and a native keyboard for typing;
- reaches the Host only through the device gateway with
Authorization: Device. The gateway gains native routes for the viewer'sframeandinput(next to the existing/botharness-device/api/browser/…), re-checking the device on every request, and revoking the device stops the screen with401 device-revoked.
JavaScript only: render frames with Image (or Skia if measurement shows Image drops frames). No new native module, so no new development build.
Excluded: the Container Browser (Selkies) and the Computer; they come in Mobile 8 over WebRTC.
Acceptance criteria
- From a Bot DM on a paired phone, the native Browser screen shows the Bot's live browser
- Pause Bot, direct tap, trackpad drag and tap, scroll, and typing work; Resume hands control back
- Every request goes through
/botharness-device/…with the device credential (isolated-Host e2e likescripts/e2e-device-viewers.mjs) - Revoking the device stops the screen and later requests answer
401 device-revoked - Any new Host route ships its
deepseekbotCLI command (CLI parity) - Web-export screenshots in the PR; physical-device recording on iOS and Android; Human QA
Activity
DoodleBears commentedon Oct 14, 2026
Agent work claim
claude/cloud/session_01KBzwDjxxz9H76kVfvtkxJ6(not a DSH Session)apps/mobileand the device gateway's native frame/input routes (the Mobile 8: Remote-control a Bot's Computer and Container Browser from the phone over WebRTC #1799 signalling route is out of scope)claude/mobile-viewer-1687-y6rlleafter Use a Bot's Browser and Computer from the phone's in-app full client #1716 mergesGenerated by Claude Code
test(mobile): add browserAccess to the remaining roster fixtures
Watch and take over a Bot's Browser on a native phone screen (#1810)
DoodleBears commentedon Oct 14, 2026
Outcome: shipped in #1810 (squash f05cc89). The work moved from the #1687 branch to
claude/native-browser-viewer-1798./api/browser/frameand/api/browser/inputreach the phone through the existing device gateway. CLI:deepseekbot browser-frame,deepseekbot browser-input <id> --args-stdin.scripts/e2e-mobile-browser-web.mjs.Agent task
claude/cloud/session_01KBzwDjxxz9H76kVfvtkxJ6released.Generated by Claude Code
fix(mobile): offer Pair again after the phone is revoked
fix(mobile): let the Browser keyboard button hide the keyboard
fix(mobile): hand the Browser back when the phone viewer closes while…
DoodleBears commentedon Oct 15, 2026
Follow-up shipped in #1909, with fixes from Simulator QA:
All four checks passed on the iOS Simulator (#1909 (comment)). Android is still untested. Long-press right click and two-finger scroll couldn't be verified on the Simulator.
Generated by Claude Code