Repository navigation
feat: normalize screenshot diffs to baseline width - #3862
Conversation
|
Size Report
Startup median (7 runs, lower is better):
|
|
The PR is ready from the code side at e857610. The screenshot-diff change reads correctly, and the new diff tests would fail on the old Not blocking, and you can take or leave these: the PR removes the released Before merge, please rerun the Coverage job to green and add the changeset. |
|
Addressed the required follow-ups at d01cc11:
The optional worker offload remains a separate performance change pending measurement. JPEG errors retain the existing distinction: a readable over-budget header is Fresh CI is required at the pushed head; I am monitoring it before calling Coverage cleared. |
Summary
diff screenshotscales the current image proportionally to the baseline width, aligns top-left, and compares the full union height. A 1080×2340 capture against a 375×812 Figma reference becomes 375×813; unmatched rows count as differences even at threshold 1. Equal-size RGB behavior stays unchanged. Original files stay unchanged.JSON replaces
dimensionMismatchwithnormalizationfor different-size inputs, including original/scaled/comparison sizes and coordinate scales. Region/ref rectangles use comparison pixels. A changeset documents the migration.18 files; gross lines: production 293, tests 390, docs/changeset 11 (578 additions / 116 deletions). Scope includes PNG/JPEG allocation preflight and comparison-canvas limits. No linked issue.
Validation
Head:
d01cc1103f142a756865c802fbeee3e2eeda3f66.pnpm check:affected --run --head d01cc1103f142a756865c802fbeee3e2eeda3f66: passed; receiptrun-yxTKES,exactCommit=true,checkoutChanged=false; 10 checks passed, 7 skipped, 4,062 related tests passed.Coverage's import-budget assertion reproduced at
e857610218(23 eager modules versus 14). Loading normalization dependencies on demand fixes it. The full import-budget suite plus screenshot-diff/image tests pass: 900 tests. Independent follow-up review approved.Full coverage, integration and platform smoke remain CI obligations at this head; parked replay lanes were skipped. Live capture was not rerun because capture dispatch is unchanged. Optional worker offload and JPEG decode-error unification remain outside this fix.