0017. Future layout engine is a fresh module; layout-feature branch is reference only
Status: Accepted (2026-11-27)
Context
Branch layout-feature (8f63823) holds a WIP flex/grid engine wired into the old Scene. It is deprecated and frozen; it will not be merged.
Decision
- Layout returns later as
packages/layout, depending only on shared + doc, running identically on web, server and MCP.
- Layout inputs are props in the reserved range 64-127 (one prop per style field, types chosen by the layout ADR). Already representable on the wire today.
- Layout results are derived on every peer, not synced (deterministic solver + shared text metrics, ADR 0014), so a parent change does not emit an op per child. The doc keeps authored x/y for absolutely positioned children only.
- Ideas worth reusing from the branch: SoA layout tables with relayout boundaries, allocation-free solvers, the DOM differential test harness.
Consequences
Until then, frames are free containers. No code may depend on the deprecated branch.