Skip to content

improvement(desktop-browser): click through a nested control that fills the whole target - #9956

Merged
waleedlatif1 merged 3 commits into
stagingfrom
feat/browser-use-hillclimb-3
Nov 12, 2026
Merged

waleedlatif1 merged 3 commits into
stagingfrom
feat/browser-use-hillclimb-3

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • browser_click on a target whose whole area is one nested control (a time-slot label filling its link) now clicks there — what a person clicking the target hits — and reports clickedThrough, instead of refusing with "lands on X, which is its own control inside that element"
  • A nested control covering only part of the target still refuses, so a card's own Save/heart button is never hit by a click meant for the card

Type of Change

  • Improvement

Testing

  • Red/green unit tests in page-functions.test.ts (fills-the-target clicks through; partial cover still refuses); 541 browser-agent tests pass
  • Production-loop benchmark on REAL (Opus 5.5, Sim's Electron driver, 242 paired episodes, both arms concurrent, fresh seeds): nested-control refusals 42 → 0; on the episodes where it fired, rounds −17% and wall −24% with success unchanged. Suite-wide success 156 → 152 is noise — none of the lost episodes involved a click-through

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 12, 2026 10:34pm UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 3 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no blocking issues remain.

Summary

Allows native clicks through one nested control that fills the target and reports clickedThrough.

  • A full-size nested control can receive a browser click.

Reviews (3) · Last reviewed commit: "test(desktop-browser): exercise the form..." · Reviewed by Greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 3 files

Confidence score: 4/5

  • The top-level-window gate in page-functions.ts rejects same-origin iframe targets, so the new click-through behavior won’t work inside those frames. Adjust the gate to preserve framed clicks.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/desktop/src/main/browser-agent/page-functions.ts">

<violation number="1" location="apps/desktop/src/main/browser-agent/page-functions.ts:1547">
P3: This top-level-window gate makes the new click-through behavior refuse every same-origin iframe target, even though `clickElement` already translates frame coordinates and the driver supports native framed clicks. Remove the `window.top === window` restriction so a fully covered control behaves consistently inside same-origin frames.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

This branch was previously deployed

1 inactive deployment
Preview — 4700986b Deployed Nov 12, 2026 by vercel[bot]
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.

1 participant