From a703ef4c629c922b3a7a658f26e7f0b79441d321 Mon Sep 17 00:00:00 2001 From: Shuchang Zheng Date: Tue, 24 Dec 2024 05:36:10 -0800 Subject: [PATCH] Choose the latest action in timeline (#1435) --- skyvern-frontend/src/router.tsx | 4 ++++ .../routes/workflows/workflowRun/WorkflowRunOverview.tsx | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/skyvern-frontend/src/router.tsx b/skyvern-frontend/src/router.tsx index aad16219..74ec6eef 100644 --- a/skyvern-frontend/src/router.tsx +++ b/skyvern-frontend/src/router.tsx @@ -117,6 +117,10 @@ const router = createBrowserRouter([ index: true, element: , }, + { + path: "blocks", + element: , + }, { path: "overview", element: , diff --git a/skyvern-frontend/src/routes/workflows/workflowRun/WorkflowRunOverview.tsx b/skyvern-frontend/src/routes/workflows/workflowRun/WorkflowRunOverview.tsx index af415dce..988254f6 100644 --- a/skyvern-frontend/src/routes/workflows/workflowRun/WorkflowRunOverview.tsx +++ b/skyvern-frontend/src/routes/workflows/workflowRun/WorkflowRunOverview.tsx @@ -67,8 +67,10 @@ function WorkflowRunOverview() { timelineItem.block.actions && timelineItem.block.actions.length > 0 ) { - return timelineItem.block - .actions[0] as WorkflowRunOverviewActiveElement; + const last = timelineItem.block.actions.length - 1; + return timelineItem.block.actions[ + last + ] as WorkflowRunOverviewActiveElement; } return timelineItem.block; }