Repository navigation
feat(browser): the live page fills the panel - #53
Merged
Merged
Conversation
The page was always 1280 x 800, so a tall panel showed it small with an empty area below. While an app connection watches, `browser.resize` tells the daemon the room its panel has for the page: the page keeps its 1280 of width, so sites keep their desktop layout, and takes the height that gives it the room's shape, between 600 and 2000. Frames, the owner's points and the bot's scroll follow the size the page has. When the last one watching stops, the page is 1280 x 800 again. Spec 21.3, 21.7, 21.8 and 21.10 say so, and section 19 records what the real Edge does when the size changes with a page open.
The panel measures the room it has under the address row and asks for a page of that shape, 300 ms after the room stops changing. The picture is shown as large as fits, in the page's shape. Notices that come and go (the request for a hand, the bar that says the owner is in control, the line about what the bot did) do not count: they never resize the page. The preview's pages are drawn at the size the panel asks for.
Edge drops the frame of the new size while older frames wait to be confirmed, and a page that stands still sends no other: the panel kept the picture of the old size. After sizing the tabs the daemon waits for those frames to be confirmed and starts the screencast over, which sends one. The test with the real Edge now waits for a frame after each change; it failed about half the runs before.
This was referenced Sep 30, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The browser panel showed the bot's page at a fixed 1280 x 800, so a tall panel had the page small at the top and a large empty area below it. Now the page takes the shape of the room the panel has.
browser.resize {botId, width, height}: the room the watching connection's panel has for the page. The page keeps its 1280 of width, so sites keep their desktop layout (a narrow panel shrinks the picture, not the page), and takes the height that gives it the room's shape, between 600 and 2000. It applies to every tab, also to a browser that opens later, and the page goes back to 1280 x 800 when the last connection watching stops. Frames, the bounds of the owner's points and the bot'sbrowser_scrollfollow the size the page has now.Decisions
Tests
crates/botloftd/tests/browser_panel.rs, with the real Edge: a size asked before the browser opens, a change with a page open (the page'sinnerHeightand the frames follow), the owner's points on the taller page, and back to 800 afterbrowser.unwatch.browser.test.tsxwithFakeBotloft: the panel asks for the right room, the bot's cursor lands right on a taller page, and closing the panel gives the page its own size back.cargo fmt,clippy -D warnings,cargo test --workspaceandpnpm checkpass.pnpm dev): the page fills a tall panel, follows the window's size, and keeps its size when taking control.Still to see with real Claude Code
browser_screenshotgives the bot the taller picture without trouble (ask it to describe the bottom of the page).