diff --git a/frontend/src/app/pages/Workflows/app/RunMonitor.tsx b/frontend/src/app/pages/Workflows/app/RunMonitor.tsx index b79ef08d..ff0b6645 100644 --- a/frontend/src/app/pages/Workflows/app/RunMonitor.tsx +++ b/frontend/src/app/pages/Workflows/app/RunMonitor.tsx @@ -12,7 +12,6 @@ import { import type { CardType } from '@/shared/state/dashboardLayoutSlice'; import WorkflowTitle from './WorkflowTitle'; -type StepState = 'done' | 'running' | 'failed' | 'pending'; const DRAG_THRESHOLD = 3; function fmtClock(ms: number): string { @@ -131,13 +130,6 @@ const RunMonitor: React.FC = ({ workflow, cardX, cardY, cardWidth, cardHe const succeeded = run?.status === 'success' || run?.status === 'ran_late'; const sessionId = run?.session_id || null; - const stepState = (i: number): StepState => { - if (succeeded) return 'done'; - if (failed) return i < aidx ? 'done' : i === aidx ? 'failed' : 'pending'; - if (isRunning) return i < aidx ? 'done' : i === aidx ? 'running' : 'pending'; - return 'pending'; - }; - const pct = total > 0 ? Math.round((succeeded ? total : Math.min(aidx + (isRunning ? 0.5 : 0), total)) / total * 100) : (isRunning ? 10 : 0); @@ -150,8 +142,12 @@ const RunMonitor: React.FC = ({ workflow, cardX, cardY, cardWidth, cardHe const headColor = isRunning ? c.accent.primary : succeeded ? c.status.success : failed ? c.status.error : c.text.tertiary; const headBg = isRunning ? c.bg.secondary : succeeded ? c.status.successBg : failed ? c.status.errorBg : c.bg.secondary; + const activeStep = total > 0 ? steps[Math.min(aidx, total - 1)] : null; + const activeStepName = activeStep ? (activeStep.label || activeStep.text.trim().slice(0, 60)) : ''; + + const stepPrefix = `Step ${Math.min(aidx + 1, total)} of ${total}`; const progressLabel = isRunning - ? `Step ${Math.min(aidx + 1, total)} of ${total}` + ? (activeStepName ? `${stepPrefix}: ${activeStepName}` : stepPrefix) : succeeded ? `All ${total} steps complete` : failed ? `Failed at step ${Math.min(aidx + 1, total)}` : `${total} steps`; const close = () => dispatch(closeWorkflowMonitor()); @@ -200,35 +196,7 @@ const RunMonitor: React.FC = ({ workflow, cardX, cardY, cardWidth, cardHe
-
{progressLabel}
-
- - {/* workflow steps (bounded; the live chat fills the rest) */} -
- {steps.map((s, i) => { - const st = stepState(i); - const iconBg = st === 'done' ? c.status.success : st === 'failed' ? c.status.error : st === 'running' ? c.accent.primary : c.bg.secondary; - return ( -
-
-
- {st === 'done' && } - {st === 'running' &&
} - {st === 'failed' && } -
- {s.label || s.text.slice(0, 48)} - {st === 'done' && done} -
- {st === 'running' && run?.last_tool_label && ( -
-
- {run.last_tool_label} -
- )} -
- ); - })} - {total === 0 &&
This workflow has no runnable steps.
} +
{progressLabel}
{/* live transcript: read-only (prompts we send, agent responses, tool calls). Reuses AgentChat. */}