From d8db3159d6aae6a2357f53d99a2ebf5fa906bdf8 Mon Sep 17 00:00:00 2001 From: CREDO23 Date: Mon, 1 Jun 2026 21:02:47 +0200 Subject: [PATCH] feat(automations): forward live status and steps to run details panel --- .../[automation_id]/components/run-row.tsx | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/surfsense_web/app/dashboard/[search_space_id]/automations/[automation_id]/components/run-row.tsx b/surfsense_web/app/dashboard/[search_space_id]/automations/[automation_id]/components/run-row.tsx index 3f6a39c35..b48230e3f 100644 --- a/surfsense_web/app/dashboard/[search_space_id]/automations/[automation_id]/components/run-row.tsx +++ b/surfsense_web/app/dashboard/[search_space_id]/automations/[automation_id]/components/run-row.tsx @@ -1,21 +1,21 @@ "use client"; import { ChevronDown, ChevronRight, Hand } from "lucide-react"; import { useState } from "react"; -import type { RunSummary } from "@/contracts/types/automation.types"; +import type { LiveRunSummary } from "@/hooks/use-automation-runs"; import { formatDuration } from "@/lib/automations/run-duration"; import { formatRelativeDate } from "@/lib/format-date"; import { RunDetailsPanel } from "./run-details-panel"; import { RunStatusBadge } from "./run-status-badge"; interface RunRowProps { - run: RunSummary; + run: LiveRunSummary; automationId: number; } /** - * One run row. Click to expand → fetches the full run and shows the - * details panel inline. State is local to each row so multiple panels - * can be open at once (or none). + * One run row. Click to expand → renders the details panel inline. + * Status and step_results come live from the parent's Zero query; the + * panel itself only fetches the heavy REST fields on first expand. */ export function RunRow({ run, automationId }: RunRowProps) { const [open, setOpen] = useState(false); @@ -47,7 +47,14 @@ export function RunRow({ run, automationId }: RunRowProps) { - {open && } + {open && ( + + )} ); }