Skip to content

improvement(desktop-browser): let a page finish rendering before observing an action - #9985

Merged
waleedlatif1 merged 4 commits into
stagingfrom
feat/browser-settle-before-observe
Nov 13, 2026
Merged

waleedlatif1 merged 4 commits into
stagingfrom
feat/browser-settle-before-observe

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Before an action's observation, wait until the page has gone 150ms without a structural DOM change (nodes or text; attribute churn such as animations is ignored) and finished loading, capped at 2s. A page already quiet costs one probe
  • Why: in production-loop traces, when the model re-snapshotted right after an action that already returned a snapshot, the page had changed in 72 of 73 cases — the observation averaged 14 outline lines (often only the logo mid route change) against 73 a round later — so the agent spent a round re-observing or acted on a half-rendered page
  • The watcher is a single document-wide MutationObserver installed by the shared page helpers

Type of Change

  • Improvement

Testing

  • Red/green driver tests: a page still rendering is observed only once it goes quiet, an already quiet page costs one probe, a page that never settles is still observed within the cap; 551 browser-agent tests pass, desktop type-check clean
  • Production-loop A/B (Opus 5.5, Sim's Electron driver; REAL ×2 seeds, WebGames, capbench; 302 paired episodes, arms concurrent): success 220 → 221, rounds/episode −6%, wall −10%, cost −10%, failed tool calls −21% on episodes both arms passed. The REAL losses are model choices or renderer crashes and agent-process exits that hit both arms equally during that run

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 13, 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 13, 2026 5:37am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with no new actionable issues found.

Summary

The PR waits for 150ms without structural page changes before a follow-up observation, with a 2s settling limit.

  • Browser actions wait for the page to settle before showing an observation.

No new actionable issues were found. The supplied code addresses all three previous findings. Those threads have no supplied comment numbers, so they receive no numbered ledger entries.

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

@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

…s and frames, waits through mid-navigation probes
@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 13, 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.

All reported issues were addressed across 4 files

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 13, 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 4 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 — d4d30de9 Deployed Nov 13, 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