File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed
app/workspace/[workspaceId]/w/[workflowId]/hooks Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ export function useAccessibleReferencePrefixes(blockId?: string | null): Set<str
3030 const starterBlock = Object . values ( blocks ) . find (
3131 ( block ) => block . type === 'starter' || block . type === 'start_trigger'
3232 )
33- if ( starterBlock ) {
33+ if ( starterBlock && ancestorIds . includes ( starterBlock . id ) ) {
3434 accessibleIds . add ( starterBlock . id )
3535 }
3636
Original file line number Diff line number Diff line change @@ -85,9 +85,10 @@ export class BlockPathCalculator {
8585 const pathNodes = BlockPathCalculator . findAllPathNodes ( workflow . connections , block . id )
8686 pathNodes . forEach ( ( nodeId ) => accessibleBlocks . add ( nodeId ) )
8787
88- // Always allow referencing the starter block (special case)
88+ // Only add starter block if it's actually upstream (already in pathNodes)
89+ // Don't add it just because it exists on the canvas
8990 const starterBlock = workflow . blocks . find ( ( b ) => b . metadata ?. id === 'starter' )
90- if ( starterBlock && starterBlock . id !== block . id ) {
91+ if ( starterBlock && starterBlock . id !== block . id && pathNodes . includes ( starterBlock . id ) ) {
9192 accessibleBlocks . add ( starterBlock . id )
9293 }
9394
Original file line number Diff line number Diff line change @@ -592,7 +592,9 @@ export class Serializer {
592592 const accessibleIds = new Set < string > ( ancestorIds )
593593 accessibleIds . add ( blockId )
594594
595- if ( starterBlock ) {
595+ // Only add starter block if it's actually upstream (already in ancestorIds)
596+ // Don't add it just because it exists on the canvas
597+ if ( starterBlock && ancestorIds . includes ( starterBlock . id ) ) {
596598 accessibleIds . add ( starterBlock . id )
597599 }
598600
You can’t perform that action at this time.
0 commit comments