Skip to content

feat(web-integration): add BrowserAgent page selection actions#2657

Open
quanru wants to merge 2 commits into
fix/auto-switch-new-tabfrom
feat/browser-agent-page-selection
Open

feat(web-integration): add BrowserAgent page selection actions#2657
quanru wants to merge 2 commits into
fix/auto-switch-new-tabfrom
feat/browser-agent-page-selection

Conversation

@quanru

@quanru quanru commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add BrowserAgent-only ListBrowserPages and SetActivePage actions so AI plans can inspect open tabs and switch the active page by index/title/url
  • reuse the shared BrowserAgent page controller for page summaries and selector-based active page changes, including ambiguity errors for title/url matches
  • document the new BrowserAgent actionSpace behavior in EN/ZH API reference and declare zod as a direct @midscene/web dependency for the action param schema

Validation

  • fnm exec --using v20.20.2 pnpm install --frozen-lockfile --ignore-scripts
  • NODE_OPTIONS=--max-old-space-size=4096 fnm exec --using v20.20.2 pnpm --dir packages/web-integration test -- tests/unit-test/browser-agent-page-controller.test.ts
  • fnm exec --using v20.20.2 npx nx build @midscene/web --skip-nx-cache
  • fnm exec --using v20.20.2 pnpm run lint
  • git diff --check

Note

  • The first focused web build hit RangeError: Invalid string length because an ignored generated apps/report/dist/index.html from a previous root prepare run was 485MB. I removed that generated dist directory and reran the focused web build successfully.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 11, 2026

Copy link
Copy Markdown

Deploying midscene with  Cloudflare Pages  Cloudflare Pages

Latest commit: 000f697
Status: ✅  Deploy successful!
Preview URL: https://bbb723cb.midscene.pages.dev
Branch Preview URL: https://feat-browser-agent-page-sele.midscene.pages.dev

View logs

@quanru quanru force-pushed the feat/browser-agent-page-selection branch 3 times, most recently from ed59616 to e438e6e Compare June 11, 2026 06:49
@quanru quanru force-pushed the fix/auto-switch-new-tab branch from 6c6fa98 to d26cf55 Compare June 22, 2026 07:48
@quanru quanru force-pushed the feat/browser-agent-page-selection branch from e438e6e to 000f697 Compare June 24, 2026 09:23
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