feat(app): show notice when base images have already been updated#750
Merged
danadajian merged 6 commits intomainfrom Mar 27, 2026
Merged
feat(app): show notice when base images have already been updated#750danadajian merged 6 commits intomainfrom
danadajian merged 6 commits intomainfrom
Conversation
Adds a new tRPC query that checks the GitHub commit status for the visual regression context. When the status is already 'success' (base images were accepted in a prior session or by another reviewer), a green banner is displayed above the Accept button on the review page. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When a package had orphaned diff.png files (no corresponding new.png), pkgDiffCount was inflated because it read from the raw diffFilePaths array instead of the filtered set of valid diffs. Track valid diff paths during the orphan-deletion pass and use them for per-package counting. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… updated Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
🎉 This PR is included in version 1.42.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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
getVisualRegressionStatusthat checks the GitHub commit status for the visual regression contextsuccess(base images were accepted in a prior session or by another reviewer), a green banner is shown above the Accept buttoncommitHash,owner, andrepoare all present in the URL —diffId-only flows are unaffecteddiff.pngfiles (no correspondingnew.png) were presentChanges
app/backend/src/getVisualRegressionStatus.ts(new) — fetcheslistCommitStatusesForRefvia octokit, returns{ isAlreadyUpdated: boolean }app/backend/src/schema.ts— addsgetVisualRegressionStatusInputSchemaapp/backend/src/router.ts— registersgetVisualRegressionStatusqueryapp/frontend/components/main-page.tsx— calls the new query and renders a green banner whenisAlreadyUpdatedis trueaction/src/run.ts— tracks valid (non-orphaned) diff paths separately and uses them for per-packagenewTestCountcalculationTest plan
commitHashwhose visual regression status is alreadysuccess→ green banner "Base images have already been updated for these diffs." appears above the Accept buttoncommitHashstill inpendingstate → no banner showndiffId(nocommitHash) → no banner shown, query is not fireddiff.png→newTestCountfor that package is 0 or positive, never negativeGenerated with Claude Code