diff --git a/surfsense_web/app/dashboard/[search_space_id]/automations/[automation_id]/components/run-details-panel.tsx b/surfsense_web/app/dashboard/[search_space_id]/automations/[automation_id]/components/run-details-panel.tsx
index f9c6fbb5a..164f156e5 100644
--- a/surfsense_web/app/dashboard/[search_space_id]/automations/[automation_id]/components/run-details-panel.tsx
+++ b/surfsense_web/app/dashboard/[search_space_id]/automations/[automation_id]/components/run-details-panel.tsx
@@ -1,8 +1,24 @@
"use client";
-import { AlertCircle, FileOutput, GitCommitHorizontal, Package, Settings2 } from "lucide-react";
+import {
+ AlertCircle,
+ ChevronDown,
+ FileOutput,
+ GitCommitHorizontal,
+ Package,
+ Settings2,
+} from "lucide-react";
+import { useState } from "react";
import { JsonView } from "@/components/json-view";
+import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
+import { Button } from "@/components/ui/button";
+import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/components/ui/collapsible";
+import { ScrollArea } from "@/components/ui/scroll-area";
+import { Separator } from "@/components/ui/separator";
import { Skeleton } from "@/components/ui/skeleton";
+import type { RunStepResult } from "@/contracts/types/automation.types";
import { useAutomationRun } from "@/hooks/use-automation-runs";
+import { cn } from "@/lib/utils";
+import { RunStepResultCard } from "./run-step-result-card";
interface RunDetailsPanelProps {
automationId: number;
@@ -13,10 +29,11 @@ interface RunDetailsPanelProps {
* Expanded view of a single run. Fetches lazily — the parent only renders
* this once the row is opened, so the list view stays cheap.
*
- * We surface the four most actionable sections (error first when present,
- * then output, step results, artifacts, inputs). The full
- * ``definition_snapshot`` is omitted because it usually mirrors the live
- * definition — surfacing it would dominate the panel without informing
+ * We surface the run outcome readably: a run-level error first (when
+ * present), then per-step cards that render the agent's markdown
+ * ``final_message`` directly, and finally the structural artifacts/inputs.
+ * The full ``definition_snapshot`` is omitted because it usually mirrors the
+ * live definition — surfacing it would dominate the panel without informing
* what the user is trying to learn ("did this work? what did it do?").
*/
export function RunDetailsPanel({ automationId, runId }: RunDetailsPanelProps) {
@@ -24,7 +41,7 @@ export function RunDetailsPanel({ automationId, runId }: RunDetailsPanelProps) {
if (isLoading) {
return (
-
+
@@ -33,53 +50,104 @@ export function RunDetailsPanel({ automationId, runId }: RunDetailsPanelProps) {
if (error || !run) {
return (
-
+
Couldn't load run details{error?.message ? `: ${error.message}` : "."}