|
|
@@ -18,6 +18,10 @@ interface ExecutionResultsPanelProps {
|
|
|
edges: Edge[]
|
|
|
expandedNodes: Set<string>
|
|
|
selectedIterations: Record<string, number> // Now keyed by loop node ID
|
|
|
+ // When true, ExecutionViewerBanner is on screen and already owns the status
|
|
|
+ // word and timing for this execution - this panel skips its own copy of
|
|
|
+ // that summary rather than showing it twice.
|
|
|
+ isViewingExecution?: boolean
|
|
|
onClose: () => void
|
|
|
onToggleNodeExpansion: (nodeId: string) => void
|
|
|
onSelectIteration: (loopNodeId: string, index: number) => void // Changed: takes loop node ID
|
|
|
@@ -29,6 +33,7 @@ export function ExecutionResultsPanel({
|
|
|
edges,
|
|
|
expandedNodes,
|
|
|
selectedIterations,
|
|
|
+ isViewingExecution = false,
|
|
|
onClose,
|
|
|
onToggleNodeExpansion,
|
|
|
onSelectIteration,
|
|
|
@@ -200,25 +205,29 @@ export function ExecutionResultsPanel({
|
|
|
</button>
|
|
|
</div>
|
|
|
|
|
|
- {/* Execution summary */}
|
|
|
+ {/* Execution summary. While viewing a past execution, ExecutionViewerBanner
|
|
|
+ already shows status and timing at the top of the page - this panel
|
|
|
+ only adds the execution ID, so the two don't repeat each other. */}
|
|
|
<div className="flex-shrink-0 p-4 border-b border-gray-200 dark:border-slate-700">
|
|
|
- <div className="flex items-center gap-2 mb-2">
|
|
|
- <span className="text-sm text-gray-500 dark:text-gray-400">Status:</span>
|
|
|
- <span className={`text-sm font-medium ${
|
|
|
- executionState.status === 'completed' ? 'text-green-600 dark:text-green-400' :
|
|
|
- executionState.status === 'failed' ? 'text-red-600 dark:text-red-400' :
|
|
|
- executionState.status === 'running' ? 'text-blue-600 dark:text-blue-400' :
|
|
|
- 'text-gray-600 dark:text-gray-400'
|
|
|
- }`}>
|
|
|
- {executionState.status.charAt(0).toUpperCase() + executionState.status.slice(1)}
|
|
|
- </span>
|
|
|
- </div>
|
|
|
+ {!isViewingExecution && (
|
|
|
+ <div className="flex items-center gap-2 mb-2">
|
|
|
+ <span className="text-sm text-gray-500 dark:text-gray-400">Status:</span>
|
|
|
+ <span className={`text-sm font-medium ${
|
|
|
+ executionState.status === 'completed' ? 'text-green-600 dark:text-green-400' :
|
|
|
+ executionState.status === 'failed' ? 'text-red-600 dark:text-red-400' :
|
|
|
+ executionState.status === 'running' ? 'text-blue-600 dark:text-blue-400' :
|
|
|
+ 'text-gray-600 dark:text-gray-400'
|
|
|
+ }`}>
|
|
|
+ {executionState.status.charAt(0).toUpperCase() + executionState.status.slice(1)}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
{executionState.executionId && (
|
|
|
<div className="text-xs text-gray-400 dark:text-gray-500 font-mono truncate">
|
|
|
ID: {executionState.executionId}
|
|
|
</div>
|
|
|
)}
|
|
|
- {executionState.startedAt && executionState.completedAt && (
|
|
|
+ {!isViewingExecution && executionState.startedAt && executionState.completedAt && (
|
|
|
<div className="text-xs text-gray-500 dark:text-gray-400 mt-1">
|
|
|
Duration: {((executionState.completedAt - executionState.startedAt) / 1000).toFixed(2)}s
|
|
|
</div>
|