diff --git a/skyvern-frontend/src/routes/workflows/WorkflowPage.tsx b/skyvern-frontend/src/routes/workflows/WorkflowPage.tsx index d7b2353c..ff3bcc6d 100644 --- a/skyvern-frontend/src/routes/workflows/WorkflowPage.tsx +++ b/skyvern-frontend/src/routes/workflows/WorkflowPage.tsx @@ -1,5 +1,5 @@ import { getClient } from "@/api/AxiosClient"; -import { WorkflowRunApiResponse } from "@/api/types"; +import { WorkflowApiResponse, WorkflowRunApiResponse } from "@/api/types"; import { StatusBadge } from "@/components/StatusBadge"; import { Button } from "@/components/ui/button"; import { @@ -10,6 +10,7 @@ import { PaginationNext, PaginationPrevious, } from "@/components/ui/pagination"; +import { Skeleton } from "@/components/ui/skeleton"; import { Table, TableBody, @@ -52,6 +53,17 @@ function WorkflowPage() { }, }); + const { data: workflow, isLoading: workflowIsLoading } = + useQuery({ + queryKey: ["workflow", workflowPermanentId], + queryFn: async () => { + const client = await getClient(credentialGetter); + return client + .get(`/workflows/${workflowPermanentId}`) + .then((response) => response.data); + }, + }); + if (!workflowPermanentId) { return null; // this should never happen } @@ -59,7 +71,19 @@ function WorkflowPage() { return (
-

{workflowPermanentId}

+
+ {workflowIsLoading ? ( + <> + + + + ) : ( + <> +

{workflow?.title}

+

{workflowPermanentId}

+ + )} +