Repository navigation
layout: place-split-adaptive - #949
Conversation
`layout.place.split` splits a place along `core.placement.orient` of its drawn size (stacked when tall, side by side when wide), the new half trailing, and marks the split adaptive. `layout.place.adaptive` toggles whether the split a place is one half of follows its room: only splits made at runtime (the forest's, or a seed tree's made by `splitDock`), never one the shape declared or one sized by `fit`/`fixed`. On keeps the drawn size as the share; off keeps the drawn direction, and a turn under way settles (`Region.settleTurn`), as does a split rebuilt from a saved arrangement. Both are in the place menu and the palette; the phone's top strip has a split button that runs `layout.place.split`. Part of fizzyedit/work#543 Agent-Team: linux Worker: claude Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PM note: how this PR will be handledWhat it is for: layout: place-split-adaptive Rules that apply: none special. Things to watch (checked by rule):
What happens next:
A living status comment below is kept current. Nothing here is a merge decision. |
Where this PR standsStage: Author's turn What the PM needs before approving (ticks as it is met; the full CI runs only at the end, after the reviews are clean):
Reviews at the current commit (
Updated 2026-10-28 07:08 UTC by the PM. This comment is edited in place. |
Part of fizzyedit/work#543 Agent-Team: linux Worker: claude Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Part of fizzyedit/work#543 Agent-Team: linux Worker: claude Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Part of fizzyedit/work#543
Goal
The two placement commands the layout-placement design note asks for (work#543, item 4 of
work#312):
layout.place.split, which makes two groups the way the room asks, andlayout.place.adaptive, which makes a person's split follow its room or stop. Both are in theplace menu and the palette, and the phone has a button for the split.
What changed and why
layout.place.split("Place: Split"): splits the place alongcore.placement.orient(null, w, h)of its drawn size (bottom when tall, right when wide), then
markAdaptiveon the new half(
Layout.splitAdaptive). No size floor beyond the layout's own, because the person asked.layout.place.adaptive("Place: Split Follows the Room"): toggles the split the place is onehalf of (
Layout.setAdaptive).State.adaptiveOfdecides which splits may toggle. A forestsplit may, and so may a seed-tree split made at runtime (a place on one side was minted from
a place on the other). A split the shape declared may not, and neither may a
fitorfixedone (Architect must-fix 1). On keeps the drawn size: the forest's share is taken again from
the current extent, and the dock already sizes by
ratio. Off keeps the drawn direction: aturned forest branch takes the turn into its
sideand extent, and the dock'sdirbecomesaxis().Region.settleTurn(Architect must-fix 2): a branch that stops being adaptive is flaggedsettle, and the nextorientBranchdrops what a turn left behind (_turned,_fold,_share,_set,_seenon the branch,_turned/_foldon the leaf). Without that, theplace stayed shut, or never saved a drag again.
loadRuntimeSplitsflags each split itrebuilds, so a demo putting an arrangement back drops a turn from the split it replaces.
region.menu.split:<place>andregion.menu.adaptive:<place>(docs/AUTOMATION.md).layout_mobile.zig's top strip (fizzy.mobile.split) runslayout.place.spliton Main. It has aTODO(seam)naming plans#60's strip gesture and plans#109D11's split header.
How it was verified
New tests:
State: seed splits refuse (one withfixed, one plain), runtime dock splits toggle,including nested ones.
SplitTree:halfOf, and a turned-then-unmarked branch saves its new side, not adaptive.Main/b1) and puts a wide one side by side (Main/r1),adaptive, with even halves.
it stays stacked at the same size, and a later drag is saved.
is a split; clicking the toggle turns it on and the menu stays open.
fizzy.mobile.splitat 390x844 makes an adaptiveMain/b1.settleTurnturned off (300 vs 390: the drag is not saved;0 vs 585: the place stays shut).
phone button. The integration test that taps it is the evidence.
Not done / follow-ups
layout.place.split(the
TODO(seam)). The note amendment the Architect listed (Who asks it, item 2: the ON/OFFrules, runtime-made splits only) is the PM's to commit.
Changes (12 files, +490/-49)
Gates: 6 of 6 passed
scripts/check-fmt.sh(exit 0)scripts/zb build --summary all(exit 0)scripts/zb build test --summary all(exit 0)scripts/zb build test-integration --summary all(exit 0)scripts/zb build check-web --summary all(exit 0)scripts/zb build test-sdk-version --summary all(exit 0)