Skip to content

Mobile 7: Watch and take over a Bot's Browser on a native screen #1798

Closed

Description

@DoodleBears

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's frame and input (next to the existing /botharness-device/api/browser/…), re-checking the device on every request, and revoking the device stops the screen with 401 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 like scripts/e2e-device-viewers.mjs)
  • Revoking the device stops the screen and later requests answer 401 device-revoked
  • Any new Host route ships its deepseekbot CLI command (CLI parity)
  • Web-export screenshots in the PR; physical-device recording on iOS and Android; Human QA

Blocked by

Activity

  1. added
    ready-for-agentFully specified, ready for an AFK agent
    area:fullstackEnd-to-end Host and Client implementation
    scope:tracerHuman-testable implementation slice
    on Oct 14, 2026
  2. DoodleBears commented on Oct 14, 2026

    @DoodleBears
    ContributorAuthor

    Agent work claim


    Generated by Claude Code

  3. added
    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDs
    on Oct 14, 2026
  4. removed
    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDs
    on Oct 14, 2026
  5. DoodleBears commented on Oct 14, 2026

    @DoodleBears
    ContributorAuthor

    Outcome: shipped in #1810 (squash f05cc89). The work moved from the #1687 branch to claude/native-browser-viewer-1798.

    • The phone app has a native Browser screen (Bot profile → Browser): live frame, Pause Bot / Resume, Tap and Trackpad modes, pinch zoom, long press as a right click, and a keyboard button.
    • New Host routes /api/browser/frame and /api/browser/input reach the phone through the existing device gateway. CLI: deepseekbot browser-frame, deepseekbot browser-input <id> --args-stdin.
    • Verified with a live-Host test and the web journey scripts/e2e-mobile-browser-web.mjs.
    • Still open: QA on a physical iOS and Android phone (pinch, tap/trackpad feel, long press, keyboard, revoke while the screen is open).

    Agent task claude/cloud/session_01KBzwDjxxz9H76kVfvtkxJ6 released.


    Generated by Claude Code

  6. DoodleBears commented on Oct 15, 2026

    @DoodleBears
    ContributorAuthor

    Follow-up shipped in #1909, with fixes from Simulator QA:

    • After a revoke, the Browser and Computer screens offer Pair again, and the DM shows "Your computer refused this app" with Pair again instead of "Reconnecting to this DM…".
    • The Browser keyboard button now toggles the keyboard, and the controls stay above it.
    • Closing the Browser screen while paused hands the Browser back to the Bot (Vain's choice).

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:fullstackEnd-to-end Host and Client implementationready-for-agentFully specified, ready for an AFK agentscope:tracerHuman-testable implementation slice

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions