Skip to content

feat(windows): expose chromium toolbar popovers - #521

Closed
yichen11818 wants to merge 3 commits into
vercel-labs:mainfrom
yichen11818:codex/windows-chromium-popover
Closed

yichen11818 wants to merge 3 commits into
vercel-labs:mainfrom
yichen11818:codex/windows-chromium-popover

Conversation

@yichen11818

@yichen11818 yichen11818 commented Nov 3, 2026 •

Copy link
Copy Markdown

Summary

Chromium toolbar bubbles can be owned tool windows outside the browser frame's UI Automation tree. This adds snapshot --surface popover support on Windows so those controls can be observed through their owning window.

The resolver checks visibility, process identity, popup style, and the owner chain, excludes click-through windows, and selects the largest remaining popup. It returns ELEMENT_NOT_FOUND when none is open. The Windows skill and surface reference describe the new surface.

This PR contains the Windows adapter and its tests. JEv's optional use of this surface is tracked in #520; the adapter can be merged independently.

Related issues

No linked issue.

Type of change

  • feat: new Windows observation surface
  • test: live popup ownership, hidden/click-through exclusions, and advertised-surface resolution coverage
  • docs: Windows skill and surface reference

How tested

Run on Windows against this branch:

  • cargo fmt --all -- --check
  • cargo clippy -p agent-desktop-core -p agent-desktop-windows -p agent-desktop -p agent-desktop-ffi --all-targets -- -D warnings
  • cargo test -q -p agent-desktop-core --lib: 1,582 passed
  • cargo test -q -p agent-desktop-windows window_popover::tests: 5 passed
  • Surface advertising tests: 3 passed
  • every_advertised_surface_resolves_to_a_rootable_element_when_present: passed, including the new real popup fixture. The existing focused-window leg reported that the OS declined foreground ownership.
  • Focused resolver regression a_ref_from_a_live_popover_resolves_back_into_that_popover: passed.
  • Headless CLI smoke test on the owned popup fixture: popover snapshot found Popup choice; clicking its ref returned InvokePattern.Invoke succeeded with delivered_unverified; a fresh snapshot showed the target focused.
  • Local release snapshot timing on the same 160-ref fixture, seven interleaved runs after warm-up: baseline median 757.51 ms (564.26-1100.93); popover branch median 589.99 ms (567.03-1018.47). This is a single-machine fixture measurement, not a general latency claim. Raw data: .git/pr-verification/native-performance.json.
  • cargo test -q -p agent-desktop-windows --lib: the prior full run had 1,462 passed, 24 failed, 6 ignored. The exact same 24 failures reproduce on clean upstream 93ae89e86fb849eeb5fc265b0b8e37eca56aaf72; under a private temporary-directory ACL rerun, 4 failures remain (two owner/DACL cases, the windowless-process fixture, and UIA cache provider classification). Security checks were not weakened.
  • scripts/check-architecture.sh: G11's Windows path substitution is fixed independently in companion PR fix(ci): normalize windows paths in architecture self-test #522; this PR's base still needs that fix before this check can pass.
  • GitHub cross-platform CI is action_required; Vercel preview requires a Vercel Labs team authorization. Browser end-to-end testing against Chromium remains outstanding.

The live fixture and CLI smoke test verify observation and semantic ref resolution on this Windows host. This draft does not claim that the complete validation gate is green.

Checklist

  • Conventional-commit title
  • No new non-test unwrap() or inline Rust comments
  • Modified Rust files stay within the 400-line limit
  • Windows skill and surface reference updated
  • Snapshot refs retain the requested surface during resolution
  • All required checks pass

@vercel

vercel Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

@yichen11818 is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@yichen11818
yichen11818 marked this pull request as ready for review November 5, 2026 02:34
@lahfir

lahfir commented Nov 28, 2026

Copy link
Copy Markdown
Collaborator

closing as superseded by #705 on main, which adds Windows WS_POPUP popover discovery and wait support. thanks @yichen11818

agent-desktop wait --surface popover --app "<app>"
agent-desktop snapshot --app "<app>" --surface popover

@lahfir lahfir closed this Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants