Skip to content

Commit

Permalink
Update workflow run page (Skyvern-AI#1372)
Browse files Browse the repository at this point in the history
  • Loading branch information
wintonzheng authored Dec 11, 2024
1 parent 9cf4743 commit 7272dad
Show file tree
Hide file tree
Showing 11 changed files with 661 additions and 494 deletions.
27 changes: 27 additions & 0 deletions skyvern-frontend/src/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ import { WorkflowRunParameters } from "./routes/workflows/WorkflowRunParameters"
import { Workflows } from "./routes/workflows/Workflows";
import { WorkflowsPageLayout } from "./routes/workflows/WorkflowsPageLayout";
import { WorkflowEditor } from "./routes/workflows/editor/WorkflowEditor";
import { WorkflowRunBlocks } from "./routes/workflows/workflowRun/WorkflowRunBlocks";
import { WorkflowRunOutput } from "./routes/workflows/workflowRun/WorkflowRunOutput";
import { WorkflowPostRunParameters } from "./routes/workflows/workflowRun/WorkflowPostRunParameters";
import { WorkflowRunRecording } from "./routes/workflows/workflowRun/WorkflowRunRecording";

const router = createBrowserRouter([
{
Expand Down Expand Up @@ -108,6 +112,29 @@ const router = createBrowserRouter([
{
path: ":workflowRunId",
element: <WorkflowRun />,
children: [
{
index: true,
element: <Navigate to="blocks" />,
},
{
path: "blocks",
element: <WorkflowRunBlocks />,
},
{
path: "output",
element: <WorkflowRunOutput />,
},
{
path: "parameters",
element: <WorkflowPostRunParameters />,
},

{
path: "recording",
element: <WorkflowRunRecording />,
},
],
},
],
},
Expand Down
2 changes: 1 addition & 1 deletion skyvern-frontend/src/routes/tasks/detail/TaskDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ function TaskDetails() {
workflow &&
workflowRun && (
<Link
to={`/workflows/${workflow.workflow_permanent_id}/${workflowRun.workflow_run_id}`}
to={`/workflows/${workflow.workflow_permanent_id}/${workflowRun.workflow_run_id}/blocks`}
>
{workflow.title}
</Link>
Expand Down
2 changes: 1 addition & 1 deletion skyvern-frontend/src/routes/workflows/RunWorkflowForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ function RunWorkflowForm({
<ToastAction altText="View">
<Button asChild>
<Link
to={`/workflows/${workflowPermanentId}/${response.data.workflow_run_id}`}
to={`/workflows/${workflowPermanentId}/${response.data.workflow_run_id}/blocks`}
>
View
</Link>
Expand Down
4 changes: 2 additions & 2 deletions skyvern-frontend/src/routes/workflows/WorkflowPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ function WorkflowPage() {
if (event.ctrlKey || event.metaKey) {
window.open(
window.location.origin +
`/workflows/${workflowPermanentId}/${workflowRun.workflow_run_id}`,
`/workflows/${workflowPermanentId}/${workflowRun.workflow_run_id}/blocks`,
"_blank",
"noopener,noreferrer",
);
return;
}
navigate(
`/workflows/${workflowPermanentId}/${workflowRun.workflow_run_id}`,
`/workflows/${workflowPermanentId}/${workflowRun.workflow_run_id}/blocks`,
);
}}
className="cursor-pointer"
Expand Down
Loading

0 comments on commit 7272dad

Please sign in to comment.