[eric] workflows: stop endpoint + last_tool_label live subtitle for RunningView

This commit is contained in:
ciregenz
2026-05-21 23:21:09 -07:00
parent 9a2ebc209b
commit a09a8a7eac
5 changed files with 118 additions and 4 deletions
@@ -151,10 +151,10 @@ export function RunningView({ workflow, steps, runs, mode = 'card' }: {
const completeCount = statuses.filter((s) => s === 'done').length;
const total = steps.length;
// Tool-call subtitle for the active step. The backend will emit this on
// workflow:run as `last_tool_label` once slice 5 lands; until then we
// surface a soft placeholder so the row never feels empty.
const activeSubtitle = (run as unknown as { last_tool_label?: string })?.last_tool_label || null;
// Tool-call subtitle for the active step. Backend polls the session's
// messages at 1.5s cadence and broadcasts on workflow:run as the agent
// makes new tool calls. See executor.py _watch_tool_calls.
const activeSubtitle = run?.last_tool_label || null;
const activeDuration = formatLiveDuration(run);
const isLinked = mode === 'sidecar-linked' && card?.sidecarKind === 'watching';
@@ -90,6 +90,8 @@ export interface WorkflowRun {
error: string | null;
cost_usd: number;
triggered_by: 'schedule' | 'manual' | 'retry';
/** Live "what's the agent doing" subtitle while status is 'running'. */
last_tool_label?: string | null;
}
/** Transient view-only state per card; position lives in dashboardLayoutSlice.workflowCards. */