Files
ai-app/docs/HANDOFF.md
T
iris-ai 90400f50ac Record the region/placement sweep and prune the handoff
The `extent` rename landed as iris `5642f20`; the handoff had not listed it
as pending at all, and its item 2 named renames that are already upstream.
Say which vocabulary the app has still to absorb, drop the retired-clone
and archive chronicle, and strike the three clarity findings now done.
2026-09-19 14:51:07 -04:00

4.3 KiB

Handoff

Where the work in flight stands. The durable layout design 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 5642f20: add6774 fixes collapsed-share placement, retained mask ownership and a redraw-on-reparent defect, 84dad21 removes repeated work in the test harness, and 5642f20 is the naming sweep below. 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; ai-app-2/iris stays on main at the app's 32f6ad8 pin, and is kept until the app's integration is ready.

Each round was checked with format, workspace clippy under -D warnings, the workspace tests with and without layout-diagnostics, the release fast oracle, and the three prescribed seed scans — 400 at depth 5, 1,000 at depth 6, 2,000 at depth 4. The cold dump covers 34,488 boxes: the fixes moved 650 of them, all from the collapsed-share correction, and the naming sweep moved none.

The naming sweep is done

5642f20 finished the rename decided on 2026-09-17, which frame's return as a length had left half-applied. The box a parent asks a widget in is the region, and where its drawing ends up is its placement:

  • Painter::extentregion, and its extent_len()region_len().
  • ActiveData::{part, extent}{region, placement}, and with them DrawInfo::part and Placing::extent.
  • LayoutHolds::{extent, extent_len}{region, region_len}, and Counter::OutsideExtentOutsideRegion.
  • placed_extentplacement, frame_and_extentframe_and_region, part_ofregion_of.
  • Painter's window_own, extent_own, frame_own_len and extent_len become the one own: LayoutHolds they were assembled into.

What is next, in order

  1. Bryan's review of #19. Fixes are themselves unreviewed code: repeat pre-submit-review over each round's changes, and re-run the three fuzzers and dump diff for edits to Span, Painter, or render_state. The ordinary oracle does not replace absolute geometry and retained-primitive expectations.
  2. Integrate the app's Iris capabilities before changing its pin. 32f6ad8 has 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, all of it already upstream: restleftover, SizeRule beside widgets, alignment properties, the removal of OrthoSize, and the region/placement names above.
  3. 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.md under "Rendering the grid (pending)".

Smaller layout items, none urgent

  • Nested spans pass leftover weight 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::div by zero answers MIN/MAX while ratio answers ZERO; both are caller bugs under debug_assert, but the fallbacks differ.
  • The comment on the local == UiRegion::FULL shortcut in widget_at says composing through FULL "is not quite the identity in f32"; on the grid it is exact and the shortcut is performance only.
  • docs/LAYOUT.md §4, §5 and the density section name Painter::place, Painter::region(), SetSize, desired_width, apply_rest, Len::dp, Aligned and MaxSize, none of which exist. Do not restore OnResize::Translate or OrthoSize.
  • LazySpan, then SizeRule::{Min, Max, Clamp}. A cap may not contain leftover; whether Max narrows the child's drawing box is a product decision.
  • Scroll taking 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.