From ad49dc3878d3417929d531f794e380d64596f113 Mon Sep 17 00:00:00 2001 From: "priyanshu.solanki" Date: Thu, 18 Dec 2025 19:16:56 -0700 Subject: [PATCH 1/3] fixed the human in the loop url resolution: --- .../sub-block/components/tag-dropdown/tag-dropdown.tsx | 9 +++++++-- apps/sim/lib/workflows/blocks/block-outputs.ts | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown.tsx index ea37025f9f..7794ffaa83 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown.tsx @@ -844,8 +844,13 @@ export const TagDropdown: React.FC = ({ if (!accessibleBlock) continue // Skip the current block - blocks cannot reference their own outputs - // Exception: approval blocks can reference their own outputs - if (accessibleBlockId === blockId && accessibleBlock.type !== 'approval') continue + // Exception: approval and human_in_the_loop blocks can reference their own outputs + if ( + accessibleBlockId === blockId && + accessibleBlock.type !== 'approval' && + accessibleBlock.type !== 'human_in_the_loop' + ) + continue const blockConfig = getBlock(accessibleBlock.type) diff --git a/apps/sim/lib/workflows/blocks/block-outputs.ts b/apps/sim/lib/workflows/blocks/block-outputs.ts index cdc84b808f..72b1ea6cf9 100644 --- a/apps/sim/lib/workflows/blocks/block-outputs.ts +++ b/apps/sim/lib/workflows/blocks/block-outputs.ts @@ -225,7 +225,7 @@ export function getBlockOutputs( return getUnifiedStartOutputs(subBlocks) } - if (blockType === 'approval') { + if (blockType === 'approval' || blockType === 'human_in_the_loop') { // Start with only url (apiUrl commented out - not accessible as output) const pauseResumeOutputs: Record = { url: { type: 'string', description: 'Resume UI URL' }, From ea7d6089361197f268ff757545797ca0556897d8 Mon Sep 17 00:00:00 2001 From: "priyanshu.solanki" Date: Thu, 18 Dec 2025 19:27:59 -0700 Subject: [PATCH 2/3] greptilecomments --- .../sub-block/components/tag-dropdown/tag-dropdown.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown.tsx index 7794ffaa83..f4c4c541ed 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown.tsx @@ -964,7 +964,10 @@ export const TagDropdown: React.FC = ({ const outputPaths = getBlockOutputPaths(accessibleBlock.type, mergedSubBlocks, true) blockTags = outputPaths.map((path) => `${normalizedBlockName}.${path}`) } - } else if (accessibleBlock.type === 'approval') { + } else if ( + accessibleBlock.type === 'approval' || + accessibleBlock.type === 'human_in_the_loop' + ) { const dynamicOutputs = getBlockOutputPaths(accessibleBlock.type, mergedSubBlocks) const isSelfReference = accessibleBlockId === blockId From 95569c0a78e0a5bf2e97eac72ca0d71544d1f1f4 Mon Sep 17 00:00:00 2001 From: "priyanshu.solanki" Date: Thu, 18 Dec 2025 19:37:56 -0700 Subject: [PATCH 3/3] greptilecomments --- .../sub-block/components/tag-dropdown/tag-dropdown.tsx | 7 +++---- apps/sim/lib/workflows/blocks/block-outputs.ts | 9 ++++++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown.tsx index f4c4c541ed..3a22efe435 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown.tsx @@ -964,10 +964,7 @@ export const TagDropdown: React.FC = ({ const outputPaths = getBlockOutputPaths(accessibleBlock.type, mergedSubBlocks, true) blockTags = outputPaths.map((path) => `${normalizedBlockName}.${path}`) } - } else if ( - accessibleBlock.type === 'approval' || - accessibleBlock.type === 'human_in_the_loop' - ) { + } else if (accessibleBlock.type === 'approval') { const dynamicOutputs = getBlockOutputPaths(accessibleBlock.type, mergedSubBlocks) const isSelfReference = accessibleBlockId === blockId @@ -980,6 +977,8 @@ export const TagDropdown: React.FC = ({ const allTags = outputPaths.map((path) => `${normalizedBlockName}.${path}`) blockTags = isSelfReference ? allTags.filter((tag) => tag.endsWith('.url')) : allTags } + } else if (accessibleBlock.type === 'human_in_the_loop') { + blockTags = [`${normalizedBlockName}.url`] } else { const operationValue = mergedSubBlocks?.operation?.value ?? getSubBlockValue(accessibleBlockId, 'operation') diff --git a/apps/sim/lib/workflows/blocks/block-outputs.ts b/apps/sim/lib/workflows/blocks/block-outputs.ts index 72b1ea6cf9..309659d47d 100644 --- a/apps/sim/lib/workflows/blocks/block-outputs.ts +++ b/apps/sim/lib/workflows/blocks/block-outputs.ts @@ -225,7 +225,14 @@ export function getBlockOutputs( return getUnifiedStartOutputs(subBlocks) } - if (blockType === 'approval' || blockType === 'human_in_the_loop') { + if (blockType === 'human_in_the_loop') { + // For human_in_the_loop, only expose url (inputFormat fields are only available after resume) + return { + url: { type: 'string', description: 'Resume UI URL' }, + } + } + + if (blockType === 'approval') { // Start with only url (apiUrl commented out - not accessible as output) const pauseResumeOutputs: Record = { url: { type: 'string', description: 'Resume UI URL' },