Record Iris review fixes, validation, and consolidated checkout

This commit is contained in:
iris-ai committed 2026-09-19 13:53:12 -04:00
1 parent 67584cedda
commit f3c9ab8106
3 files changed
+102 -52

No files matched your search

+57 -9
View File
@@ -6,12 +6,60 @@ nothing here is rediscovered. Each entry says who found it and when.
it (settled design, the measurement method) belongs in `docs/LAYOUT.md`, and
the current plan is in `docs/HANDOFF.md`.
## What the review of #19 found (2026-09-19)
## Follow-up implementation review (2026-09-19)
Read at `cadfba0` in the `iris/` submodule of this checkout, which is the
same commit as `layout/one-ask`. `cargo fmt --all --check`, clippy
`-D warnings` and the 123-test suite are clean there, so both defects below
are live behaviour rather than anything the tests say.
The ask/place split, window-unit frames, exact validity preimages, and
bottom-up dirty settling implement the settled design. Keep this approach.
It does not guarantee one body call per widget: an unhinted descendant that
reports leftover weight still needs a room ask and a slot ask. The explicit
measurement redesign remains deferred until an app screen justifies it.
The fixes below are on `layout/one-ask` in `/home/bob/repos/iris`:
- A collapsed share advances both span cursors. The regression covers one
and two collapsed children in all four directions.
- A masking widget owns a mask reference and reclaims its existing slot on
redraw. Primitives retain their own references. Removing the mask,
undrawing its owner, freeing the widget, and replacing the root release
ownership; a changed inherited mask rejects drawing reuse. Tests check
actual primitive mask indices, movement with and without a region node,
child draw counts, clip removal/addition, and empty-mask slot reuse.
- **A further handover defect:** `draw_inner` saved the old parent only
after a redraw replaced `ActiveData`. The old parent therefore kept the
child in its list and could undraw the subtree after its new parent drew
it. Capture the old parent before replacing the record. A branch-switch
regression reproduces disappearing content when its new parent owns a
region node, and also checks the ordinary reuse path.
The mask and handover tests fail on the reviewed code and pass with the
fixes. The mask fix preserves child reuse rather than redrawing descendants
on every mask repaint. No naming sweep or rounding-policy change is included.
Validation: workspace tests with and without diagnostics, the release fast
oracle, and all three prescribed seed scans pass. Comparing 34,488 cold
boxes against `cadfba0` finds 650 changes; withholding just the collapsed-slot
fix reproduces the baseline exactly. This is an expected geometry correction,
not a cost-only change whose dump should remain identical. The tabs example
and an exact 400 px collapsed-share fixture were rendered and inspected.
Two test-harness savings leave the random stream and coverage unchanged:
`generated` constructs one plan per seed for its sixteen scenarios, and the
warm/cold comparison constructs its diagnostic ancestry lookup only after
finding a mismatch. No overall speedup is claimed; no deep profile was run.
**Integration is larger than an API rename.** The app's pinned `32f6ad8`
has 45 commits not reachable from this review branch. In particular, the
app's nested/shape masks and shared `Ui` ownership are absent here: #19's
mask is still a single rectangle and `set_mask` rejects nested masks. Keep
the app pin until those existing capabilities have been integrated. The
"Masks" and "UI ownership" sections of `LAYOUT.md` describe the app-side
implementation, not everything already present on the upstream review branch.
## Original review of #19 at `cadfba0` (2026-09-19)
The original review read `cadfba0`, then the tip of `layout/one-ask`.
`cargo fmt --all --check`, clippy `-D warnings` and the 123-test suite were
clean there. These are the original failures, fixed by the follow-up above.
### A span misplaces the slot after a collapsed `leftover` child
@@ -80,11 +128,11 @@ per-widget mask slot kept across redraws, the way `UiRenderState::move_slot`
already keeps a move entry, so the index is stable and `reposition` goes on
updating the one the descendants name.
### Neither path has a test
### Regression coverage
The suite passes with and without both fixes. A span case belongs in
`tests/cases/layout.rs` and a mask-reuse case in `tests/cases/retained.rs`
when they land.
Both paths now have regressions in `tests/cases/layout.rs` and
`tests/cases/retained.rs`; the follow-up above records the additional cases.
The descriptions above preserve the original failure at `cadfba0`.
### Clarity, in the order worth doing