File tree Expand file tree Collapse file tree
app/workspace/[workspaceId]/w/[workflowId]
stores/workflows/workflow Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1447,6 +1447,11 @@ const WorkflowContent = React.memo(() => {
14471447
14481448 if ( ! sourceNode || ! targetNode ) return
14491449
1450+ // Prevent connections to/from note blocks (annotation-only, non-executable)
1451+ if ( sourceNode . data ?. type === 'note' || targetNode . data ?. type === 'note' ) {
1452+ return
1453+ }
1454+
14501455 // Prevent incoming connections to trigger blocks (webhook, schedule, etc.)
14511456 if ( targetNode . data ?. config ?. category === 'triggers' ) {
14521457 return
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ export enum BlockType {
2121
2222 WAIT = 'wait' ,
2323
24+ NOTE = 'note' ,
25+
2426 SENTINEL_START = 'sentinel_start' ,
2527 SENTINEL_END = 'sentinel_end' ,
2628}
@@ -31,7 +33,11 @@ export const TRIGGER_BLOCK_TYPES = [
3133 BlockType . TRIGGER ,
3234] as const
3335
34- export const METADATA_ONLY_BLOCK_TYPES = [ BlockType . LOOP , BlockType . PARALLEL ] as const
36+ export const METADATA_ONLY_BLOCK_TYPES = [
37+ BlockType . LOOP ,
38+ BlockType . PARALLEL ,
39+ BlockType . NOTE ,
40+ ] as const
3541
3642export type LoopType = 'for' | 'forEach' | 'while' | 'doWhile'
3743
Original file line number Diff line number Diff line change @@ -422,6 +422,14 @@ export const useWorkflowStore = create<WorkflowStore>()(
422422 } ,
423423
424424 addEdge : ( edge : Edge ) => {
425+ // Prevent connections to/from note blocks (annotation-only, non-executable)
426+ const sourceBlock = get ( ) . blocks [ edge . source ]
427+ const targetBlock = get ( ) . blocks [ edge . target ]
428+
429+ if ( sourceBlock ?. type === 'note' || targetBlock ?. type === 'note' ) {
430+ return
431+ }
432+
425433 // Check for duplicate connections
426434 const isDuplicate = get ( ) . edges . some (
427435 ( existingEdge ) =>
You can’t perform that action at this time.
0 commit comments