fix(deploy-check): race condition fixes#2710
Merged
icecrasher321 merged 1 commit intostagingfrom Jan 7, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile SummaryFixed race conditions in deployment check status rendering by improving state synchronization across workflow navigation. Key improvements:
The changes ensure deployment status UI accurately reflects the current workflow state even when users rapidly switch between workflows. Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Deploy
participant useDeployedState
participant Registry
participant API
participant useChangeDetection
Note over User,useChangeDetection: Workflow Deployment Status Flow
User->>Deploy: Navigate to workflow
Deploy->>useDeployedState: Initialize with workflowId
useDeployedState->>Registry: Get fresh activeWorkflowId & deployment status
alt Workflow is deployed
useDeployedState->>API: GET /api/workflows/{id}/deployed
useDeployedState->>Registry: Check if activeWorkflowId still matches
alt Workflow changed during fetch
useDeployedState->>useDeployedState: Ignore response (race condition prevented)
else Workflow still active
API-->>useDeployedState: Return deployed state
useDeployedState->>Registry: Verify activeWorkflowId again
useDeployedState->>Deploy: Update deployedState
end
end
Deploy->>useChangeDetection: Compare current vs deployed
useChangeDetection->>useChangeDetection: Build current state (no debounce)
useChangeDetection->>useChangeDetection: Compare states
useChangeDetection->>Deploy: Return changeDetected
Deploy->>User: Render UI (Live/Update/Deploy)
User->>Deploy: Switch to different workflow
Deploy->>useDeployedState: New workflowId
useDeployedState->>Registry: Get fresh activeWorkflowId
Note over useDeployedState,Registry: Race condition check prevents<br/>stale state updates
|
waleedlatif1
pushed a commit
that referenced
this pull request
Jan 8, 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.
Summary
Fix race condition with respect to deployment check status rendering.
Type of Change
Testing
Tested manually
Checklist