Document independent widget bounds and measured layout costs

This commit is contained in:
iris-ai committed 2026-09-20 19:48:28 -04:00
1 parent ddaf9b37d6
commit 17423a57b8
3 files changed
+96 -5

No files matched your search

+39 -4
View File
@@ -4,10 +4,42 @@ 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`.
## Built-in bounds replace `MaxSize` on PR #19
Bryan clarified that the built-in attribute should replace the wrapper.
Work is in `/home/bob/repos/iris-deferred`, on `layout/one-ask`, at
`2ac0843` (pushed). Bounds now constrain the offer in `Placing::ask`; declarations
are retained as resolved window lengths, so movement does not decide the
bound again. `.max_width`/`.max_height` now edit the same widget, like the
minimum helpers, and `MaxSize` is removed. Preferred lengths and bounds
are independent, so either order of `.width` and `.max_width` works. The
app pin is unchanged.
The review fixed three cases: `window_holds` erasing an ask's bound crossing
(seed 104, depth 5), inactive bound edits failing to update the parent's offer
dependencies (seed 144, depth 6, reduced further to three widgets), and a
fractional intrinsic cap being read against its already-allocated slot.
The latter has an absolute 75-in-300 geometry check; warm/cold agreement
alone cannot catch it.
207 ordinary and 211 diagnostic tests pass, with warning-clean Clippy both
ways. All three layout scans pass (400 depth 5, 1,000 depth 6, 2,000 depth 4),
as do 400 depth-5 trees in each of three deferred-request corpora. All 34,986
unbounded cold boxes match `4cb6f68`; bounded offers intentionally change.
The final unbounded-path optimization preserves every bounded cold box too.
Five-run release instruction medians show capped rows using 21.7729.64%
less CPU work than the wrapper. Plain/fixed-width retained resizes differ by
under 0.05%; forced redraws improve about 0.3%. Text workloads differ by at
most 0.13%. Independent preferences and bounds cost 32 extra inline bytes per
widget; all three allocation fixtures remain allocation-free after warm-up.
`docs/LAYOUT.md` records the contract and measurements. Artifacts are in
`/tmp/attribute-bounds/`.
## A quality sweep of the deferred system is submitted on PR #19
`layout/one-ask` is at `4cb6f68` in `/home/bob/repos/iris-deferred`. The tenth
sweep is the first review of `76aaf06` through `0e838e9` -- the bound rules,
The tenth sweep landed at `4cb6f68` in `/home/bob/repos/iris-deferred`. It is
the first review of `76aaf06` through `0e838e9` -- the bound rules,
the deferred request path and the invalidation fix. Ten findings, the largest
two being a bound's held length looked up a second time through a value that
could not promise the end it named (`Bound::at` `expect`ed it), and a bound in
@@ -176,7 +208,9 @@ repeated 34,492, which is a `wc -l` of the whole run rather than of its box
lines, so count the lines that are a box (`grep -cE '^[0-9]+ [0-9]+ '`). It is the only thing that catches two
same-typed values being swapped, which is the failure mode of a rename or a
move. The repair moved 650 of those boxes, all from the collapsed-share
correction; every commit since has been byte-identical to `84dad21`.
correction. Subsequent review-only changes preserved cold geometry through
`4cb6f68`; the offered-bound change in `2ac0843` intentionally changes bounded
geometry while preserving all unbounded boxes.
**Only when the change can alter what layout computes**: the three seed scans
-- 400 at depth 5, 1,000 at depth 6, 2,000 at depth 4. They cost about a
@@ -257,7 +291,8 @@ glyphs do not follow a shortened entry.
(`SizeRule::{Min, Max, Clamp}`); a widget holds the box (`MaxSize`, which
`.max_width`/`.max_height` build). Bryan settled the split on 2026-09-20
after four readings were measured; the reasoning is in `docs/LAYOUT_LOG.md`.
The deferred-request work fixes stale relative-bound reuse by tracking the
Bryan superseded that split with the built-in bounds work above. The
deferred-request work fixes stale relative-bound reuse by tracking the
input base and comparing resolved bounds, with a reduced natural-size-hint
regression and 400 depth-5 relative-bound trees. Intrinsic bounds remain
`Len`s; comparisons involving leftover use `SizeRequest`. Ordinary generated