From fe463279aa9dc669ca4e68d54b7b8391ae3d2703 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Mon, 9 Feb 2026 19:57:36 -0800 Subject: [PATCH 1/6] improvement(preview): added trigger mode context for deploy preview --- .../components/preview-editor/preview-editor.tsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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 bfc86ec20d..c259bc4f74 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 @@ -1140,9 +1140,20 @@ function PreviewEditorContent({ (block.advancedMode ?? false) || hasAdvancedValues(blockConfig.subBlocks, rawValues, canonicalIndex) + const isPureTriggerBlock = blockConfig.triggers?.enabled && blockConfig.category === 'triggers' + const effectiveTrigger = block.triggerMode === true || block.type === 'starter' + const visibleSubBlocks = blockConfig.subBlocks.filter((subBlock) => { if (subBlock.hidden || subBlock.hideFromPreview) return false - if (subBlock.mode === 'trigger' && blockConfig.category !== 'triggers') return false + + if (effectiveTrigger) { + const isValidTriggerSubblock = isPureTriggerBlock + ? subBlock.mode === 'trigger' || !subBlock.mode + : subBlock.mode === 'trigger' + if (!isValidTriggerSubblock) return false + } else { + if (subBlock.mode === 'trigger' && blockConfig.category !== 'triggers') return false + } if (!isSubBlockFeatureEnabled(subBlock)) return false if ( !isSubBlockVisibleForMode( From ed5dff2e900cd38c6eced338e927df67cb545a8c Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Mon, 9 Feb 2026 20:01:15 -0800 Subject: [PATCH 2/6] use existing helper --- .../preview/components/preview-editor/preview-editor.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 c259bc4f74..f89de578a3 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 @@ -37,6 +37,7 @@ import { isSubBlockFeatureEnabled, isSubBlockVisibleForMode, } from '@/lib/workflows/subblocks/visibility' +import { TriggerUtils } from '@/lib/workflows/triggers/triggers' import { DELETED_WORKFLOW_LABEL } from '@/app/workspace/[workspaceId]/logs/utils' import { SubBlock } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components' import { PreviewContextMenu } from '@/app/workspace/[workspaceId]/w/components/preview/components/preview-context-menu' @@ -1141,7 +1142,7 @@ function PreviewEditorContent({ hasAdvancedValues(blockConfig.subBlocks, rawValues, canonicalIndex) const isPureTriggerBlock = blockConfig.triggers?.enabled && blockConfig.category === 'triggers' - const effectiveTrigger = block.triggerMode === true || block.type === 'starter' + const effectiveTrigger = TriggerUtils.isTriggerBlock(block) const visibleSubBlocks = blockConfig.subBlocks.filter((subBlock) => { if (subBlock.hidden || subBlock.hideFromPreview) return false From 8436c73c31f4e65f863c871b40e0e880e4e4b9a2 Mon Sep 17 00:00:00 2001 From: waleed Date: Mon, 9 Feb 2026 20:02:19 -0800 Subject: [PATCH 3/6] enhance disabled mode for subblocks --- .../sub-block/components/short-input/short-input.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/short-input/short-input.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/short-input/short-input.tsx index 606f120a7b..11a4f2fc59 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/short-input/short-input.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/short-input/short-input.tsx @@ -372,8 +372,8 @@ export const ShortInput = memo(function ShortInput({
{formattedText}
From 8122b877c5313e483f0a197d87c4b92c6e4d012d Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Mon, 9 Feb 2026 20:03:50 -0800 Subject: [PATCH 4/6] update --- .../components/preview-editor/preview-editor.tsx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) 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 f89de578a3..dfd95588c0 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 @@ -44,7 +44,7 @@ import { PreviewContextMenu } from '@/app/workspace/[workspaceId]/w/components/p import { PreviewWorkflow } from '@/app/workspace/[workspaceId]/w/components/preview/components/preview-workflow' import { useContextMenu } from '@/app/workspace/[workspaceId]/w/components/sidebar/hooks' import { getBlock } from '@/blocks' -import type { BlockConfig, BlockIcon, SubBlockConfig } from '@/blocks/types' +import type { BlockConfig, BlockIcon, SubBlockConfig, SubBlockType } from '@/blocks/types' import { normalizeName } from '@/executor/constants' import { navigatePath } from '@/executor/variables/resolvers/reference' import { useWorkflowState } from '@/hooks/queries/workflows' @@ -1147,14 +1147,11 @@ function PreviewEditorContent({ const visibleSubBlocks = blockConfig.subBlocks.filter((subBlock) => { if (subBlock.hidden || subBlock.hideFromPreview) return false - if (effectiveTrigger) { - const isValidTriggerSubblock = isPureTriggerBlock - ? subBlock.mode === 'trigger' || !subBlock.mode - : subBlock.mode === 'trigger' - if (!isValidTriggerSubblock) return false - } else { - if (subBlock.mode === 'trigger' && blockConfig.category !== 'triggers') return false + if (subBlock.type === ('trigger-config' as SubBlockType)) { + return effectiveTrigger || isPureTriggerBlock } + if (subBlock.mode === 'trigger' && !effectiveTrigger) return false + if (effectiveTrigger && subBlock.mode !== 'trigger') return false if (!isSubBlockFeatureEnabled(subBlock)) return false if ( !isSubBlockVisibleForMode( From d8957013c09a65522e8bda557d6b24962d12b8eb Mon Sep 17 00:00:00 2001 From: waleed Date: Mon, 9 Feb 2026 20:08:38 -0800 Subject: [PATCH 5/6] update all subblocks to allow scrolling in read only mode --- .../document-tag-entry/document-tag-entry.tsx | 5 ++++- .../sub-block/components/eval-input/eval-input.tsx | 5 ++++- .../components/input-mapping/input-mapping.tsx | 5 ++++- .../knowledge-tag-filters/knowledge-tag-filters.tsx | 5 ++++- .../sub-block/components/long-input/long-input.tsx | 4 ++-- .../components/messages-input/messages-input.tsx | 5 ++++- .../sub-block/components/starter/input-format.tsx | 10 ++++++++-- .../components/variables-input/variables-input.tsx | 10 ++++++++-- 8 files changed, 38 insertions(+), 11 deletions(-) diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/document-tag-entry/document-tag-entry.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/document-tag-entry/document-tag-entry.tsx index b21c6f9d42..7a6fa78fef 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/document-tag-entry/document-tag-entry.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/document-tag-entry/document-tag-entry.tsx @@ -324,7 +324,10 @@ export function DocumentTagEntry({ ref={(el) => { if (el) overlayRefs.current[cellKey] = el }} - className='pointer-events-none absolute inset-0 flex items-center overflow-x-auto bg-transparent px-[8px] py-[6px] font-medium font-sans text-sm' + className={cn( + 'absolute inset-0 flex items-center overflow-x-auto bg-transparent px-[8px] py-[6px] font-medium font-sans text-sm', + !isReadOnly && 'pointer-events-none' + )} >
{formatDisplayText( diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/eval-input/eval-input.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/eval-input/eval-input.tsx index 997088bc6f..f4bc3f68ff 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/eval-input/eval-input.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/eval-input/eval-input.tsx @@ -226,7 +226,10 @@ export function EvalInput({ ref={(el) => { if (el) descriptionOverlayRefs.current[metric.id] = el }} - className='pointer-events-none absolute inset-0 overflow-auto bg-transparent px-[8px] py-[8px] font-medium font-sans text-[#eeeeee] text-sm' + className={cn( + 'absolute inset-0 overflow-auto bg-transparent px-[8px] py-[8px] font-medium font-sans text-[#eeeeee] text-sm', + !(isPreview || disabled) && 'pointer-events-none' + )} >
{formatDisplayText(metric.description || '', { diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/input-mapping/input-mapping.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/input-mapping/input-mapping.tsx index 69189c7629..ac78d29137 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/input-mapping/input-mapping.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/input-mapping/input-mapping.tsx @@ -273,7 +273,10 @@ function InputMappingField({ ref={(el) => { if (el) overlayRefs.current.set(fieldId, el) }} - className='pointer-events-none absolute inset-0 flex items-center overflow-x-auto bg-transparent px-[8px] py-[6px] font-medium font-sans text-sm' + className={cn( + 'absolute inset-0 flex items-center overflow-x-auto bg-transparent px-[8px] py-[6px] font-medium font-sans text-sm', + !disabled && 'pointer-events-none' + )} style={{ overflowX: 'auto' }} >
{ if (el) overlayRefs.current[cellKey] = el }} - className='pointer-events-none absolute inset-0 flex items-center overflow-x-auto bg-transparent px-[8px] py-[6px] font-medium font-sans text-sm' + className={cn( + 'absolute inset-0 flex items-center overflow-x-auto bg-transparent px-[8px] py-[6px] font-medium font-sans text-sm', + !isReadOnly && 'pointer-events-none' + )} >
{formatDisplayText( diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/long-input/long-input.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/long-input/long-input.tsx index ed7dcc23c7..c9609d5218 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/long-input/long-input.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/long-input/long-input.tsx @@ -353,8 +353,8 @@ export function LongInput({
{ overlayRefs.current[fieldId] = el }} - className='pointer-events-none absolute top-0 left-0 z-[1] m-0 box-border w-full overflow-y-auto overflow-x-hidden whitespace-pre-wrap break-words border-none bg-transparent px-[8px] py-[8px] font-medium font-sans text-[var(--text-primary)] text-sm leading-[1.5] [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden' + className={cn( + 'absolute top-0 left-0 z-[1] m-0 box-border w-full overflow-y-auto overflow-x-hidden whitespace-pre-wrap break-words border-none bg-transparent px-[8px] py-[8px] font-medium font-sans text-[var(--text-primary)] text-sm leading-[1.5] [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden', + !(isPreview || disabled) && 'pointer-events-none' + )} > {formatDisplayText(message.content, { accessiblePrefixes, diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/starter/input-format.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/starter/input-format.tsx index f12ceb3e21..3853cc58f0 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/starter/input-format.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/starter/input-format.tsx @@ -269,7 +269,10 @@ export function FieldFormat({ ref={(el) => { if (el) nameOverlayRefs.current[field.id] = el }} - className='pointer-events-none absolute inset-0 flex items-center overflow-x-auto bg-transparent px-[8px] py-[6px] font-medium font-sans text-sm' + className={cn( + 'absolute inset-0 flex items-center overflow-x-auto bg-transparent px-[8px] py-[6px] font-medium font-sans text-sm', + !isReadOnly && 'pointer-events-none' + )} style={{ scrollbarWidth: 'none' }} >
{ if (el) overlayRefs.current[field.id] = el }} - className='pointer-events-none absolute inset-0 flex items-center overflow-x-auto bg-transparent px-[8px] py-[6px] font-medium font-sans text-sm' + className={cn( + 'absolute inset-0 flex items-center overflow-x-auto bg-transparent px-[8px] py-[6px] font-medium font-sans text-sm', + !isReadOnly && 'pointer-events-none' + )} style={{ scrollbarWidth: 'none' }} >
{ if (el) overlayRefs.current[assignment.id] = el }} - className='pointer-events-none absolute inset-0 flex items-start overflow-auto bg-transparent px-3 py-2 font-mono text-sm' + className={cn( + 'absolute inset-0 flex items-start overflow-auto bg-transparent px-3 py-2 font-mono text-sm', + !isReadOnly && 'pointer-events-none' + )} style={{ scrollbarWidth: 'none' }} >
@@ -514,7 +517,10 @@ export function VariablesInput({ ref={(el) => { if (el) overlayRefs.current[assignment.id] = el }} - className='pointer-events-none absolute inset-0 flex items-center overflow-x-auto bg-transparent px-[8px] py-[6px] font-medium font-sans text-sm' + className={cn( + 'absolute inset-0 flex items-center overflow-x-auto bg-transparent px-[8px] py-[6px] font-medium font-sans text-sm', + !isReadOnly && 'pointer-events-none' + )} style={{ scrollbarWidth: 'none' }} >
Date: Mon, 9 Feb 2026 20:28:53 -0800 Subject: [PATCH 6/6] updated short and long input to match others, reverted triggerutils change --- .../components/sub-block/components/long-input/long-input.tsx | 3 ++- .../sub-block/components/short-input/short-input.tsx | 3 ++- .../preview/components/preview-editor/preview-editor.tsx | 3 +-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/long-input/long-input.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/long-input/long-input.tsx index c9609d5218..b83d278d62 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/long-input/long-input.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/long-input/long-input.tsx @@ -354,7 +354,8 @@ export function LongInput({ ref={overlayRef} className={cn( 'absolute inset-0 box-border overflow-auto whitespace-pre-wrap break-words border border-transparent bg-transparent px-[8px] py-[8px] font-medium font-sans text-sm', - isPreview || disabled ? 'opacity-50' : 'pointer-events-none' + (isPreview || disabled) && 'opacity-50', + !(isPreview || disabled) && 'pointer-events-none' )} style={{ fontFamily: 'inherit', diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/short-input/short-input.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/short-input/short-input.tsx index 11a4f2fc59..e2d2dd1916 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/short-input/short-input.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/short-input/short-input.tsx @@ -373,7 +373,8 @@ export const ShortInput = memo(function ShortInput({ ref={overlayRef} className={cn( 'absolute inset-0 flex items-center overflow-x-auto bg-transparent px-[8px] py-[6px] pr-3 font-medium font-sans text-foreground text-sm [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden', - isPreview || disabled ? 'opacity-50' : 'pointer-events-none' + (isPreview || disabled) && 'opacity-50', + !(isPreview || disabled) && 'pointer-events-none' )} >
{formattedText}
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 dfd95588c0..936e8f1146 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 @@ -37,7 +37,6 @@ import { isSubBlockFeatureEnabled, isSubBlockVisibleForMode, } from '@/lib/workflows/subblocks/visibility' -import { TriggerUtils } from '@/lib/workflows/triggers/triggers' import { DELETED_WORKFLOW_LABEL } from '@/app/workspace/[workspaceId]/logs/utils' import { SubBlock } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components' import { PreviewContextMenu } from '@/app/workspace/[workspaceId]/w/components/preview/components/preview-context-menu' @@ -1142,7 +1141,7 @@ function PreviewEditorContent({ hasAdvancedValues(blockConfig.subBlocks, rawValues, canonicalIndex) const isPureTriggerBlock = blockConfig.triggers?.enabled && blockConfig.category === 'triggers' - const effectiveTrigger = TriggerUtils.isTriggerBlock(block) + const effectiveTrigger = block.triggerMode === true const visibleSubBlocks = blockConfig.subBlocks.filter((subBlock) => { if (subBlock.hidden || subBlock.hideFromPreview) return false