Skip to content

fix(codegen): preserve fill allocation and hug size for offset masks - #44

Merged
owjs3901 merged 3 commits into
mainfrom
integration/notice-layout
Sep 13, 2026
Merged

fix(codegen): preserve fill allocation and hug size for offset masks#44
owjs3901 merged 3 commits into
mainfrom
integration/notice-layout

Conversation

@owjs3901

Copy link
Copy Markdown
Contributor

The notice screens 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.

Screen Width Before After Height before Height after Design
notice-422-6914 360 5.54% 5.25% 1217 1217 1215
notice-422-7088 992 3.35% 3.22% 1214 1145 1142
notice-422-6865 1920 2.22% 2.20% 1145 1145 1142

The 72px overshoot collapses to 3px. The other twelve screens are byte-identical.

1. A row can overflow collectively

min-width: auto refuses 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 own minWidth, 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 maskSize and maskPos go 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 main and 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-all untouched. Only the three measured notice thresholds lowered.

Gates: fmt 0, clippy --locked --workspace --all-targets --all-features -D warnings 0, cargo test --workspace 1067 passed / 0 failed / 2 ignored, insta --check no drift, stdio_smoke 2 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.

@owjs3901
owjs3901 merged commit b7451aa into main Sep 13, 2026
8 checks passed
@owjs3901
owjs3901 deleted the integration/notice-layout branch September 13, 2026 04:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant