From 90400f50acbfa2d086f95a548a2b1cd246df8249 Mon Sep 17 00:00:00 2001 From: iris-ai <4+iris-ai@noreply.localhost> Date: Sat, 19 Sep 2026 14:51:07 -0400 Subject: [PATCH] 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. --- docs/HANDOFF.md | 65 +++++++++++++++++++++++++--------------------- docs/LAYOUT.md | 2 +- docs/LAYOUT_LOG.md | 16 +++--------- 3 files changed, 41 insertions(+), 42 deletions(-) diff --git a/docs/HANDOFF.md b/docs/HANDOFF.md index 1e62aca..9add035 100644 --- a/docs/HANDOFF.md +++ b/docs/HANDOFF.md @@ -6,33 +6,38 @@ in `docs/LAYOUT_LOG.md`. ## The Iris layout repair is submitted -**Iris PR #19** (`layout/one-ask`) replaces closed #18. The current tip is -`84dad21`: `add6774` fixes collapsed-share placement, retained mask ownership, -and a redraw-on-reparent defect; `84dad21` removes repeated work in the test -harness. `docs/LAYOUT_LOG.md` records the review and its regression coverage. -The core design remains sound; naming and round-to-nearest are unchanged. +**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. -There is one Iris Git repository, stored with this checkout's submodule: +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. -- `/home/bob/repos/iris` is the active `layout/one-ask` worktree. -- `/home/bob/repos/ai-app-2/iris` stays on `main` at the app's `32f6ad8` pin. - It shares Git storage with the active worktree, rather than being a second - development repository. Keep it until the app's integration is ready. -- The standalone `iris-layout-experiment` clone is retired. Superseded fork - branches are removed; unique experiment tips and the #18 measurement - baseline are preserved under `archive/2026-09-19/` tags. A complete bundle - is also under `~/.local/state/iris/archive/`. +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. -Verification of the fixes: format and workspace clippy with `-D warnings`, -workspace tests with and without `layout-diagnostics` (128 suite tests, -20 core tests, 21 with diagnostics, and 11 generated tests), and the release fast oracle pass. -The 400-seed depth-5 shrinker, 1,000-seed depth-6 run, and 2,000-seed -breadth scan all pass. The cold dump covers 34,488 boxes; 650 change because -of the collapsed-share correction. With only that correction withheld, -the remaining fixes reproduce the baseline dump exactly. -The headless `tabs` example and the exact collapsed-share repro were rendered -and inspected; the latter places the blue tail at x=220..400. The machine's -Vulkan device is the RX 7900 XT through RADV native context. +## 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::extent` → `region`, 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::OutsideExtent` → `OutsideRegion`. +- `placed_extent` → `placement`, `frame_and_extent` → `frame_and_region`, + `part_of` → `region_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 @@ -44,8 +49,10 @@ Vulkan device is the RX 7900 XT through RADV native context. 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. Then migrate `SizeRule` beside widgets, - alignment properties, `rest` to `leftover`, and removal of `OrthoSize`. + must survive the integration. The app then absorbs the branch's + vocabulary, all of it already upstream: `rest` → `leftover`, `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` @@ -64,9 +71,9 @@ Vulkan device is the RX 7900 XT through RADV native context. 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`, - `SetSize`, `desired_width`, `apply_rest`, `Len::dp`, `Aligned` and - `MaxSize`, none of which exist. Do not restore `OnResize::Translate` or - `OrthoSize`. + `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. diff --git a/docs/LAYOUT.md b/docs/LAYOUT.md index d79fa22..c6c3421 100644 --- a/docs/LAYOUT.md +++ b/docs/LAYOUT.md @@ -387,7 +387,7 @@ can name -- a division of two lengths, which a `rel + px` length cannot hold. A widget's own declaration *is* a fraction, of whichever of those reached it, and it is the only one of them that also places the box inside the part. -Validity has a pin for each: `LayoutHolds::extent_len` for the box's symbolic +Validity has a pin for each: `LayoutHolds::region_len` for the box's symbolic length and `frame_len` for the frame's. A range of window pixels cannot say which frame an answer is a fraction of, since two frames are different lengths at the same window size. Resolving any of these lengths in pixels is diff --git a/docs/LAYOUT_LOG.md b/docs/LAYOUT_LOG.md index 0ae69cd..4887303 100644 --- a/docs/LAYOUT_LOG.md +++ b/docs/LAYOUT_LOG.md @@ -136,18 +136,10 @@ The descriptions above preserve the original failure at `cadfba0`. ### Clarity, in the order worth doing -- **`extent` is back.** `core/src/ui` says `extent` 138 times, its comments - say "box" 153 times, and the types are all `UiRegion`. Bryan renamed this - to `placement` on 2026-09-17; `frame` survived with its new meaning as a - length, `extent` did not. One sweep over `Painter::extent`, - `ActiveData::{extent, part}`, `placed_extent`, `frame_and_extent` and - `LayoutHolds::{extent, extent_len}`. -- `ActiveData::part` and `::extent` are both boxes told apart only by - prose, and `draw_at` writes `part: extent` from one value. `asked_in` and - `drawn_in` would say it in the names. -- `Painter` accumulates a `LayoutHolds` under four names that do not match - the four fields they become (`window_own`, `extent_own`, `frame_own_len`, - `extent_len`). One `own: LayoutHolds` field deletes the mapping. +The first three -- the unswept `extent`, the two same-typed boxes on +`ActiveData`, and `Painter`'s four holds accumulators -- were done in +`5642f20`. What is left: + - `draw_inner` returns `(Size, LayoutHolds, LayoutHolds)`, two same-typed values ordered by convention. A named pair makes the swap unwriteable. - `DrawInfo::px` is computed at all four construction sites and read only by