Expand description
Shared layout tree types used in both the srv wire protocol (ipc.rs Command/Event variants) and the srv object store (obj.rs LayoutState).
Living in agentmux-common so agentmux-srv, agentmux-cef, and agentmux- launcher can all reference the same type definitions without circular dependencies or duplication.
Part of srv Phase E.4.B (Phase 3 — wire types). See docs/specs/srv-phase-e4b-formal-spec-2026-05-03.md §4.1, §5, §6.
Structs§
- Layout
Client Slices - SPEC_864 Phase 2 — the frontend-owned
LayoutStateslices carried by a full-row-replace push (theUpdateObject→LayoutSetTreeroute). The reducer appliesfocused_node_id/magnified_node_idto itsTabRecord;leaforderandpending_backend_actionsare opaque pass-through JSON the persist subscriber writes verbatim (no algebra re-run in the subscriber — that would be a new divergence surface). - Layout
Node - One node in the layout tree. Stable UUID-keyed;
sizeis a relative flex unit;childrenform the recursive structure (empty for leaves). - Layout
Node Data - Leaf-only payload — references the block this layout leaf renders.
Group nodes (those with
children) carry nodata. - Resize
Op - A single resize operation: target node + new flex size (0–100 relative units).
Enums§
- Flex
Direction - Direction children flow within a layout node (row = horizontal split,
column = vertical split). Defaults to
Rowwhen absent in JSON for tolerance of older blobs. - Split
Position - Position for split commands: where to insert the new node relative to the target.
- Stack
Move Position - Position for
LayoutStackMove: whereblock_idlands relative totarget_block_idin the destination leaf’s stack (or its own leaf’s stack, for a same-leaf reorder).Endignorestarget_block_id’s own position and appends after every existing member —target_block_idis still used to locate which leaf. SPEC_PANE_TAB_DRAG_AND_DROP_2026_09_19.md §4.1.