@@ -198,6 +198,7 @@ export async function fetchWorkflowsFromDB(): Promise<void> {
198198
199199 // Process workflows
200200 const registryWorkflows : Record < string , WorkflowMetadata > = { }
201+ const deploymentStatuses : Record < string , any > = { }
201202
202203 data . forEach ( ( workflow ) => {
203204 const {
@@ -210,6 +211,9 @@ export async function fetchWorkflowsFromDB(): Promise<void> {
210211 marketplaceData,
211212 workspaceId,
212213 folderId,
214+ isDeployed,
215+ deployedAt,
216+ apiKey,
213217 } = workflow
214218
215219 // Skip if workflow doesn't belong to active workspace
@@ -229,6 +233,16 @@ export async function fetchWorkflowsFromDB(): Promise<void> {
229233 folderId : folderId || null ,
230234 }
231235
236+ // CRITICAL: Extract deployment status from database and add to registry
237+ if ( isDeployed || deployedAt ) {
238+ deploymentStatuses [ id ] = {
239+ isDeployed : isDeployed || false ,
240+ deployedAt : deployedAt ? new Date ( deployedAt ) : undefined ,
241+ apiKey : apiKey || undefined ,
242+ needsRedeployment : false , // Default to false when loading from DB
243+ }
244+ }
245+
232246 // Initialize subblock values
233247 const subblockValues : Record < string , Record < string , any > > = { }
234248 if ( state ?. blocks ) {
@@ -251,9 +265,10 @@ export async function fetchWorkflowsFromDB(): Promise<void> {
251265 } ) )
252266 } )
253267
254- // Update registry with loaded workflows
268+ // Update registry with loaded workflows and deployment statuses
255269 useWorkflowRegistry . setState ( {
256270 workflows : registryWorkflows ,
271+ deploymentStatuses : deploymentStatuses ,
257272 isLoading : false ,
258273 error : null ,
259274 } )
0 commit comments