Expand description
The Pane Tab edit commands (pane.moveTab, pane.moveTabs, pane.activateTab, pane.removeTab):
resolve the block’s tab, dispatch the reducer command, publish, and queue the matching layout action for
other views. Split out of pane.rs, which open_pane and the other pane commands fill.
Functions§
- activate_
tab 🔒 pane.activateTab: makeblock_idits pane’s visible tab (Command::LayoutStackActivate), then queue astackactivateunder the caller’s action id for any other view of the tab.- apply_
pane_ 🔒tab_ command - Resolve
block_id’s tab, then dispatchcmd→ mstore → publish, the shape every pane-tab RPC shares. Returns the tab and whether the reducer changed anything. - edit_
result 🔒 - What a pane-tab RPC answers: the row’s version once the change is stored. A failed queue is logged, not returned: the tree change already happened.
- move_
tab 🔒 - Core
pane.moveTablogic — reordercmd.block_idwithin its own pane, or move it into a different pane (Command::LayoutStackMove). Queues astackmovelayout action so any OTHER window/tab viewing the samedb_layoutsees the change (mirrorsstack_onto_block_id’sstackpushqueue above); the calling frontend applies its own optimistic local edit directly and skips the queued copy by itsaction_id. SPEC_PANE_TAB_DRAG_AND_DROP_2026_09_19.md §4.1, Phase 3. - move_
tabs 🔒 - Core
pane.moveTabslogic: several tabs into one pane in one reducer edit (Command::LayoutStackMoveMany), then one queuedstackmoveper block (and astackactivatewhen the visible tab is a member that did not move) so any OTHER window viewing the layout follows. The calling frontend has already made the same edit and skips every queued copy by its baseaction_id. SPEC_PANE_TAB_MULTI_SELECT_MOVE_AND_COLLAPSED_EXPAND_2026_10_24.md §5. - remove_
tab 🔒 pane.removeTab: takeblock_idout of its pane — that one tab of a stack, or the pane with its last tab (Command::LayoutDeleteNodeByBlock) — then queue thedeleteunder the caller’s action id. The block itself is closed byClosePane, which the caller sends next. A block in no pane is a no-op: nothing is queued and the revision is 0.