Skip to content

fix(browser-operator): use model-specified scroll amount instead of hard-coded 500#1830

Open
Br1an67 wants to merge 1 commit into
bytedance:mainfrom
Br1an67:fix/issue-903-scroll-amount
Open

fix(browser-operator): use model-specified scroll amount instead of hard-coded 500#1830
Br1an67 wants to merge 1 commit into
bytedance:mainfrom
Br1an67:fix/issue-903-scroll-amount

Conversation

@Br1an67
Copy link
Copy Markdown
Contributor

@Br1an67 Br1an67 commented Mar 1, 2026

Summary

Fixes #903

The handleScroll method in browser-operator.ts hard-coded scrollAmount = 500, ignoring the amount parameter from the model output (e.g. scroll(direction='down', amount=200)). The action parser correctly extracts amount into inputs.amount, but it was never used.

Changes:

  • Use inputs.amount (with fallback to 500) for scroll distance
  • Add support for left and right scroll directions (previously only up/down were handled)

Checklist

  • Added or updated necessary tests (Optional).
  • Updated documentation to align with changes (Optional).
  • Verified no breaking changes, or prepared solutions for any occurring breaking changes (Optional).
  • My change does not involve the above items.

Use the amount parameter from model output (e.g., scroll(direction='down', amount=200))
instead of hard-coding 500px. Falls back to 500px when no amount is specified.

Also add support for left/right scroll directions.

Closes bytedance#903
@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 1, 2026

Deploy Preview for agent-tars-docs canceled.

Name Link
🔨 Latest commit 4c60cd4
🔍 Latest deploy log https://app.netlify.com/projects/agent-tars-docs/deploys/69a46df9bee41f0008f0e106

@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 1, 2026

Deploy Preview for tarko canceled.

Name Link
🔨 Latest commit 4c60cd4
🔍 Latest deploy log https://app.netlify.com/projects/tarko/deploys/69a46df9b705150008db4094

@Br1an67
Copy link
Copy Markdown
Contributor Author

Br1an67 commented Mar 8, 2026

Hi — just a gentle bump on this. Happy to make any changes if needed!

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.

[Bug Report]: browser operator does not support scroll with explicit amount

1 participant