Uh oh!
There was an error while loading. Please reload this page.
improvement(stores): remove deployment state from Zustand in favor of React Query - #3923
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Updates UI and Copilot flows to read deployment status from React Query ( Cleans up API/state payloads by dropping Removes the Reviewed by Cursor Bugbot for commit 501b7c1. Configure here. |
d9d3485 to
2eed4daCompareGreptile SummaryThis PR cleanly removes Key changes:
Confidence Score: 5/5Safe to merge — all remaining findings are P2 style suggestions with no impact on runtime correctness. The refactor is thorough: all references to the removed Zustand deployment state have been cleaned up across stores, API routes, socket operations, and tests. The React Query seeding pattern in
Important Files Changed
Sequence DiagramsequenceDiagram
participant C as Component
participant RQ as React Query Cache
participant ZS as Zustand Store
participant API as API Route
Note over C,API: Before this PR — dual source of truth
C->>ZS: read deploymentStatuses / needsRedeployment
C->>RQ: read useDeploymentInfo
API-->>ZS: write on deploy/undeploy
API-->>RQ: invalidate on deploy/undeploy
Note over C,API: After this PR — React Query is single source of truth
C->>RQ: useDeploymentInfo(workflowId)
RQ-->>C: isDeployed, deployedAt, needsRedeployment
C->>API: POST /api/workflows/id/deploy
API-->>RQ: onSettled → invalidateDeploymentQueries()
RQ-->>C: fresh deployment info
ZS->>RQ: loadWorkflowState() seeds cache via setQueryData()
Reviews (3): Last reviewed commit: "improvement(stores): remove deployment s..." | Re-trigger Greptile |
Uh oh!
There was an error while loading. Please reload this page.
2eed4da to
6025ef9Compare6025ef9 to
af3e12dComparewaleedlatif1
commented
Apr 4, 2026
waleedlatif1
commented
Apr 4, 2026
@cursor review |
Uh oh!
There was an error while loading. Please reload this page.
2ea7b05 to
0263897Compare0263897 to
501b7c1Comparewaleedlatif1
commented
Apr 4, 2026
waleedlatif1
commented
Apr 4, 2026
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 501b7c1. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
Summary
deploymentStatuses,needsRedeployment) from Zustand workflow stores — React Query is now the single source of truthuseDeploymentInfoandgetQueryClient().getQueryData()instead of Zustand selectorsonSuccesstoonSettled(fires on both success and error)getAllWorkflowsWithValues,getBlockWithValues,revertToDeployedState,DeploymentStatustype,custom-tool-cacheutilityType of Change
Testing
Tested manually, lint and type-check pass clean
Checklist