Repository navigation
Add renderdiff probe: what varies between loads of one URL - #89
Merged
Merged
Conversation
tmashara
force-pushed
the
claude/issue-73-probe
branch
from
October 29, 2026 18:51
b164a14 to
05f5df9
Compare
Loads one URL --loads times (default 8) in fresh contexts through a run's own capture, then diffs every element's computed style and position in its parent across the loads, collapsing what a parent's change explains. Exits 0 stable, 1 varies, 2 bad arguments, 3 a load errored. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
tmashara
force-pushed
the
claude/issue-73-probe
branch
from
October 29, 2026 18:56
05f5df9 to
b07bd0d
Compare
# Conflicts: # tests/fixtures/pages/README.md
Merged
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.
What
renderdiff probe <url> [--width <n>] [--loads <n>]: loads one URL several times and lists the elements whose computed style or position varies between loads.Why
A base-vs-base run can differ with no
variesline and 0 unstable pixels: the page is still on every load, but two loads disagree (an embed that sometimes gets its controls bar, a font that sometimes wins the race). Until now the only way to find what to mask was to rerun and squint. Probe names the element and its values.Usage and output
prepare(blocking, fake clock, seededMath.random, video freeze),shoot/capture(settle,beforeandbeforeShothooks, masks, retry), then the--computedwalk. Positions are read afterwards asx/yrelative to the parent element.--concurrency(a probe worker keeps one page busy, a run keeps two);--concurrency 1runs them one at a time.PROPSfield pluscontent,x,y; a key some loads lack prints once aspresent, outermost only. The existingcollapseInheriteddrops what a parent's change explains (now generic over the number of values, type-only change;--computedunchanged). First 20 lines, then(+N more).--mask,--mask-media, hooks,--storage-state/--left-storage-state,--no-freeze-videoand--configapply as in a run.Exit codes
--loadsunder 2 or not an integer, more than one--width,--selector)Limits
yalso lists the siblings a grown box pushes down (see the example). Document order puts the cause first. Markedponytail:insrc/probe.ts.--width), no--selector, no--json, no PNGs or out dir, no markup diffs. Can be added if needed.side: "left".How tested
tests/fixtures/pages/bistable(a box 366px tall on odd renders and 380px on even ones), added toGUARDRAILS,GENERATEDand the fixtures README.tests/visual/guardrails.test.ts): probe/bistable --loads 4exits 1 and namesdiv.player heightwith both values, and nodiv.page height. Probe/ --loads 3exits 0 withstable over 3 loads.tests/unit/cli-args.test.ts): no URL, two URLs, a route,--loads 1,--loads=2.5,--loadswith no value, two--widths and--selectorall exit 2 with the reason, and a normal run with--loadsis rejected as an unknown flag. The docs-flags test covers--loadsacross help, README and skills.unknown flag: --loads,right origin is required) and so do the visual ones. With it they pass.npm run typecheck,npm run lint,npm run format:check,npm test(326 pass) andnpm run test:visual(345 pass) all clean on macOS, rebased on Masks: re-read boxes at every shot, clip to overflow, cover overflowing children #86.Docs: a README paragraph after
renderdiff report, one clause in the skill's baseline step, and a## probesection inskills/renderdiff/reference.md.Fixes #73
🤖 Generated with Claude Code