You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Browser.setWindowBounds is accepted but never resizes, moves or hides the page #2777
Evaluate the same metrics and matchMedia('(max-width: 900px)').matches.
Browser.setWindowBounds {windowId, bounds: {windowState:'minimized'}}, then read document.visibilityState.
Expected (Chromium)
Step 2 returns a full rectangle, e.g. {left:22, top:22, width:756, height:556, windowState:'normal'}.
After step 3 the metrics are 800,513,800,600,10,20 and the media query matches.
After minimizing, visibilityState is hidden.
Actual
Step 2 returns {windowState:'normal'} with no rectangle.
The metrics stay 1920,1080,1920,1080,0,0, and the media query is false.
visibilityState stays visible.
Root cause
moli-protocol/src/domains/browser.rs:214-259 seeds bounds from BrowserWindowBounds::default() (conn.rs:1669). set_window_bounds only writes conn.browser_window_bounds, and nothing reads that map to resize the page's window, move it, or hide it.
Impact
Clients that size the window instead of using device-metrics emulation see no layout change, and pages never see visibilitychange when the window is minimized. Related: #2767 (omitted fields are erased).
Related validation gap, found while reviewing #2772 (same on main). Chrome rejects Browser.setWindowBounds when it combines a non-normalwindowState with left/top/width/height. It also rejects a bounds-only resize while the window is minimized, maximized or fullscreen ("restore it to normal state first"). moli accepts both and stores them. When this issue makes bounds actually apply to the page, these validation rules should come with it.
Closing as not planned after a scope review. Chromium behaving differently is not enough reason on its own; the question is whether moli, a headless browser for agent workloads, needs this. moli is headless: clients size the viewport through Emulation.setDeviceMetricsOverride, which works. Applying window bounds to the page only matters for headful window management. The field-merge and getWindowBounds part is handled by #2772.
Reopening to keep this on record. It is a reproduced problem that one of the earlier PRs targeted. It is low priority and not scheduled for a fix now; a PR will follow only once the scope (whether moli should support it) and the fix approach are clear.
Activity
lanyue-llk commentedon Nov 12, 2026
Related validation gap, found while reviewing #2772 (same on main). Chrome rejects
Browser.setWindowBoundswhen it combines a non-normalwindowStatewithleft/top/width/height. It also rejects a bounds-only resize while the window is minimized, maximized or fullscreen ("restore it to normal state first"). moli accepts both and stores them. When this issue makes bounds actually apply to the page, these validation rules should come with it.lanyue-llk commentedon Nov 12, 2026
Closing as not planned after a scope review. Chromium behaving differently is not enough reason on its own; the question is whether moli, a headless browser for agent workloads, needs this. moli is headless: clients size the viewport through
Emulation.setDeviceMetricsOverride, which works. Applying window bounds to the page only matters for headful window management. The field-merge andgetWindowBoundspart is handled by #2772.lanyue-llk commentedon Nov 12, 2026
Reopening to keep this on record. It is a reproduced problem that one of the earlier PRs targeted. It is low priority and not scheduled for a fix now; a PR will follow only once the scope (whether moli should support it) and the fix approach are clear.