|
|
@@ -1,5 +1,5 @@
|
|
|
import { Handle, Position, NodeProps } from 'reactflow'
|
|
|
-import { Play, CheckCircle, XCircle, Loader2 } from 'lucide-react'
|
|
|
+import { Play, CheckCircle, XCircle, Loader2, SkipForward, Ban } from 'lucide-react'
|
|
|
import { NodeIcon } from './NodeIcon'
|
|
|
import { NodeOutput, DynamicOutputs } from '../../api/workflows'
|
|
|
import { PinnedDataBadge } from './PinnedDataBadge'
|
|
|
@@ -20,6 +20,8 @@ export interface IterationResult {
|
|
|
status: 'completed' | 'failed' | 'skipped' | 'disabled'
|
|
|
output?: any
|
|
|
error?: string
|
|
|
+ startedAt?: number
|
|
|
+ completedAt?: number
|
|
|
}
|
|
|
|
|
|
// Calculate handle position for multiple outputs (horizontal distribution for bottom handles)
|
|
|
@@ -95,9 +97,14 @@ export function WorkflowNode({ data, selected }: NodeProps) {
|
|
|
case 'failed':
|
|
|
return { borderColor: '#ef4444', backgroundColor: 'var(--node-failed-bg, #fef2f2)' }
|
|
|
case 'skipped':
|
|
|
+ // A branch not taken: still part of the flow, just not this time.
|
|
|
return { borderColor: '#9ca3af', backgroundColor: 'var(--node-skipped-bg, #f3f4f6)' }
|
|
|
case 'disabled':
|
|
|
- return { borderColor: '#9ca3af', backgroundColor: 'var(--node-skipped-bg, #f3f4f6)' }
|
|
|
+ // Switched off by the author - never ran at all. Dashed border
|
|
|
+ // matches the design-time "off" styling below, so the same visual
|
|
|
+ // language reads the same way whether you're editing or reviewing
|
|
|
+ // a past run.
|
|
|
+ return { borderColor: '#9ca3af', backgroundColor: 'var(--node-skipped-bg, #f3f4f6)', borderStyle: 'dashed' }
|
|
|
default:
|
|
|
return {}
|
|
|
}
|
|
|
@@ -113,8 +120,17 @@ export function WorkflowNode({ data, selected }: NodeProps) {
|
|
|
case 'failed':
|
|
|
return <XCircle className="w-4 h-4 text-red-500" />
|
|
|
case 'skipped':
|
|
|
+ return (
|
|
|
+ <span title="Skipped: on a branch not taken">
|
|
|
+ <SkipForward className="w-4 h-4 text-gray-400 dark:text-gray-500" />
|
|
|
+ </span>
|
|
|
+ )
|
|
|
case 'disabled':
|
|
|
- return <span className="w-4 h-4 text-gray-400 dark:text-gray-500">⊘</span>
|
|
|
+ return (
|
|
|
+ <span title="Disabled: switched off by the author">
|
|
|
+ <Ban className="w-4 h-4 text-gray-400 dark:text-gray-500" />
|
|
|
+ </span>
|
|
|
+ )
|
|
|
default:
|
|
|
return null
|
|
|
}
|