The handoff had grown a chronicle of what each commit renamed. What is durable about it -- the three names, and the one argument a container uses to say them -- is design, so it goes to `docs/LAYOUT.md` as its own section and the handoff keeps a pointer plus where the branch stands. `docs/PLAN.md`'s "frame/extent experiment" entry described a prototype in retired words; it becomes a pointer, and the one finding it held that was not recorded elsewhere -- why the extent-relative child-frame trial was removed -- joins the failed hypotheses in `docs/LAYOUT.md`.
4.4 KiB
Handoff
Where the work in flight stands. The settled layout design, the vocabulary
and the measurement method are in docs/LAYOUT.md; what the review of #19
found is in docs/LAYOUT_LOG.md.
The Iris layout repair is submitted
Iris PR #19 (layout/one-ask) replaces closed #18. The tip is 58ce74d,
and past the reviewed cadfba0 it is two rounds:
- The repair.
add6774fixes collapsed-share placement, retained mask ownership and a redraw-on-reparent defect;84dad21removes repeated work in the test harness. - The vocabulary and the container API,
5642f20through58ce74d. What they settled is described as design indocs/LAYOUT.mdunder "Three names, and the one argument that says them" -- region, placement and rel_base, and the singleimpl Into<PlaceDesc>argument that replacedPlace,Part,widget_withinand the separate rel-base argument. Bryan is still refining this, so treat the API as current rather than frozen.
The core design remains sound. Round-to-nearest is still unchanged.
Two checkouts share one Git storage: /home/bob/repos/iris is the active
layout/one-ask worktree, and ai-app-2/iris stays on main at the app's
32f6ad8 pin until the integration below is ready.
How each round was checked
Format, workspace clippy under -D warnings with and without
layout-diagnostics, the workspace tests both ways, and the three prescribed
seed scans -- 400 at depth 5, 1,000 at depth 6, 2,000 at depth 4.
The gate that matters for anything shaped like a rename or a refactor is the
cold dump: layout_dump over 400 depth-5 trees is 34,492 boxes, and the
compiler cannot catch two same-typed values being swapped. The repair moved
650 of those boxes, all from the collapsed-share correction. Every commit
since has been byte-identical to 84dad21, including the whole API rewrite.
What is next, in order
- Bryan's review of #19. Fixes are themselves unreviewed code: repeat
pre-submit-reviewover each round's changes, and re-run the three fuzzers and the dump diff for edits toSpan,Painter, orrender_state. The ordinary oracle does not replace absolute geometry and retained-primitive expectations. - Integrate the app's Iris capabilities before changing its pin.
32f6ad8has 45 commits not reachable from the review branch; shared UI ownership, richer masks, Android support, and app-side performance work must survive the integration. The app then absorbs the branch's vocabulary and container API, all of it already upstream:rest->leftover,SizeRulebeside widgets, alignment properties, the removal ofOrthoSize, region/placement/rel_base, andPlaceDesc. - Round-to-nearest, CPU and shader together as one verified change.
Bryan approved it on 2026-09-17 and neither half has landed; the
derivation, the form to use and what to re-check are in
docs/LAYOUT.mdunder "Rendering the grid (pending)".
Wanted but not started, recorded in iris/TODO: transforms on a move entry,
so a whole subtree scales or rotates with one buffer write and no redraw.
Compose-style stretch at the end of a scroll area is the use that prompted
it. A move entry only translates today, and composing through one scales the
rel part while px passes through untouched, so fixed-size content and
glyphs do not follow a shortened entry.
Smaller layout items, none urgent
- Nested spans pass
leftoverweight up, so three leftover children in one inner span beside one in another get three quarters to one quarter. No other layout system does that; confirm it is wanted. - A span can overflow itself without bound, so boxes of negative length reach children and nothing states what a widget may assume about one.
Fixed::divby zero answersMIN/MAXwhileratioanswersZERO; both are caller bugs underdebug_assert, but the fallbacks differ.docs/LAYOUT.md§4, §5 and the density section namePainter::place,Painter::region(),SetSize,desired_width,apply_rest,Len::dp,AlignedandMaxSize, none of which exist. Do not restoreOnResize::TranslateorOrthoSize.LazySpan, thenSizeRule::{Min, Max, Clamp}. A cap may not containleftover; whetherMaxnarrows the child's drawing box is a product decision.Scrolltaking a direction rather than one axis.
Other product work is in docs/PLAN.md and the focused documents it links.
Do not mix it into the Iris layout branch.