Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
Expand Up@@ -639,7 +639,8 @@ export const TagDropdown: React.FC<TagDropdownProps> = ({
}

blockTags = ensureRootTag(blockTags, normalizedBlockName)
const shouldShowRootTag = sourceBlock.type === TRIGGER_TYPES.GENERIC_WEBHOOK
const shouldShowRootTag =
sourceBlock.type === TRIGGER_TYPES.GENERIC_WEBHOOK || sourceBlock.type === 'start_trigger'
Comment on lines +642 to +643

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: use constant TRIGGER_TYPES.START instead of string literal

Suggested change
constshouldShowRootTag=
sourceBlock.type===TRIGGER_TYPES.GENERIC_WEBHOOK||sourceBlock.type==='start_trigger'
constshouldShowRootTag=
sourceBlock.type===TRIGGER_TYPES.GENERIC_WEBHOOK||sourceBlock.type===TRIGGER_TYPES.START
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown.tsx
Line: 642:643
Comment:
**style:** use constant `TRIGGER_TYPES.START` instead of string literal
```suggestion const shouldShowRootTag = sourceBlock.type === TRIGGER_TYPES.GENERIC_WEBHOOK || sourceBlock.type === TRIGGER_TYPES.START```
How can I resolve this? If you propose a fix, please make it concise.

if (!shouldShowRootTag) {
blockTags = blockTags.filter((tag) => tag !== normalizedBlockName)
}
Expand DownExpand Up@@ -951,7 +952,9 @@ export const TagDropdown: React.FC<TagDropdownProps> = ({
}

blockTags = ensureRootTag(blockTags, normalizedBlockName)
const shouldShowRootTag = accessibleBlock.type === TRIGGER_TYPES.GENERIC_WEBHOOK
const shouldShowRootTag =
accessibleBlock.type === TRIGGER_TYPES.GENERIC_WEBHOOK ||
accessibleBlock.type === 'start_trigger'
Comment on lines +955 to +957

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: use constant TRIGGER_TYPES.START instead of string literal

Suggested change
constshouldShowRootTag=
accessibleBlock.type===TRIGGER_TYPES.GENERIC_WEBHOOK||
accessibleBlock.type==='start_trigger'
constshouldShowRootTag=
accessibleBlock.type===TRIGGER_TYPES.GENERIC_WEBHOOK||
accessibleBlock.type===TRIGGER_TYPES.START
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown.tsx
Line: 955:957
Comment:
**style:** use constant `TRIGGER_TYPES.START` instead of string literal
```suggestion const shouldShowRootTag = accessibleBlock.type === TRIGGER_TYPES.GENERIC_WEBHOOK || accessibleBlock.type === TRIGGER_TYPES.START```
How can I resolve this? If you propose a fix, please make it concise.

if (!shouldShowRootTag) {
blockTags = blockTags.filter((tag) => tag !== normalizedBlockName)
}
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -27,7 +27,9 @@ export function useAccessibleReferencePrefixes(blockId?: string | null): Set<str
const accessibleIds = new Set<string>(ancestorIds)
accessibleIds.add(blockId)

const starterBlock = Object.values(blocks).find((block) => block.type === 'starter')
const starterBlock = Object.values(blocks).find(
(block) => block.type === 'starter' || block.type === 'start_trigger'
)
Comment on lines +30 to +32

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: use constant TRIGGER_TYPES.START instead of string literal. Import TRIGGER_TYPES from @/lib/workflows/triggers

Suggested change
conststarterBlock=Object.values(blocks).find(
(block)=>block.type==='starter'||block.type==='start_trigger'
)
conststarterBlock=Object.values(blocks).find(
(block)=>block.type==='starter'||block.type===TRIGGER_TYPES.START
)
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-accessible-reference-prefixes.ts
Line: 30:32
Comment:
**style:** use constant `TRIGGER_TYPES.START` instead of string literal. Import `TRIGGER_TYPES` from `@/lib/workflows/triggers````suggestion const starterBlock = Object.values(blocks).find( (block) => block.type === 'starter' || block.type === TRIGGER_TYPES.START )```
How can I resolve this? If you propose a fix, please make it concise.

if (starterBlock) {
accessibleIds.add(starterBlock.id)
}
Expand Down
4 changes: 3 additions & 1 deletion apps/sim/lib/workflows/block-outputs.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -36,7 +36,9 @@ function normalizeInputFormatValue(inputFormatValue: any): InputFormatField[] {
return []
}

return inputFormatValue.filter((field) => field && typeof field === 'object')
return inputFormatValue.filter(
(field) => field && typeof field === 'object' && field.name && field.name.trim() !== ''
)
}

function applyInputFormatFields(
Expand Down