You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d54b8d3
Browse filesBrowse the repository at this point in the historyBrowse files
fix(deploy): derive every deploy surface from one deployment verdict
The modal could render "Deploy your workflow to see a preview" directly above a
version row reading `v1 (live)`, because the General tab inferred "not deployed"
from the ABSENCE OF A SNAPSHOT. A missing snapshot is not evidence of anything —
usually it just has not arrived — and treating it as evidence let the modal
contradict itself.
Underneath that, nothing re-fetched the snapshot once it came back empty.
`refetchDeploymentBoundary` fires while the query is still disabled (it is gated
on `isDeployed`, which is not true yet), and a disabled query cannot be
refetched, so a null cached during the activation window survived the whole
stale period. `useDeployedWorkflowState` now retries while it holds no snapshot
and stops the instant one arrives — the query is only enabled once the workflow
IS deployed, so a null there is a contradiction to resolve, not an answer.
The deeper problem was that the chip, the modal footer and the preview each
derived their own verdict from a different mix of raw flags. That is the same
failure this branch fixes one layer down — several derivations of one fact,
drifting — so it gets the same treatment. `useDeploymentViewState` derives once;
the chip, the modal and the General tab consume it and are given no raw material
to re-derive from. `DeployModal` now takes one `deployment` prop in place of
four booleans it used to recombine.
Also brings the chip in line with the busy-label pattern every sibling control
on this surface already follows (`{isUndeploying ? 'Undeploying...' : 'Undeploy'}`
in the modal footer): it now reads "Deploying..." while the deploy is in flight,
where before it announced nothing and merely went disabled. Scoped to the deploy
action, which the mutation bounds. The readiness states stay in the tooltip on
purpose — `saving` fires on every settled keystroke, so putting it on the chip
would reintroduce the label churn the state machine exists to remove.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/general/general.tsx
+10-1Lines changed: 10 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,8 @@ interface GeneralDeployProps {
33
33
workflowId: string|null
34
34
deployedState?: WorkflowState|null
35
35
isLoadingDeployedState: boolean
36
+
/** A snapshot is expected but has not arrived — render loading, not "undeployed". */
37
+
isAwaitingSnapshot: boolean
36
38
versions: WorkflowDeploymentVersionResponse[]
37
39
versionsLoading: boolean
38
40
isPromotingVersion: boolean
@@ -51,6 +53,7 @@ export function GeneralDeploy({
51
53
workflowId,
52
54
deployedState,
53
55
isLoadingDeployedState,
56
+
isAwaitingSnapshot,
54
57
versions,
55
58
versionsLoading,
56
59
isPromotingVersion,
@@ -169,7 +172,13 @@ export function GeneralDeploy({
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/deploy-modal.tsx
0 commit comments