Skip to main content

Module layout_types

Module layout_types 

Source
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§

LayoutClientSlices
SPEC_864 Phase 2 — the frontend-owned LayoutState slices carried by a full-row-replace push (the UpdateObject→LayoutSetTree route). The reducer applies focused_node_id/magnified_node_id to its TabRecord; leaforder and pending_backend_actions are opaque pass-through JSON the persist subscriber writes verbatim (no algebra re-run in the subscriber — that would be a new divergence surface).
LayoutNode
One node in the layout tree. Stable UUID-keyed; size is a relative flex unit; children form the recursive structure (empty for leaves).
LayoutNodeData
Leaf-only payload — references the block this layout leaf renders. Group nodes (those with children) carry no data.
ResizeOp
A single resize operation: target node + new flex size (0–100 relative units).

Enums§

FlexDirection
Direction children flow within a layout node (row = horizontal split, column = vertical split). Defaults to Row when absent in JSON for tolerance of older blobs.
SplitPosition
Position for split commands: where to insert the new node relative to the target.
StackMovePosition
Position for LayoutStackMove: where block_id lands relative to target_block_id in the destination leaf’s stack (or its own leaf’s stack, for a same-leaf reorder). End ignores target_block_id’s own position and appends after every existing member — target_block_id is still used to locate which leaf. SPEC_PANE_TAB_DRAG_AND_DROP_2026_09_19.md §4.1.