Skip to main content

Module zoom

Module zoom 

Source
Expand description

The routes of the Zoom tool (docs/specs/SPEC_MUXAPI_ZOOM_2026_11_24.md): an agent reads and sets the zoom of the panes in its own tab and of its own window’s chrome.

POST /api/v1/ui/zoom/{get,set,reset,undo,fit,check} { agent_id, scope?, target?, block?, blocks?, value?, token?, chrome?, max?, min_text_px?, axis?, apply? }

The agent’s token decides who acts and which pane is its own; nothing in the body can say “my pane”. A block in the body is a target, checked against the tab that holds the caller’s own pane (a pinned pane’s tab is the one showing, and the pinned panes count as in it). The window that holds that pane applies the change and tells the person (frontend/app/store/zoom-agent.ts), so these routes only carry the call: they never take focus.

Structs§

Scope 🔒
Whose call it is and where: the pane that routes it to a window, that pane’s tab, the name the notice shows, and the write limit. A remote caller has no pane here: own_id is only a pane of the tab it was told it was zooming.

Constants§

PANE_FLOOR 🔒
The least a pane may be zoomed to: a max below it names no zoom a pane can have.
WRITES_PER_MINUTE 🔒
The most writes (set, reset) one agent makes in a minute.

Statics§

WRITES 🔒
The write times of each agent in the last minute.

Functions§

act 🔒
browser_pane_call 🔒
A browser pane the caller drives is zoomed by emulation, whichever tab it is in (spec 4.2): Some(answer) when the call names one, None for every other call.
fit_options 🔒
The options of a fit or check, refused when they are not what the search can use: an axis other than x, y or both would skip every scroller and call a pane clean; a max that is not a number from the pane floor up would be searched as NaN or refused as “too narrow”; a min_text_px that is not above zero would pass any text.
fit_request 🔒
fit_options, then the panes a fit or check names (panes_asked).
handle_zoom 🔒
names_one_pane 🔒
Whether a get, set or reset selects the one pane in block: a get of the window (scope: "window"), a set or reset of the chrome or of all panes name more than a pane, so a browser block beside them does not take the call over.
panes_asked 🔒
The panes a fit or check names: blocks (a list), or block (one pane, or “all” for every pane of the tab, which is none named). None means every pane of the tab.
refuse 🔒
A refusal: HTTP 200 with the spec’s {ok:false, error, message} shape, so the agent reads it as an answer.
run_in_tab 🔒
An action on the panes of scope.own_tab, as scope.agent.
send_to_window 🔒
Counts a write against the caller’s limit, then has the window that holds the scope’s pane do op.
stack_of 🔒
Every tab of the pane that holds block_id (a stack), block_id first; just block_id when its layout does not say.
tab_panes 🔒
The panes on screen with tab own_tab: its own, and the window’s pinned pane when that is a pane of another tab (it is drawn over this one), with every tab of its stack. Returns the tab’s id too.
take_write 🔒
Counts a write by agent at now; over the limit it says in how many milliseconds one is free again.
text 🔒