Expand description
Layout-tree + pending-action writers used by the tear-off / promote /
redock handlers. SPEC_864 Phase 3/4 โ all of them route through the
reducer (seed_layout_via_reducer / queue_layout_actions_via_reducer);
nothing here writes mstore directly anymore.
setup_torn_off_block_layout is re-exported crate-wide (the pane
app-API uses it).
Functionsยง
- action_
id_ ๐or_ new - The id a frontend minted for its own command, so that frontend skips the
queued copy (
processedActionIds, layoutPersistence.ts); a fresh one when it sent none or an unusable one. - order_
stack ๐ - The stack as the caller gave it (
tear_off_ordermoves the visible block first, but the paneโs tab order is the order ofmembers). - queue_
source_ ๐layout_ delete - Take a block that moved (tear-off, promote, redock) or was deleted
(
sagas::delete_block,sagas::close_pane) out of its source tabโs layout: srvโs tree, then a queueddeleteso a window that already shows the tab drops it too (a window that missed it would show a pane whose block is gone;INVESTIGATION_LAYOUT_DEAD_SPACE_STALE_TREE_RESURRECTION_2026_07_08.md). - queue_
stack_ ๐activate - Tell the frontend that
block_idbecame the visible tab of its pane (Command::LayoutStackActivate). MatchesLayoutTreeActionType.StackActivate = "stackactivate". - queue_
stack_ ๐remove - Tell the frontend that
block_idleft its pane (one tab of a stack, or the pane with its last tab): thedeleteaction, under the callerโs id. - queue_
target_ ๐layout_ insert - Place a block (re-docked, re-placed by the orphan reaper) at the first
free slot of its tab: srvโs tree first, then the queued
insertfor the window showing the tab (layout_intents::place_block). - queue_
target_ ๐layout_ split - Phase 4b/4c โ place a redocked block in the exact slot the ghost
overlay previewed: a split of the pane holding
target_block_id. - queue_
target_ ๐stack_ move - Tell the frontend that
block_idwas moved โ already, in the reducer โ topositionrelative totarget_block_id(Command::LayoutStackMove): a same-pane reorder when both are already in one leafโs stack, otherwise a cross-pane move. MatchesLayoutTreeActionType.StackMove = "stackmove"infrontend/layout/lib/types.ts.positionis the same"before"/"after"/"end"stringpane.moveTabโs caller supplied โ reused verbatim, not re-derived, so the frontend applies the identical operation rather than inferring it from resulting tree state.activaterides onLayoutActionData.focusedโ the same fieldqueue_target_stack_pushabove already overloads for this purpose (both carry the callerโsactivatevalue: a new tab and a reorder may or may not be shown). SPEC_PANE_TAB_DRAG_AND_DROP_2026_09_19.md ยง4.1, Phase 3. - queue_
target_ ๐stack_ moves - Tell the frontend that several blocks were moved โ already, in the
reducer โ to the end of
target_block_idโs pane (Command::LayoutStackMoveMany): onestackmoveper block, in order, the visible tabโs (when it is one of them) carryingfocused; and astackactivatewhen the visible tab is a member of that pane that was not moved. The ids are<action_id>:<index>, which the calling frontend registered as its own. SPEC_PANE_TAB_MULTI_SELECT_MOVE_AND_COLLAPSED_EXPAND_2026_10_24.md ยง5. - queue_
target_ ๐stack_ push - Tell the frontend that
block_idwas added โ already, in the reducer โ as a tab of the pane holdingtarget_block_id, the visible one whenactivate(Command::CreateBlockInStack). MatchesLayoutTreeActionType.StackPush = "stackpush"infrontend/layout/lib/types.ts. SPEC_PANE_TABS_REDUCER_COMMANDS_2026_09_18.md ยง3.3. - setup_
torn_ ๐off_ block_ layout - Phase E.5.5 โ set up the layout tree for a tab that just received
its first block via the TearOffBlock saga. Called from the
TearOffBlock / PromoteBlockToTab handlers and the floating
pane.openpath after the sagaโs reducer-state portion (CreateTab + MoveBlock) completes. (NOT RedockFloatingPane โ that redocks into an EXISTING tab and goes throughqueue_target_layout_insert/_splitinstead; reagent P2 on #1971.) - setup_
torn_ ๐off_ stack_ layout setup_torn_off_block_layoutfor a whole pane torn off with its tabs: the one leaf holdsmembersas itsblock_stack(in order), withblock_idthe visible one. Fewer than two members seed a plain leaf.- source_
delete_ ๐action - The frontend
deleteaction for one block: its handler removes just that stack member (the leaf goes with the last one) and never runscloseNode.