Choose the latest action in timeline (#1435)

This commit is contained in:
Shuchang Zheng
2024-12-24 05:36:10 -08:00
committed by GitHub
parent e198132898
commit a703ef4c62
2 changed files with 8 additions and 2 deletions

View File

@@ -117,6 +117,10 @@ const router = createBrowserRouter([
index: true, index: true,
element: <Navigate to="overview" />, element: <Navigate to="overview" />,
}, },
{
path: "blocks",
element: <Navigate to="overview" />,
},
{ {
path: "overview", path: "overview",
element: <WorkflowRunOverview />, element: <WorkflowRunOverview />,

View File

@@ -67,8 +67,10 @@ function WorkflowRunOverview() {
timelineItem.block.actions && timelineItem.block.actions &&
timelineItem.block.actions.length > 0 timelineItem.block.actions.length > 0
) { ) {
return timelineItem.block const last = timelineItem.block.actions.length - 1;
.actions[0] as WorkflowRunOverviewActiveElement; return timelineItem.block.actions[
last
] as WorkflowRunOverviewActiveElement;
} }
return timelineItem.block; return timelineItem.block;
} }