File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
app/workspace/[workspaceId]/w/[workflowId]/hooks Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -548,8 +548,8 @@ export function useWorkflowExecution() {
548548 }
549549 } )
550550
551- // Merge subblock states from the appropriate store
552- const mergedStates = mergeSubblockState ( validBlocks )
551+ // Merge subblock states from the appropriate store (scoped to active workflow)
552+ const mergedStates = mergeSubblockState ( validBlocks , activeWorkflowId )
553553
554554 // Debug: Check for blocks with undefined types after merging
555555 Object . entries ( mergedStates ) . forEach ( ( [ blockId , block ] ) => {
Original file line number Diff line number Diff line change @@ -213,13 +213,24 @@ export class Serializer {
213213
214214 const params : Record < string , any > = { }
215215 const isAdvancedMode = block . advancedMode ?? false
216+ const isStarterBlock = block . type === 'starter'
216217
217218 // First collect all current values from subBlocks, filtering by mode
218219 Object . entries ( block . subBlocks ) . forEach ( ( [ id , subBlock ] ) => {
219220 // Find the corresponding subblock config to check its mode
220221 const subBlockConfig = blockConfig . subBlocks . find ( ( config ) => config . id === id )
221222
222- if ( subBlockConfig && shouldIncludeField ( subBlockConfig , isAdvancedMode ) ) {
223+ // Include field if it matches current mode OR if it's the starter inputFormat with values
224+ const hasStarterInputFormatValues =
225+ isStarterBlock &&
226+ id === 'inputFormat' &&
227+ Array . isArray ( subBlock . value ) &&
228+ subBlock . value . length > 0
229+
230+ if (
231+ subBlockConfig &&
232+ ( shouldIncludeField ( subBlockConfig , isAdvancedMode ) || hasStarterInputFormatValues )
233+ ) {
223234 params [ id ] = subBlock . value
224235 }
225236 } )
You can’t perform that action at this time.
0 commit comments