Skip to content

Commit f7cfa26

Browse files
waleedlatif1claude
andcommitted
fix(deploy): suppress transient Update flash during deployed state refetch
Guard change detection on isFetching (not just isLoading) so the comparison is suppressed during background refetches after mutations, preventing a brief Update→Live badge flicker. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent abd5b70 commit f7cfa26

File tree

1 file changed

+6
-5
lines changed
  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy

1 file changed

+6
-5
lines changed

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/deploy.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,17 @@ export function Deploy({ activeWorkflowId, userPermissions, className }: DeployP
3434
const isDeployed = deploymentStatus?.isDeployed || false
3535

3636
const isDeployedStateEnabled = Boolean(activeWorkflowId) && isDeployed && !isRegistryLoading
37-
const { data: deployedStateData, isLoading: isLoadingDeployedState } = useDeployedWorkflowState(
38-
activeWorkflowId,
39-
{ enabled: isDeployedStateEnabled }
40-
)
37+
const {
38+
data: deployedStateData,
39+
isLoading: isLoadingDeployedState,
40+
isFetching: isFetchingDeployedState,
41+
} = useDeployedWorkflowState(activeWorkflowId, { enabled: isDeployedStateEnabled })
4142
const deployedState = isDeployedStateEnabled ? (deployedStateData ?? null) : null
4243

4344
const { changeDetected } = useChangeDetection({
4445
workflowId: activeWorkflowId,
4546
deployedState,
46-
isLoadingDeployedState,
47+
isLoadingDeployedState: isLoadingDeployedState || isFetchingDeployedState,
4748
})
4849

4950
const { isDeploying, handleDeployClick } = useDeployment({

0 commit comments

Comments
 (0)