Skip to content

cua route: viewport set/get/reset in the host (Emulation override per tab) #82

Closed

Description

@SSFSKIM

Enhancement (residue of #10)

The vendor service's browser_viewport_set / browser_viewport_get / browser_viewport_reset reach the backend as
executeUnhandledCommand, which cua's host answers with No handler, so an agent cannot fix a tab's viewport
(stable screenshot size independent of the window). The ChatGPT extension implements it with
Emulation.setDeviceMetricsOverride applied on attach and remembered per tab.

Fix

In src/chrome/host.mjs: handle executeUnhandledCommand for the three viewport commands (shape per BS:31979–35713,
browser_viewport_*), keep the override per owned tab, apply it on every attach/re-attach (including by targetId),
clear it on reset and at turn end; advertise capabilities.browser: ["viewport"] in getInfo (check BS for the exact
capability name the service tests). No new extension permission. Pin with host tests (fake extension records the
emulation command) and one accept-chrome --route cua cell that sets 800×600 and checks tab.screenshot dimensions.

Activity

  1. added
    enhancement
    status:ready-for-implementer
    priority:P2
    status:in-progress
    and removed
    status:ready-for-implementer
    on Oct 8, 2026
  2. SSFSKIM commented on Oct 8, 2026

    @SSFSKIM
    OwnerAuthor

    [board] in-progress: Owner go 2026-10-08; building on feat/viewport (worktree cua-wt-82).

  3. added
    status:in-review
    and removed
    status:in-progress
    on Oct 8, 2026
  4. SSFSKIM commented on Oct 8, 2026

    @SSFSKIM
    OwnerAuthor

    [board] in-review: Viewport capability in the host; unit + H1 probe pass; live accept-chrome cell added, not run (needs owner's loaded extension).

  5. removed
    status:in-review
    on Oct 8, 2026
  6. SSFSKIM commented on Oct 8, 2026

    @SSFSKIM
    OwnerAuthor

    [board] done: Merged PR #87: viewport set/reset in the host (vendor shapes; no get in this build); 967 tests; live cell added, to run with the next live session.

  7. added a commit that references this issue on Oct 8, 2026
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

    enhancementpriority:P2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions