Repository navigation
fix(browser): agent bringToFront and activateTarget no longer take your keyboard (1/3) - #28452
Conversation
2e5560e to
7bef672
Compare
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 1 minute. View limit details
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: 🔵 Low · up to
|
7bef672 to
791acf2
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
59de1128-44f0-4c75-86ca-460534a4c23a
📒 Files selected for processing: 1
docs/reference/agent-browser-focus-isolation.md
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
791acf2 to
33352e2
Compare
…e user's focus Adds docs/reference/agent-browser-focus-isolation.md: measured input routing for <webview> guests and the plan for #20595.
33352e2 to
e31a7fa
Compare
ELI5
When an agent drives Orca's browser, some of its commands could pull your keyboard away from the terminal you were typing in. This first step stops two of them, "bring this page to the front" and "activate this page", from touching your keyboard at all. It also adds a short design doc for the whole fix.
What Changed
Page.bringToFrontmade Orca callwebContents.focus()on the page, so your typing jumped into the browser.Target.activateTargetwas passed straight through to the page.docs/reference/agent-browser-focus-isolation.md. It records what Chromium actually does with each kind of input on a<webview>page (measured in a hidden Electron window) and the plan for the two follow-up PRs.This is PR 1 of 3. The next two handle keys and text, then clicks.
Why
These two commands exist only to raise a page, and raising it is exactly the side effect the issue reports. Making them do nothing is the smallest safe change, and the design doc explains why the rest of the fix routes input differently instead of focusing pages.
Linked Issue
Part of #20595 (the last PR in the stack closes it). Related: #16674.
Visual Proof
N/A. Focus routing only, with no visible UI change. The stack's end-to-end spec (PR 2 and 3) checks the terminal keeps focus.
Testing
pnpm tc, browser and main-process unit suites, and the changed-code quality gate pass.New unit tests: both commands return
{}without focusing or forwarding.Platforms: macOS (hidden-window Electron runs). The change has no platform branches.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Agent skill upstream boundary
Notes
bringToFrontto make typing work never needed it to land input.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)