diff --git a/skyvern-frontend/src/routes/workflows/workflowRun/ActionCard.tsx b/skyvern-frontend/src/routes/workflows/workflowRun/ActionCard.tsx index 86202f88..db93a08c 100644 --- a/skyvern-frontend/src/routes/workflows/workflowRun/ActionCard.tsx +++ b/skyvern-frontend/src/routes/workflows/workflowRun/ActionCard.tsx @@ -19,7 +19,7 @@ function ActionCard({ action, onClick, active, index }: Props) { if (element && active) { element.scrollIntoView({ behavior: "smooth", - block: "center", + block: "start", }); } // this should only run once at mount. diff --git a/skyvern-frontend/src/routes/workflows/workflowRun/ThoughtCard.tsx b/skyvern-frontend/src/routes/workflows/workflowRun/ThoughtCard.tsx index 10d3c538..9d6551ae 100644 --- a/skyvern-frontend/src/routes/workflows/workflowRun/ThoughtCard.tsx +++ b/skyvern-frontend/src/routes/workflows/workflowRun/ThoughtCard.tsx @@ -15,7 +15,7 @@ function ThoughtCard({ thought, onClick, active }: Props) { if (element && active) { element.scrollIntoView({ behavior: "smooth", - block: "center", + block: "start", }); } // this should only run once at mount. diff --git a/skyvern-frontend/src/routes/workflows/workflowRun/WorkflowRunTimelineBlockItem.tsx b/skyvern-frontend/src/routes/workflows/workflowRun/WorkflowRunTimelineBlockItem.tsx index d00cc141..fea16fca 100644 --- a/skyvern-frontend/src/routes/workflows/workflowRun/WorkflowRunTimelineBlockItem.tsx +++ b/skyvern-frontend/src/routes/workflows/workflowRun/WorkflowRunTimelineBlockItem.tsx @@ -1,4 +1,9 @@ -import { CubeIcon, ExternalLinkIcon } from "@radix-ui/react-icons"; +import { + CheckCircledIcon, + CrossCircledIcon, + CubeIcon, + ExternalLinkIcon, +} from "@radix-ui/react-icons"; import { workflowBlockTitle } from "../editor/nodes/types"; import { WorkflowBlockIcon } from "../editor/nodes/WorkflowBlockIcon"; import { @@ -15,6 +20,7 @@ import { cn } from "@/util/utils"; import { isTaskVariantBlock } from "../types/workflowTypes"; import { Link } from "react-router-dom"; import { useCallback } from "react"; +import { Status } from "@/api/types"; type Props = { activeItem: WorkflowRunOverviewActiveElement; @@ -55,13 +61,23 @@ function WorkflowRunTimelineBlockItem({ ) { element.scrollIntoView({ behavior: "smooth", - block: "center", + block: "start", }); } // this should only run once at mount. // eslint-disable-next-line react-hooks/exhaustive-deps }, []); + const showStatusIndicator = block.status !== null; + const showSuccessIndicator = + showStatusIndicator && block.status === Status.Completed; + const showFailureIndicator = + showStatusIndicator && + (block.status === Status.Failed || + block.status === Status.Terminated || + block.status === Status.TimedOut || + block.status === Status.Canceled); + return (
{workflowBlockTitle[block.block_type]}
-
- {showDiagnosticLink ? ( - -
- - Diagnostics -
- - ) : ( - <> - - Block - +
+ {showFailureIndicator && ( +
+ +
)} + {showSuccessIndicator && ( +
+ +
+ )} +
+ {showDiagnosticLink ? ( + +
+ + Diagnostics +
+ + ) : ( + <> + + Block + + )} +
{block.description ? (