Skip to content

Commit 1bd18ee

Browse files
authored
feat(tag-dropdown): added start block to tag dropdown by default (#1922)
1 parent e3e9518 commit 1bd18ee

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,8 @@ export const TagDropdown: React.FC<TagDropdownProps> = ({
639639
}
640640

641641
blockTags = ensureRootTag(blockTags, normalizedBlockName)
642-
const shouldShowRootTag = sourceBlock.type === TRIGGER_TYPES.GENERIC_WEBHOOK
642+
const shouldShowRootTag =
643+
sourceBlock.type === TRIGGER_TYPES.GENERIC_WEBHOOK || sourceBlock.type === 'start_trigger'
643644
if (!shouldShowRootTag) {
644645
blockTags = blockTags.filter((tag) => tag !== normalizedBlockName)
645646
}
@@ -951,7 +952,9 @@ export const TagDropdown: React.FC<TagDropdownProps> = ({
951952
}
952953

953954
blockTags = ensureRootTag(blockTags, normalizedBlockName)
954-
const shouldShowRootTag = accessibleBlock.type === TRIGGER_TYPES.GENERIC_WEBHOOK
955+
const shouldShowRootTag =
956+
accessibleBlock.type === TRIGGER_TYPES.GENERIC_WEBHOOK ||
957+
accessibleBlock.type === 'start_trigger'
955958
if (!shouldShowRootTag) {
956959
blockTags = blockTags.filter((tag) => tag !== normalizedBlockName)
957960
}

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-accessible-reference-prefixes.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ export function useAccessibleReferencePrefixes(blockId?: string | null): Set<str
2727
const accessibleIds = new Set<string>(ancestorIds)
2828
accessibleIds.add(blockId)
2929

30-
const starterBlock = Object.values(blocks).find((block) => block.type === 'starter')
30+
const starterBlock = Object.values(blocks).find(
31+
(block) => block.type === 'starter' || block.type === 'start_trigger'
32+
)
3133
if (starterBlock) {
3234
accessibleIds.add(starterBlock.id)
3335
}

apps/sim/lib/workflows/block-outputs.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ function normalizeInputFormatValue(inputFormatValue: any): InputFormatField[] {
3636
return []
3737
}
3838

39-
return inputFormatValue.filter((field) => field && typeof field === 'object')
39+
return inputFormatValue.filter(
40+
(field) => field && typeof field === 'object' && field.name && field.name.trim() !== ''
41+
)
4042
}
4143

4244
function applyInputFormatFields(

0 commit comments

Comments
 (0)