Skip to content

Commit d91f1e9

Browse files
committed
fix more things
1 parent 90963bc commit d91f1e9

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/mcp

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,10 @@ export function McpDeploy({
223223
} | null>(null)
224224

225225
useEffect(() => {
226-
// Wait for the deployed state so the legacy migration diffs against the deployed base (what the
227-
// server uses), not the live editor — otherwise unpublished Start-block edits mis-classify.
228-
if (savedValues || !deployedState) return
226+
// Seed once the deployed snapshot is ready — present, or its load settled without data. With the
227+
// deployed base the legacy migration classifies overrides against what the server serves; on a
228+
// failed fetch we still seed so existing tools stay editable instead of silently un-saveable.
229+
if (savedValues || (isLoadingDeployedState && !deployedState)) return
229230

230231
for (const server of servers) {
231232
const toolInfo = serverToolsMap[server.id]
@@ -255,7 +256,7 @@ export function McpDeploy({
255256
break
256257
}
257258
}
258-
}, [servers, serverToolsMap, startBlockDescriptions, inputFormat, deployedState, savedValues])
259+
}, [servers, serverToolsMap, inputFormat, isLoadingDeployedState, deployedState, savedValues])
259260

260261
const selectedServerIdsForForm = draftSelectedServerIds ?? selectedServerIds
261262

0 commit comments

Comments
 (0)