From e051f2ce01783d5f981dd6c04d753db2456a6aba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Celal=20Zamano=C4=9Flu?= <95054566+celalzamanoglu@users.noreply.github.com> Date: Thu, 19 Feb 2026 18:21:29 +0300 Subject: [PATCH] Display wait action status as success in UI (#SKY-5901) (#4806) --- .../src/routes/tasks/detail/hooks/useActions.ts | 8 +++++++- .../src/routes/workflows/workflowRun/ActionCard.tsx | 6 +++++- .../routes/workflows/workflowRun/ActionCardMinimal.tsx | 8 ++++++-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/skyvern-frontend/src/routes/tasks/detail/hooks/useActions.ts b/skyvern-frontend/src/routes/tasks/detail/hooks/useActions.ts index 5e1ac708..412b363c 100644 --- a/skyvern-frontend/src/routes/tasks/detail/hooks/useActions.ts +++ b/skyvern-frontend/src/routes/tasks/detail/hooks/useActions.ts @@ -106,7 +106,11 @@ function useActions({ id }: Props): { confidence: action.confidence_float, input: getActionInput(action), type: action.action_type, - success: actionResult?.[0]?.success ?? false, + // Wait actions always succeed — they intentionally return ActionFailure + // from the backend but completing a wait is expected, not a failure. + success: + action.action_type === ActionTypes.wait || + (actionResult?.[0]?.success ?? false), stepId: step.step_id, index, created_by: action.created_by, @@ -121,7 +125,9 @@ function useActions({ id }: Props): { confidence: action.confidence_float ?? undefined, input: action.response ?? "", type: action.action_type, + // Wait actions always succeed — see comment in legacy path above. success: + action.action_type === ActionTypes.wait || action.status === Status.Completed || action.status === Status.Skipped, stepId: action.step_id ?? "", diff --git a/skyvern-frontend/src/routes/workflows/workflowRun/ActionCard.tsx b/skyvern-frontend/src/routes/workflows/workflowRun/ActionCard.tsx index bdc518f7..d6731705 100644 --- a/skyvern-frontend/src/routes/workflows/workflowRun/ActionCard.tsx +++ b/skyvern-frontend/src/routes/workflows/workflowRun/ActionCard.tsx @@ -23,8 +23,12 @@ type Props = { }; function ActionCard({ action, onClick, active, index }: Props) { + // Wait actions always succeed — they intentionally return ActionFailure + // from the backend but completing a wait is expected, not a failure. const success = - action.status === Status.Completed || action.status === Status.Skipped; + action.action_type === ActionTypes.wait || + action.status === Status.Completed || + action.status === Status.Skipped; const refCallback = useCallback((element: HTMLDivElement | null) => { if (element && active) { diff --git a/skyvern-frontend/src/routes/workflows/workflowRun/ActionCardMinimal.tsx b/skyvern-frontend/src/routes/workflows/workflowRun/ActionCardMinimal.tsx index 25e1cf59..042b6a47 100644 --- a/skyvern-frontend/src/routes/workflows/workflowRun/ActionCardMinimal.tsx +++ b/skyvern-frontend/src/routes/workflows/workflowRun/ActionCardMinimal.tsx @@ -1,5 +1,5 @@ import { LightningBoltIcon } from "@radix-ui/react-icons"; -import { ActionsApiResponse, Status } from "@/api/types"; +import { ActionsApiResponse, ActionTypes, Status } from "@/api/types"; import { Tooltip, TooltipContent, @@ -14,8 +14,12 @@ type Props = { }; function ActionCardMinimal({ action }: Props) { + // Wait actions always succeed — they intentionally return ActionFailure + // from the backend but completing a wait is expected, not a failure. const success = - action.status === Status.Completed || action.status === Status.Skipped; + action.action_type === ActionTypes.wait || + action.status === Status.Completed || + action.status === Status.Skipped; return (