Skip to content

fix(web): agent page resizes now scale to fit the browser panel - #205

Merged
badcuban merged 2 commits into
mainfrom
fix/browser-resize-fit
Sep 3, 2026
Merged

fix(web): agent page resizes now scale to fit the browser panel#205
badcuban merged 2 commits into
mainfrom
fix/browser-resize-fit

Conversation

@badcuban

@badcuban badcuban commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

When an agent called browser_resize, the new size reached the page but not the tab. The frame kept filling the panel while the page rendered at the wider viewport, so it came out cropped. The result also reported the panel's size instead of the page's, so the agent read its resize as having done nothing and resized again.

An agent resize is now recorded on the tab the same way a drag on the frame's edges is: the panel scales the page down to fit, keeps its aspect ratio, shows the size in the device toolbar, and leaves the chat split alone. The status reports the page's CSS viewport, the activity line says "Agent resized 1280×800", and the tool description tells the agent the panel scales rather than crops.

Covered by a new unit test in previewAutomationHost.test.ts. Not yet tried live in the desktop app; to check, ask an agent to resize the page to 1280 by 800 and confirm the page shrinks to fit rather than cropping.

When an agent called browser_resize, the new size reached the page but
not the tab. The frame kept filling the panel while the page rendered at
the wider viewport, so it came out cropped. The result also reported the
panel's size instead of the page's, so the agent read its resize as
having done nothing and resized again.

An agent resize is now recorded on the tab the same way a drag on the
frame's edges is: the panel scales the page down to fit, keeps its
aspect ratio, shows the size in the device toolbar, and leaves the chat
split alone. The status reports the page's CSS viewport, the activity
line says "Agent resized 1280x800", and the tool description tells the
agent the panel scales rather than crops.
@vercel

vercel Bot commented Sep 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
threadlines Ready Ready Preview Sep 3, 2026 5:45am UTC

Request Review

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M labels Sep 1, 2026
@badcuban
badcuban merged commit 6bc2789 into main Sep 3, 2026
16 checks passed
@badcuban
badcuban deleted the fix/browser-resize-fit branch September 3, 2026 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant