fix(codegen): preserve fill allocation and hug size for offset masks - #44
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
noticescreens became measurable for the first time in #43, when the harness stopped dying on a failed acquisition. Nobody had ever looked at them. They held the largest unexplained structural error in the corpus: +72px of height at 992 only, while the other two widths sat within 3px.Two independent defects, landed as two commits so each delta stays attributable.
The 72px overshoot collapses to 3px. The other twelve screens are byte-identical.
1. A row can overflow collectively
min-width: autorefuses to let a FILL sibling shrink below its content. A navigation item Figma draws at 95px expanded to 316px, pushed an address block onto three extra 23px lines, and made the page 72px too tall.The existing
minW="0"rule already handled one child wider than its parent. It now also handles a row that only overflows once its children are added together - still measured from the snapshot, skipped when the design states its ownminWidth, and applied only to non-wrapping horizontal rows, because a wrapping row distributes that content over more lines instead.2. An offset mask was refused its layout size
An SVG mask carrying an export offset was denied a folded layout size outright, so a social icon the design gives 82x32 was generated at zero width and everything below it shifted.
The refusal exists for good reasons - a FILL axis would scale the layout box while the pixel mask offsets stay put, and a positioned or free-layout asset is placed from its export box. None of that applies to an in-flow HUG or FIXED axis, which keeps its measured box while
maskSizeandmaskPosgo on describing the larger painted bounds. That case is now allowed; the rest stay refused.Verification
Both conditions read node fields only - layout mode, wrap, sizing, positioning, measured widths. No viewport, no breakpoint, no node id, no constant fitted to this capture. I grepped the added lines for all of those and found none.
Measured independently in the main checkout with binaries built from
mainand from this branch, full 15-screen acquire and render on each side. My figures match the worker's to the decimal, and the twelve untouched screens are identical on both runs.All 268 plugin byte-parity goldens unchanged. Korean
wordBreak: keep-alluntouched. Only the three measured notice thresholds lowered.Gates:
fmt0,clippy --locked --workspace --all-targets --all-features -D warnings0,cargo test --workspace1067 passed / 0 failed / 2 ignored,insta --checkno drift,stdio_smoke2 passed.Note on process
The worker paused mid-task to ask whether the second defect was in scope, because my spec contradicted itself - it required mobile to improve while also saying to fix mobile only if the tablet change covered it. It was right to stop and ask; I was slow to answer and it timed out, so the first pass shipped tablet-only. The second commit is that authorisation carried out.