mirror of
https://github.com/simstudioai/sim.git
synced 2026-02-06 04:35:03 -05:00
fix nested subflow error highlighting
This commit is contained in:
@@ -491,6 +491,13 @@ export function useWorkflowExecution() {
|
||||
updateActiveBlocks(data.blockId, false)
|
||||
setBlockRunStatus(data.blockId, 'error')
|
||||
|
||||
executedBlockIds.add(data.blockId)
|
||||
accumulatedBlockStates.set(data.blockId, {
|
||||
output: { error: data.error },
|
||||
executed: true,
|
||||
executionTime: data.durationMs || 0,
|
||||
})
|
||||
|
||||
accumulatedBlockLogs.push(
|
||||
createBlockLogEntry(data, { success: false, output: {}, error: data.error })
|
||||
)
|
||||
|
||||
@@ -349,7 +349,15 @@ export function PreviewWorkflow({
|
||||
if (block.type === 'loop' || block.type === 'parallel') {
|
||||
const isSelected = selectedBlockId === blockId
|
||||
const dimensions = calculateContainerDimensions(blockId, workflowState.blocks)
|
||||
const subflowExecutionStatus = getSubflowExecutionStatus(blockId)
|
||||
|
||||
// Check for direct error on the subflow block itself (e.g., loop resolution errors)
|
||||
// before falling back to children-derived status
|
||||
const directExecution = blockExecutionMap.get(blockId)
|
||||
const subflowExecutionStatus: ExecutionStatus | undefined =
|
||||
directExecution?.status === 'error'
|
||||
? 'error'
|
||||
: (getSubflowExecutionStatus(blockId) ??
|
||||
(directExecution ? (directExecution.status as ExecutionStatus) : undefined))
|
||||
|
||||
nodeArray.push({
|
||||
id: blockId,
|
||||
|
||||
Reference in New Issue
Block a user