Skip to main content

Module pane

Module pane 

Source

Structs§

OpenAt 🔒
Where in the file pane.open asks to land: a text line, a hex byte offset, a PDF page. Each is read by its own viewer and ignored by the others; a line or page of 0 counts as absent.

Constants§

META_FOLLOW_FOLDER 🔒
Block-meta key: the Editor’s initial file opens following newer files in its folder (an image or video tab). An entry of editor:pending_open_files says the same per file, as {"path": ..., "follow_folder": true}.
META_OFFSET 🔒
Block-meta keys: where a new Editor pane’s initial file opens, once: the hex viewer’s byte offset and the PDF viewer’s page (editor:line, the text viewer’s, is open-at-line.ts’s). An entry of editor:pending_open_files says the same per file, as {"path": ..., "line": ..., "offset": ..., "page": ...}.
META_PAGE 🔒
META_PENDING_OPEN_FILES 🔒
Block-meta key carrying an ARRAY of files the reused pane should open — the sole delivery path (see below for why an earlier version’s second, “live MPS event” path was removed). Drained (all entries, in order) reactively by EditorViewModel’s createEffect over its own block meta, then cleared immediately after — covers both “not yet mounted when this was written” and “already mounted, reacts as soon as the write lands” uniformly through the same MuxObj sync path the pane already depends on for everything else.
META_VIEWER 🔒
Block-meta key: the viewer the Editor’s initial file opens in (pane.open’s viewer, so muxsh edit shows any file as text). An entry of editor:pending_open_files says the same per file, as {"path": ..., "viewer": "text"}.
VIEWERS 🔒
The viewers the Editor opens a file in (frontend VIEWER_IDS).

Functions§

add_connection 🔒
The connection the pane works on, for the views that have one; media reads this computer’s files only.
add_title 🔒
The title the opener gave the pane. A browser pane also records the address it was opened at, so it keeps the title only while it stays on that site (frontend/app/view/browser/given-title.ts).
announce_floater 🔒
Tell the source window to open the floater. For an agent’s open the event carries what it asked for, and the open waits for the window to say where the pane went (placed), or says queued when it does not answer in time.
build_pane_meta 🔒
Build the metadata map for a pane.open request, validating required args.
close_pane_as 🔒
Close the tab target_block_id on behalf of caller_agent_id: it waits 30 s for its user to keep it (§6.5) and answers 202 with the pending request, which names the tab and says whether the pane closes with it (pane_closes: it was the pane’s last tab). The pane’s other tabs stay. That includes a tab the caller is in: closing it ends the caller (which only QuitSelf may do without the user’s window). Audited as pane.close. Shared by ClosePane and RunCommand’s pane:close (server/ui_shortcuts.rs), so both carry the same protection. via names the tool in the pending request and the audit.
closes_its_pane 🔒
Whether closing target takes its pane with it (nothing else is left in it); None when there is no such block.
create_floater_block 🔒
Create the block through the reducer (NOT wcore-direct) so it lands in state.blocks — the tear_off_block saga’s pre-condition checks the reducer-canonical block map. The BlockCreated event also carries the meta, which persist_subscriber::apply_block_created writes into the mstore Block so the editor renders with its file + tree state. We skip layout placement, so the block never renders docked before the saga moves it into the floating workspace (no flash).
editor_meta 🔒
The Editor: the file, then what only an explicit caller value writes. Tree state: without one the Editor decides (collapsed for a pane opened on a file, which this always is).
files_meta 🔒
The Files pane. The folder comes from file, else cwd, else home; select becomes a one-shot files:select the view applies after its first listing and then clears. SPEC_FILE_BROWSER_PANE_2026_10_01.md §6.2, §8.1.
floaters_under_the_cap 🔒
An agent has at most MAX_FLOATERS floating panes open: checked before anything is made. Returns the ones it has open now.
handle_close_pane 🔒
handle_quit_self 🔒
POST /api/v1/agent/pane/close — backs the ClosePane MCP tool. See docs/specs/SPEC_AGENT_PANE_LIFECYCLE_CONTROL_2026_09_10.md.
handle_shutdown_status 🔒
GET /api/v1/agent/shutdown/{request_id} — where a shutdown waiting on the user’s override stands (§6.5): pending, kept_by_user, proceeding, shut_down, superseded or failed.
maybe_reuse_editor_pane 🔒
If the calling agent (identified by its own block id, caller_block_id) already has an Editor pane open in its own tab, push file into that pane as a new tab instead of creating another Editor pane. Returns Ok(None) when there’s no existing Editor pane to reuse (or the caller’s tab can’t be resolved) — the normal create-new-block path handles that case unchanged.
open_checked 🔒
open_pane, once what it opens is settled.
open_pane
Core pane.open logic, shared by the WebSocket RPC handler (register_pane_open) and the HTTP route POST /api/v1/pane/open (agentmux-mcp’s OpenEditor tool). Creates a block for the requested view, enqueues a layout action (split or insert), and broadcasts the block/tab/layout updates so the frontend renders the new pane.
open_pane_floating 🔒
Floating-pane branch of open_pane. The block already exists in source_tab_id’s blockids (created by the caller, with no layout node). This moves it into a fresh floating workspace via the tear_off_block saga, sets up the new tab’s layout, broadcasts the new MuxObjs, and asks the source window’s frontend to materialize the chromeless floating OS window via the host open_floating_pane_window command (srv cannot open windows itself). See docs/specs/SPEC_OPENEDITOR_FLOATING_AND_COLLAPSED_TREE_2026_06_16.md.
pending_body 🔒
The 202 answer for a shutdown waiting on the user (§6.5).
pending_open_entry 🔒
An editor:pending_open_files entry: the path, or {path, ...} with how it opens.
quit_self 🔒
An agent ending its own session — QuitSelf, or ClosePane with no arguments (§7), which has no quote and so always asks the user. A user-started, untainted turn with the user’s quote quits when the turn ends; anything else waits 15 s for the user to keep it (§6.5).
register
register_pane_float_placed 🔒
pane.floatplaced: the window an agent’s floating open went to says where it put the pane, which the open is waiting for (floater_place).
register_pane_move_tab 🔒
SPEC_PANE_TAB_DRAG_AND_DROP_2026_09_19.md §4.1, Phase 3.
register_pane_move_tabs 🔒
SPEC_PANE_TAB_MULTI_SELECT_MOVE_AND_COLLAPSED_EXPAND_2026_10_24.md §5.
register_pane_open 🔒
register_pane_tab_edits 🔒
SPEC_PANE_TABS_REDUCER_COMMANDS_2026_09_18.md §3.3: a tab switch and a tab close, as reducer commands the frontend sends beside its own local edit.
requested_viewer 🔒
pane.open’s viewer, checked against the Editor’s viewers.
required_file 🔒
The file an editor or media pane opens, refused when the request names none.
resolve_placement 🔒
Translate split_direction + split_reference_block_id into a placement: a split of the reference block’s pane, or the first free slot when either is missing. A direction ending in :half (down:half) gives the new pane exactly half of the reference pane’s space; without it the new pane takes the layout’s default size.
tear_off_into_floater 🔒
Tear the block off into a fresh floating workspace + tab (reuses the exact saga the drag tear-off uses: CreateWorkspace → CreateTab → MoveBlock). Returns the new workspace’s and tab’s ids.