Skip to content

[Bug]: Unscoped browser keypress falls back across workspaces #26069

Closed

Description

@oliver-mee

Operating system

macOS

Orca version

Upstream main at d1fe11c (source checkout).

Details

An unscoped browser keypress can mutate another workspace's active browser page instead of refusing an ambiguous target. This is a target-selection failure, distinct from the explicit-page keyboard-focus issue in #12912 and PR #23895.

Reproduction at the bridge boundary:

  1. Register two live browser pages in different workspaces.
  2. Make the second workspace's page globally active.
  3. Call AgentBrowserBridge.keypress('a') without a workspace or page selector.
  4. Repeat with MediaPlayPause to exercise the helper fallback.

Both calls resolve successfully on current main. The existing strict target policy rejects equivalent ambiguous text-mutating calls, but keypress does not opt into it.

Expected: return browser_target_ambiguous without sending keys or starting the helper. Explicit page selection and valid workspace-scoped calls should continue working.

Adding these regression cases to agent-browser-bridge-keypress-input.test.ts gives 2 failing and 17 passing tests on current main. Enabling the existing requireScopedTarget option for keypress gives 19 passing tests. No new targeting mechanism or setting is needed.

Related: merged #6563 established the strict policy for text-writing commands. This report concerns the remaining keypress admission gap, not terminal focus or keyboard delivery after a page has been resolved.

Activity

  1. AmethystLiang commented on Oct 7, 2026

    @AmethystLiang
    Contributor

    Thanks for reporting. Looking into it

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

Metadata

Metadata

Assignees

Labels

os:macosIssues affecting macOS

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions