Skip to main content

Module browser_zoom

Module browser_zoom 

Source
Expand description

An agent’s zoom of a browser pane it drives (docs/specs/SPEC_BROWSER_PANE_AGENT_ZOOM_2026_11_10.md). The host does the zoom (/agentmux/browser/zoom: emulation on the pane’s own browser); this checks that the pane is the caller’s, remembers which panes are zoomed and by whom, and gives the agent’s Browser tool the line it ends every answer with while one is, so a stale zoom is never a surprise.

Structs§

Zoomed 🔒
A pane the host has zoomed: the agent that did it, and what to tell that agent.

Constants§

HOST_TIMEOUT 🔒
How long the host has to fit a pane (it reflows the page and measures it).
STATUS_TIMEOUT 🔒
How long it has to say how a pane is zoomed now (it only reads its own record).

Functions§

handle_ui_browser_zoom 🔒
POST /api/v1/ui/browser/zoom — zoom a pane the caller drives, or put it back (reset).
notes 🔒
The lines for agent’s Browser tool to end an answer with: one per pane of theirs that is zoomed, as the host holds it now. The host changes a zoom on its own (it follows a resize, drops one it could not apply, and loses one with a browser that slept), so each pane is asked about; a host that cannot be reached leaves what was recorded. Asked without waking a pane that sleeps.
notes_for 🔒
reconcile 🔒
Part of the push of the owned panes: forget the zoom of every pane that stopped being the zoomer’s, and tell the host to put each back, in case another agent now owns one (the host only knows a pane is owned).
remember 🔒
Remember the host’s answer: the pane is zoomed (with the line to show), or it is not.
set 🔒
stale 🔒
The panes the host should put back, and forget here: those no longer owned by the agent that zoomed them, or handed to the person. (The host also drops a zoom on a pane that is not owned at all.) owners is every owned pane with its owner.
stale_in 🔒
zoomed 🔒