feat: support incremental diffs for GitHub merge queue#768
Draft
danadajian wants to merge 5 commits into
Draft
Conversation
…ils build Add --dts.eager flag to tsdown build so it can resolve type exports from the shared workspace package without needing pre-built .d.ts files. Also use `import type` for the PixelMatchOptions import. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
GitHub's merge queue combines each queued PR with all preceding positions into a single commit, which causes visual regression checks to surface false positives — position N appears to have diffs from N-1's changes even when it didn't touch those components.
This PR introduces a
merge-queue-diffworkflow that eliminates that noise. It splits the merge queue check into two jobs: Job 1 runs visual tests and uploads screenshots as usual (skipping commit status and PR comments), and Job 2 waits for the preceding queue position to finish, then computes pixel-isolated diffs by comparing N's renders against N-1's renders rather than the shared base images. Job 2 sets the final commit status, so only N's own visual changes are reported. When N-1 had no diffs or failed, Job 2 falls back to base-image comparison directly.The
prworkflow is also hardened for merge queue runs: if Job 1 crashes, it now sets afailurecommit status so Job 2 doesn't poll until timeout with no signal. Pixelmatch utilities are refactored fromcomparadise-utilsintoshared/to support the new workflow.How it works
Consumers add two jobs to their merge queue workflow:
Job 2 polls N-1's commit status, then runs pixelmatch against N-1's uploaded renders. If N-1 had no diffs (
success) or failed, it falls back to comparing againstbase-images/directly.Test plan
failurestatus and not poll until timeoutGenerated with Claude Code