feat(preprod): Show processing state for snapshot comparisons#111355
Merged
NicoHinderling merged 3 commits intomasterfrom Mar 23, 2026
Merged
feat(preprod): Show processing state for snapshot comparisons#111355NicoHinderling merged 3 commits intomasterfrom
NicoHinderling merged 3 commits intomasterfrom
Conversation
Contributor
|
🚨 Warning: This pull request contains Frontend and Backend changes! It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently. Have questions? Please ask in the |
Create PreprodSnapshotComparison record with PENDING state at upload time, before the async comparison task runs. This lets the frontend immediately detect an in-progress comparison. On the frontend, show a BuildProcessing indicator while the comparison is pending or processing, and auto-poll every 5 seconds until complete. Previously the page showed an empty or stale diff view until the task finished. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
38bbe92 to
cb9b01a
Compare
Wrap get_or_create() for PreprodSnapshotComparison in try/except IntegrityError to handle concurrent uploads for the same artifact pair. The async task already handles this race; the endpoint just needs to ensure a PENDING record exists. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
rbro112
reviewed
Mar 23, 2026
| data-is-held={isHeld} | ||
| onMouseDown={onMouseDown} | ||
| onDoubleClick={onDoubleClick} | ||
| ) : ( |
Member
There was a problem hiding this comment.
Nit: I generally dislike the ? () : () notation in react components, it makes it hard to find the blocks of the conditional. I prefer extracting the variable above then using that to gate the functionality. So this could be:
const isProcessing = [ComparisonState.PENDING, ComparisonState.PROCESSING].includes(comparisonRunInfo.state);
return (
...
{isProcessing && ( // processing state )}
{!isProcessing && ( // default state )}
)
rbro112
approved these changes
Mar 23, 2026
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.
Creates a
PreprodSnapshotComparisonrecord with PENDING state at upload time, before the async comparison task is dispatched. This lets the frontend immediately detect that a comparison is in progress.On the frontend, a
BuildProcessingindicator is shown while the comparison is pending or processing. The page auto-polls every 5 seconds and transitions to the full diff view once the comparison completes. Previously, the page showed an empty or stale diff view until the background task finished, with no indication that work was happening.