Expand description
window service handler — CreateWindow. Split out of window.rs;
see that file’s dispatcher for the full method list.
Modules§
- steps 🔒
- The steps of
CreateWindow, in the order the handler runs them. A step that can refuse the call answersErrwith the reply that ends it.
Constants§
- JUST_
RESTORED_ 🔒MS - An opener arriving this soon after a restore, beside another window still opening, opens the default panes at once: the window it would wait for is the one just restored, not one closing.
- RESTORED_
AT_ 🔒META_ KEY - When a window last asked for and got a restore (epoch ms, client meta).
- RESTORE_
WAITS_ 🔒FOR_ CLOSE - How long a restore asks for waits for a window close still on its way.
Statics§
- RESTORE_
ELECTION 🔒 - Windows asking to restore decide one at a time, so exactly one restores when several open together (a double click on the tray icon) (#5363).
Functions§
- create_
default_ 🔒contents - A new window’s contents: a workspace with one tab seeded with the default
panes (agent | sysinfo / swarm), or with the single
seed_viewpane a widget’s “Open in New Window” asks for. No window shows it yet. Also what a new user workspace’s first window opens (user_workspace_switch).offer_other_build: a cold start with nothing to restore, which may offer a layout another build saved. Returns the workspace and the applied events, unpublished. - create_
tab 🔒 - Step 2: the workspace’s tab, and the events that made it. When the tab can’t be made, the empty workspace is deleted again.
- create_
workspace 🔒 - Step 1: the new workspace’s id and the events that made it.
- created_
window_ 🔒reply - The reply for a window that was made. Every window has a slot in the panel’s list from the day it is made: the next one, at the end.
- first_
error 🔒 - The message of the first error among
events, if any. - handle_
create_ 🔒window - persist 🔒
- Writes
eventsthrough to the store, stopping at the first failure. - seed_
blocks 🔒 - Dispatches the seed block(s) through the reducer: the
seed_viewalone (withseed_metawhen given), or the default agent, swarm and sysinfo. For the default 3-pane case, order is the onedefault_three_pane_treeexpects positionally (agent, swarm, sysinfo) — NOT top-to-bottom display order, since sysinfo renders above swarm. Returns the ids made and their events; a block that can’t be made ends the seeding (the tab opens with what there is). - seed_
layout 🔒 - Writes the layout for the seeded panes: a single leaf for a widget’s “Open in New Window” (see
single_leaf_tree), the shared three-pane tree for the default. A cold start with nothing of its own to restore (offer_other_build) also notes what it seeded, for a layout another build saved to be offered. A seeding that came out short leaves the tab blank.