Commit Graph
6 Commits
Author SHA1 Message Date
can1357 31f7aa6d58 Merge PR #5778: fix(browser): reject non-string tab selectors with a named error (@roboomp)
# Conflicts:
#	packages/coding-agent/src/prompts/tools/browser.md
#	packages/coding-agent/src/tools/browser/aria/aria-snapshot.ts
2026-07-18 20:13:44 +02:00
roboomp 4e216a3b98 fix(browser): canceled settled scroll timers
- Replaced the losing Bun.sleep with an unrefed timeout cleared in a finally block.
- Added regression coverage that verifies prompt wheel acknowledgements leave no timer behind.

Fixes #5905
2026-07-17 20:10:01 +00:00
roboomp b8ef46a0c8 fix(browser): bounded scroll acknowledgement wait
- Released tab.scroll after two seconds when a queued wheel event waits on a busy renderer acknowledgement.
- Preserved immediate dispatch failures and added regression coverage for both outcomes.

Fixes #5905
2026-07-17 20:02:53 +00:00
roboomp 9f836712e8 fix(browser): rejected non-string tab selectors with a named error
tab.click/type/fill/waitFor*/scrollIntoView route their selector through
parseAriaRefSelector (.trim) and normalizeSelector (.startsWith) before any
validation, so passing the ElementHandle from tab.id(n)/tab.ref(...) (or an
un-awaited Promise of one) crashed with the opaque minified
"A.trim is not a function" instead of an actionable error.

- Added assertSelectorString guard at both selector funnels; throws a ToolError
  naming the recovery ((await tab.id(n)).click() or a string selector) and
  distinguishing ElementHandle / Promise / primitive.
- Corrected browser.md: handles are called directly, not fed to tab.click.
- Regression tests in both selector suites.

Fixes #5776
2026-07-17 02:10:55 +00:00
can1357 0d07da529a feat(coding-agent-tools): implemented browser execution safety controls
- Implemented cell budget clamping for timeouts to prevent stalled browser operations from exceeding execution limits.
- Added `recover` capabilities for tab workers to clear blocking dialogs and safely terminate hung navigations.
- Introduced `//!world=main` support for `tab.evaluate` via Puppeteer patch to allow execution in main execution contexts.
- Improved failure attribution for tab terminations by tracking dialogs, stalled operations, and specific termination reasons.
2026-07-13 00:05:43 +02:00
can1357 1cb433cbde feat(coding-agent): added browser navigation helpers and improved timeout management
- Implemented `waitForSelector` and `waitForNavigation` methods in the browser tool API.
- Introduced per-operation fail-fast budget management with dynamic timeout clamping.
- Added validation for selector engines to reject unsupported Playwright-only platform features.
- Standardized error handling to provide descriptive, named timeouts for stalled browser operations.
2026-06-21 18:10:10 +02:00