From 2f0f246002e1f1bec8067bb0e0b520ec01cc48b1 Mon Sep 17 00:00:00 2001 From: Emir Karabeg <78010029+emir-karabeg@users.noreply.github.com> Date: Wed, 21 Jan 2026 19:12:28 -0800 Subject: [PATCH] feat(workflow-block): preview (#2935) --- .../templates/components/template-card.tsx | 1 - .../execution-snapshot/execution-snapshot.tsx | 5 +- .../templates/components/template-card.tsx | 1 - .../components/general/general.tsx | 4 +- .../components/template/template.tsx | 1 - .../input-mapping/input-mapping.tsx | 9 +- .../components/tool-input/tool-input.tsx | 9 +- .../subflow-editor/subflow-editor.tsx | 2 +- .../panel/components/editor/editor.tsx | 104 +++++++++- .../w/components/preview/components/block.tsx | 8 +- ...details-sidebar.tsx => preview-editor.tsx} | 43 ++-- .../components/preview/components/subflow.tsx | 7 +- .../w/components/preview/index.ts | 2 +- .../w/components/preview/preview.tsx | 190 ++++++------------ apps/sim/blocks/blocks/workflow_input.ts | 2 +- apps/sim/hooks/queries/workflows.ts | 51 ++--- 16 files changed, 233 insertions(+), 206 deletions(-) rename apps/sim/app/workspace/[workspaceId]/w/components/preview/components/{block-details-sidebar.tsx => preview-editor.tsx} (99%) diff --git a/apps/sim/app/templates/components/template-card.tsx b/apps/sim/app/templates/components/template-card.tsx index 3c1c32a41..0be5079e0 100644 --- a/apps/sim/app/templates/components/template-card.tsx +++ b/apps/sim/app/templates/components/template-card.tsx @@ -207,7 +207,6 @@ function TemplateCardInner({ isPannable={false} defaultZoom={0.8} fitPadding={0.2} - lightweight /> ) : (
diff --git a/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/components/execution-snapshot/execution-snapshot.tsx b/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/components/execution-snapshot/execution-snapshot.tsx index 49d0e316c..a0f2a7376 100644 --- a/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/components/execution-snapshot/execution-snapshot.tsx +++ b/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/components/execution-snapshot/execution-snapshot.tsx @@ -16,8 +16,8 @@ import { import { redactApiKeys } from '@/lib/core/security/redaction' import { cn } from '@/lib/core/utils/cn' import { - BlockDetailsSidebar, getLeftmostBlockId, + PreviewEditor, WorkflowPreview, } from '@/app/workspace/[workspaceId]/w/components/preview' import { useExecutionSnapshot } from '@/hooks/queries/logs' @@ -248,11 +248,10 @@ export function ExecutionSnapshot({ cursorStyle='pointer' executedBlocks={blockExecutions} selectedBlockId={pinnedBlockId} - lightweight /> {pinnedBlockId && workflowState.blocks[pinnedBlockId] && ( -