Skip to content

Conversation

@SplittyDev
Copy link
Contributor

@SplittyDev SplittyDev commented Apr 7, 2025

Context

The inability to resize the browser window causes lots of issues when trying to do responsive design or test mobile-features. This PR adds a resize action, so that agents can resize the browser window at will.

Implementation

A Chrome Developer Protocol (CDP) session is used in order to resize the window.

Screenshots

This screenshot shows the resize action, where the agent resized the website to a mobile viewport size.
Code 2025-04-07 16 32 19

How to Test

  1. Make a small website with an element that only shows on small viewports
  2. Tell Roo Code to open the website and resize it to a mobile size

Get in Touch

No Discord, but you can contact me under [email protected], or preferably right here.


Important

Adds resize action to browser tool, enabling window resizing via CDP in browserActionTool.ts and BrowserSession.ts.

  • Behavior:
    • Adds resize action to browserActionTool.ts and BrowserSession.ts for resizing browser window using CDP.
    • Requires size parameter in BrowserActionToolUse and ClineSayBrowserAction.
  • Implementation:
    • Implements resize() in BrowserSession.ts to set viewport and window bounds.
    • Updates browserActions array in ExtensionMessage.ts to include resize.
  • Documentation:
    • Updates getBrowserActionDescription() in browser-action.ts to describe resize action and size parameter.

This description was created by Ellipsis for bdf2663. It will automatically update as commits are pushed.

@changeset-bot
Copy link

changeset-bot bot commented Apr 7, 2025

⚠️ No Changeset found

Latest commit: bdf2663

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Apr 7, 2025
Copy link
Collaborator

@mrubens mrubens left a comment

Choose a reason for hiding this comment

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

Nice!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Apr 7, 2025
@mrubens mrubens merged commit fff8fdd into RooCodeInc:main Apr 7, 2025
19 checks passed
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants