Skip to content

fix(capture): honour the capture viewport environment variables - #28

Closed
pathscale wants to merge 1 commit into
masterfrom
fix/capture-viewport-env
Closed

fix(capture): honour the capture viewport environment variables#28
pathscale wants to merge 1 commit into
masterfrom
fix/capture-viewport-env

Conversation

@pathscale

Copy link
Copy Markdown
Owner

scripts/render-check.sh has documented and exported CHUZZ_CAPTURE_WIDTH and CHUZZ_CAPTURE_HEIGHT since it was written, and the capture entry point read neither — it passed a literal 1440, 960. Every capture came out that size whatever the caller asked for.

Found while setting up a reference-browser comparison: a re-capture at width 1507 produced a byte-identical tree dump to the 1440 run, which is not something a working viewport knob can do.

This matters beyond tidiness. Two engines laying the same page out at different widths disagree on every percentage width, every centred box and every responsive breakpoint, so an unhonoured viewport turns a rendering diff into noise that reads exactly like a rendering fault.

Only CHUZZ_CAPTURE_SCALE was wired up, so the fix follows its shape.

Verified: CHUZZ_CAPTURE_WIDTH=1507 CHUZZ_CAPTURE_HEIGHT=803 scripts/render-check.sh now yields body 0,0 1507*803, against 1440*960 before. cargo fmt --check and cargo clippy -D warnings both clean.

`scripts/render-check.sh` has documented and exported CHUZZ_CAPTURE_WIDTH and
CHUZZ_CAPTURE_HEIGHT since it was written, and the capture entry point read
neither: it passed a literal 1440 by 960. Every capture was that size whatever
the caller asked for, and a run at another width produced a byte-identical
tree, which is how this surfaced.

That matters now because captures are about to be compared against a reference
browser. Two engines laying the same page out at different widths disagree on
every percentage width, every centred box and every responsive breakpoint, so
an unhonoured viewport turns a diff into noise that reads exactly like a
rendering fault.

Only CHUZZ_CAPTURE_SCALE was wired up, so the fix follows its shape.
@pathscale

Copy link
Copy Markdown
Owner Author

Superseded by #30, which stacks this with the runtime script-fetch work for a single release.

@pathscale pathscale closed this Aug 31, 2026
@pathscale
pathscale deleted the fix/capture-viewport-env branch September 1, 2026 00:43
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