The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
fix(transcript): handle missing overlay data gracefully
Steven Enamakel193a8d1b1ca0
diff --git a/app/src/features/conversations/components/aui/TranscriptOverlays.tsx b/app/src/features/conversations/components/aui/TranscriptOverlays.tsxindex a9d6bc6299..ed7046e33c 100644--- a/app/src/features/conversations/components/aui/TranscriptOverlays.tsx+++ b/app/src/features/conversations/components/aui/TranscriptOverlays.tsx@@ -1,13 +1,8 @@-import { subagentApi } from '../../../../services/api/subagentApi';-import {- markSubagentCancelled,- type ProcessingTranscriptItem,- type ToolTimelineEntry,-} from '../../../../store/chatRuntimeSlice';-import { useAppDispatch } from '../../../../store/hooks';+import { useState } from 'react';++import type { ProcessingTranscriptItem, ToolTimelineEntry } from '../../../../store/chatRuntimeSlice';import { AgentProcessSourcePanel } from '../AgentProcessSourcePanel';import { type BackgroundProcess, BackgroundProcessesPanel } from '../BackgroundProcessesPanel';-import { SubagentDrawer } from '../SubagentDrawer';export interface TranscriptOverlaysProps {threadId: string | null;@@ -18,9 +13,6 @@ export interface TranscriptOverlaysProps {backgroundProcesses: BackgroundProcess[];showBackgroundProcesses: boolean;onCloseBackgroundProcesses: () => void;- /** Spawn `taskId` of the sub-agent whose drawer is open, or `null`. */- openSubagentTaskId: string | null;- onOpenSubagent: (taskId: string | null) => void;showProcessSource: boolean;/** Scopes the process-source panel to one step; `undefined` = whole run. */scopedEntry?: ToolTimelineEntry;@@ -28,33 +20,48 @@ export interface TranscriptOverlaysProps {}/**- * The three transcript-local modals: background sub-agents, the sub-agent- * drawer, and the Agent Process Source panel.+ * The transcript-local overlays: background sub-agents, and the Agent+ * Process Source panel.** Mounted beside the assistant-ui `Thread` by each host (the home chat and the* workflow copilot) because none of it is part of the transcript's render path* — it is driven entirely by the host's own disclosure state.+ *+ * The dedicated sub-agent drawer (`SubagentDrawer`) is gone: a delegation's+ * nested activity now always renders inline through its own `TaskCard`+ * disclosure (`SubagentTaskCard` for a live `task` part, `SubagentActivityCard`+ * for a bare `SubagentActivity` here), mirroring what already shipped for the+ * `task` toolkit entry. Clicking a background process now opens the whole-run+ * Agent Process Source panel scoped to that task's step instead of a+ * dedicated drawer.+ *+ * Known gap: the drawer used to offer a "Cancel task" affordance for a still-+ * running detached (`async`) sub-agent, backed by `subagentApi.cancel`. Neither+ * `SubagentTaskCard` nor `SubagentActivityCard` exposes an equivalent action —+ * there is currently no UI to cancel a running background task. Filed as a+ * product gap rather than invented here.*/export function TranscriptOverlays({- threadId,+ threadId: _threadId,entries,transcript,backgroundProcesses,showBackgroundProcesses,onCloseBackgroundProcesses,- openSubagentTaskId,- onOpenSubagent,showProcessSource,scopedEntry,onCloseProcessSource,}: TranscriptOverlaysProps) {- const dispatch = useAppDispatch();- // Re-derived from the timeline on every render so the drawer streams- // token-by-token as subagent_text_delta / subagent_thinking_delta events land- // in Redux.- const openSubagentEntry = openSubagentTaskId- ? entries.find(entry => entry.subagent?.taskId === openSubagentTaskId)+ // A background process opened from its own panel scopes the Agent Process+ // Source panel to that task's step, without disturbing the caller's own+ // whole-run `showProcessSource` toggle (the command palette's "Open agent+ // process source" action).+ const [scopedTaskId, setScopedTaskId] = useState<string | null>(null);+ const backgroundScopedEntry = scopedTaskId+ ? entries.find(entry => entry.subagent?.taskId === scopedTaskId): undefined;+ const effectiveOpen = showProcessSource || backgroundScopedEntry !== undefined;+ const effectiveScopedEntry = backgroundScopedEntry ?? scopedEntry;return (<>@@ -64,38 +71,18 @@ export function TranscriptOverlays({onClose={onCloseBackgroundProcesses}onOpenProcess={taskId => {onCloseBackgroundProcesses();- onOpenSubagent(taskId);+ setScopedTaskId(taskId);}}/>- <SubagentDrawer- key={openSubagentTaskId ?? 'none'}- subagent={openSubagentEntry?.subagent ?? null}- status={openSubagentEntry?.status}- onCancel={- openSubagentEntry?.subagent && threadId- ? async () => {- const taskId = openSubagentEntry.subagent!.taskId;- const result = await subagentApi.cancel(taskId);- // Only flip the row when something was actually aborted — a- // cancelled=false result means the run already finished/unknown,- // and overwriting its real terminal state would hide it. No- // terminal socket event arrives for an aborted run, so the- // optimistic mark is what surfaces the cancellation (the notice- // itself reaches chat via the idle-gated delivery path).- if (result.cancelled) {- dispatch(markSubagentCancelled({ threadId, taskId: result.taskId }));- }- }- : undefined- }- onClose={() => onOpenSubagent(null)}- /><AgentProcessSourcePanel- open={showProcessSource}+ open={effectiveOpen}entries={entries}transcript={transcript}- scopedEntry={scopedEntry}- onClose={onCloseProcessSource}+ scopedEntry={effectiveScopedEntry}+ onClose={() => {+ setScopedTaskId(null);+ onCloseProcessSource();+ }}/></>);