-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat(tag-dropdown): added start block to tag dropdown by default #1922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile OverviewGreptile SummaryAdded support for displaying the start block (
The changes maintain consistency with existing patterns and improve the robustness of input format handling. Confidence Score: 4/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
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
|
There was a problem hiding this comment.
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
| const shouldShowRootTag = | ||
| sourceBlock.type === TRIGGER_TYPES.GENERIC_WEBHOOK || sourceBlock.type === 'start_trigger' |
There was a problem hiding this comment.
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
| const shouldShowRootTag = | |
| sourceBlock.type === TRIGGER_TYPES.GENERIC_WEBHOOK || sourceBlock.type === 'start_trigger' | |
| const shouldShowRootTag = | |
| 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.| const shouldShowRootTag = | ||
| accessibleBlock.type === TRIGGER_TYPES.GENERIC_WEBHOOK || | ||
| accessibleBlock.type === 'start_trigger' |
There was a problem hiding this comment.
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
| const shouldShowRootTag = | |
| accessibleBlock.type === TRIGGER_TYPES.GENERIC_WEBHOOK || | |
| accessibleBlock.type === 'start_trigger' | |
| const shouldShowRootTag = | |
| 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.| const starterBlock = Object.values(blocks).find( | ||
| (block) => block.type === 'starter' || block.type === 'start_trigger' | ||
| ) |
There was a problem hiding this comment.
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
| const starterBlock = Object.values(blocks).find( | |
| (block) => block.type === 'starter' || block.type === 'start_trigger' | |
| ) | |
| const starterBlock = 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.
Summary
Type of Change
Testing
Tested manually
Checklist