From 474762d6fbd35df62e2726d6b327fcaf15770f0b Mon Sep 17 00:00:00 2001 From: Priyanshu Solanki <97323054+Pbonmars-20031006@users.noreply.github.com> Date: Thu, 18 Dec 2025 19:43:37 -0700 Subject: [PATCH] improvement(hitl): show resume url in tag dropdown within hitl block (#2464) * fixed the human in the loop url resolution: * greptilecomments * greptilecomments --------- Co-authored-by: Pbonmars-20031006@users.noreply.github.com --- .../components/tag-dropdown/tag-dropdown.tsx | 11 +++++++++-- apps/sim/lib/workflows/blocks/block-outputs.ts | 7 +++++++ 2 files changed, 16 insertions(+), 2 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 ea37025f9..3a22efe43 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) @@ -972,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 cdc84b808..309659d47 100644 --- a/apps/sim/lib/workflows/blocks/block-outputs.ts +++ b/apps/sim/lib/workflows/blocks/block-outputs.ts @@ -225,6 +225,13 @@ export function getBlockOutputs( return getUnifiedStartOutputs(subBlocks) } + 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 = {