diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-editor/preview-editor.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-editor/preview-editor.tsx index d916d263f..bfc86ec20 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-editor/preview-editor.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-editor/preview-editor.tsx @@ -1196,7 +1196,7 @@ function PreviewEditorContent({
{/* Not Executed Banner - shown when in execution mode but block wasn't executed */} - {isExecutionMode && !executionData && ( + {isBlockNotExecuted && (
diff --git a/apps/sim/lib/logs/execution/snapshot/service.ts b/apps/sim/lib/logs/execution/snapshot/service.ts index 04f862ab8..f151e51b4 100644 --- a/apps/sim/lib/logs/execution/snapshot/service.ts +++ b/apps/sim/lib/logs/execution/snapshot/service.ts @@ -33,10 +33,20 @@ export class SnapshotService implements ISnapshotService { const existingSnapshot = await this.getSnapshotByHash(workflowId, stateHash) if (existingSnapshot) { - await db - .update(workflowExecutionSnapshots) - .set({ stateData: state }) - .where(eq(workflowExecutionSnapshots.id, existingSnapshot.id)) + // The hash covers functional data only (blocks, edges, loops, etc.). + // Refresh the stored state so that presentation-only fields like + // metadata.name and positions stay up to date. + try { + await db + .update(workflowExecutionSnapshots) + .set({ stateData: state }) + .where(eq(workflowExecutionSnapshots.id, existingSnapshot.id)) + } catch (error) { + logger.warn( + `Failed to refresh snapshot stateData for ${existingSnapshot.id}, continuing with existing data`, + error + ) + } logger.info( `Reusing existing snapshot for workflow ${workflowId} (hash: ${stateHash.slice(0, 12)}...)`