Skip to content

feat(tag-dropdown): added start block to tag dropdown by default - #1922

Merged
waleedlatif1 merged 1 commit into
stagingfrom
feat/tag-drop
Nov 12, 2025
Merged

feat(tag-dropdown): added start block to tag dropdown by default#1922
waleedlatif1 merged 1 commit into
stagingfrom
feat/tag-drop

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • added start block to tag dropdown by default

Type of Change

  • Bug fix

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercelBot commented Nov 12, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
ProjectDeploymentPreviewCommentsUpdated (UTC)
docsSkippedSkippedNov 12, 2025 10:13am

@waleedlatif1
waleedlatif1 merged commit 1bd18ee into stagingNov 12, 2025
3 checks passed
@waleedlatif1
waleedlatif1 deleted the feat/tag-drop branch November 12, 2025 10:14
@greptile-apps

Copy link
Copy Markdown
Contributor

Greptile Overview

Greptile Summary

Added support for displaying the start block (start_trigger) in the tag dropdown by default, making it consistent with how generic_webhook blocks are handled. This allows users to reference the root tag of start trigger blocks in their workflows.

  • Extended tag visibility logic to show root tags for start_trigger blocks in tag dropdown
  • Updated accessible reference prefix calculation to include start_trigger blocks alongside legacy starter blocks
  • Added defensive filtering in normalizeInputFormatValue to exclude fields with empty or whitespace-only names, preventing invalid field references

The changes maintain consistency with existing patterns and improve the robustness of input format handling.

Confidence Score: 4/5

  • This PR is safe to merge with minor style improvements recommended
  • The changes are straightforward and improve functionality. String literals should be replaced with constants for maintainability, but this doesn't affect runtime behavior. The defensive filtering in block-outputs.ts is a positive improvement that prevents invalid references.
  • No files require special attention. The style suggestions are minor improvements that enhance code consistency.

Important Files Changed

File Analysis

FilenameScoreOverview
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown.tsx4/5added start_trigger type check to show root tag for start blocks; should use constant instead of string literal
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-accessible-reference-prefixes.ts4/5updated to include start_trigger blocks when finding accessible reference prefixes; should use constant instead of string literal
apps/sim/lib/workflows/block-outputs.ts5/5added defensive filtering to exclude fields with empty names in normalizeInputFormatValue; consistent with existing patterns

Sequence Diagram

sequenceDiagram
participant User
participant TagDropdown
participant BlockOutputs
participant AccessiblePrefixes
participant WorkflowStore
User->>TagDropdown: Types < to trigger dropdown
TagDropdown->>AccessiblePrefixes: Get accessible blocks
AccessiblePrefixes->>WorkflowStore: Query blocks, edges, loops, parallels
AccessiblePrefixes->>AccessiblePrefixes: Find starter/start_trigger block
AccessiblePrefixes-->>TagDropdown: Return accessible block IDs
TagDropdown->>BlockOutputs: Get output paths for each block
BlockOutputs->>BlockOutputs: Filter empty field names
BlockOutputs-->>TagDropdown: Return valid output paths
TagDropdown->>TagDropdown: Check if root tag should show
Note over TagDropdown: Shows root tag for<br/>generic_webhook OR start_trigger
TagDropdown->>TagDropdown: Build tag list with block outputs
TagDropdown-->>User: Display filtered tags in dropdown
Loading

@greptile-appsgreptile-appsBot left a comment

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.

3 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

Comment on lines +642 to +643
const shouldShowRootTag =
sourceBlock.type === TRIGGER_TYPES.GENERIC_WEBHOOK || sourceBlock.type === 'start_trigger'

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.

Comment on lines +955 to +957
const shouldShowRootTag =
accessibleBlock.type === TRIGGER_TYPES.GENERIC_WEBHOOK ||
accessibleBlock.type === 'start_trigger'

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.

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

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.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@waleedlatif1