Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(assistant-ui): correct tool timeline rendering for empty state

Steven Enamakelbb4377fe4728
diff --git a/app/src/components/assistant-ui/elements/tool-timeline.tsx b/app/src/components/assistant-ui/elements/tool-timeline.tsx
index 0eecbd42be..5bd1f68492 100644
--- a/app/src/components/assistant-ui/elements/tool-timeline.tsx
+++ b/app/src/components/assistant-ui/elements/tool-timeline.tsx
@@ -12,6 +12,15 @@
* - `children` may replace `steps`: a live chat step is a full tool-call
* element (it expands, carries approvals), not only a verb and a chip.
* - Step keys are positional; two steps may share a chip.
+ * - `forceMount` on the content: Radix's default unmounts children entirely
+ * while closed, which both skips the CSS collapse animation
+ * (`animate-collapsible-up`/`-down` need the node present to measure) and,
+ * for a caller passing `children` that carry their own uncontrolled
+ * disclosure state (e.g. `ToolTimelineAdapter`'s per-row expand/collapse),
+ * would reset that state every time the outer group re-collapses. Staying
+ * mounted and letting `hidden`/the animation classes handle visibility
+ * matches the "hidden, never wiped" contract every other collapsible
+ * surface in this app already follows.
*/
import { cn } from '@/components/assistant-ui/lib/utils';
import {