Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
Display wait action status as success in UI (#SKY-5901) (#4806)
Celal Zamanoğlue051f2ce0178
diff --git a/skyvern-frontend/src/routes/tasks/detail/hooks/useActions.ts b/skyvern-frontend/src/routes/tasks/detail/hooks/useActions.tsindex 5e1ac7082..412b363c5 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.tsxindex bdc518f77..d67317056 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.tsxindex 25e1cf59f..042b6a470 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 (<ItemStatusIndicator failure={!success} success={success} offset="-0.7rem">