Skip to main content

Module pane_openers

Module pane_openers 

Source
Expand description

Which agent opened which pane, for every pane an agent opens (docs/specs/SPEC_AGENT_PANE_PLACEMENT_FLOATING_2026_11_22.md §2.4).

An agent places, resizes, moves, floats and docks only a pane it opened. The authority is this map, written by the routes agents open through after they check the caller’s signed identity. It has the properties browser_owner has for a browser pane:

  • nothing a client writes into a block’s meta enters it, since only srv’s routes call record;
  • a duplicated pane is a new block with a new id, which the map does not know;
  • deleting the block drops its entry (browser_pane_gone), and so does the person’s Take over of a browser pane (browser_owner::forget_because);
  • after an srv restart the map is filled again from a file in the config folder, for the panes whose block is still there; the file alone grants nothing for a block that is gone.

A browser pane is in both maps: browser_owner decides who may drive it, this decides who may place it.

Structs§

Entry 🔒
Records 🔒
Session 🔒
A background browser session: its pane, the agent that holds it and the agent’s own pane it was opened from.

Constants§

FILE_NAME 🔒
The file the map is kept in, in the config folder.

Functions§

all_background 🔒
Every background session, whoever opened it.
background_by_block 🔒
The background sessions of each agent pane that opened one: the pane, and its sessions sorted.
background_of 🔒
The background sessions agent has open, sorted.
background_sessions 🔒
Every background session, sorted by pane.
clear_background 🔒
A background session shown: it is a floating pane like any other from now on.
docked_of 🔒
The docked panes agent opened, the newest first: where its next open goes by default (app_api::agent_tab_default).
floaters_of 🔒
The panes agent opened that are floating windows now, sorted.
forget 🔒
Drop block_id’s opener: the pane was deleted, or the person took it over.
is_background 🔒
Whether block_id is a background session.
is_floating 🔒
Whether block_id is a floating window an agent opened (a pane docked later is not).
lock 🔒
map 🔒
note_docked 🔒
A docked pane an agent made is the agent’s to place later; a floating one was recorded as it was made.
opened_by 🔒
Whether agent opened block_id (agent ids compare without case).
opened_by_agent 🔒
Every pane agent opened, sorted: the block, whether it is a floating window, whether it is a background session.
opener_of 🔒
The agent that opened block_id, if one did.
path 🔒
record 🔒
Record agent as the opener of block_id; floating says it opened as a floating window.
record_background 🔒
Record agent as the opener of block_id, a background browser session.
record_floating 🔒
Record agent as the opener of block_id, a floating window: a background session when background, opened from the agent’s pane from (where the person is told of it).
restore 🔒
Read the file and put back what is still true. Called once at startup, before anything can change the map, so the first save does not replace the file with an empty copy.
save 🔒
Write the map to the file, unless it is what the last write left there.
set_background 🔒
A pane the person sees put back in the background: it is a background session again, held by the agent pane from (where the person is told of it), which is kept if the pane was opened as a session from another.
set_floating 🔒
Note whether block_id is a floating window now (a pane docked or floated later keeps its opener).
stamp 🔒
The time to put on a record: Unix milliseconds, and never the same or lower than the one before, so records made in the same millisecond still have an order.
still_true 🔒
The part of saved that is still true: the panes whose block is still there. block_of reads a block by id.