From 093eecdb6ef2e406a70a3270a26a02c7dbb3e382 Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Sat, 28 Feb 2026 13:56:13 -0500 Subject: [PATCH] Convert workflow detail tabs to nested routes Definition at /workflows/:name, Diagram at /workflows/:name/diagram, Runs at /workflows/:name/runs. Detail page is now a layout with Outlet. Co-Authored-By: Claude Opus 4.6 --- apps/arc-web/app/routes.ts | 6 +- .../app/routes/workflow-definition.tsx | 3 + apps/arc-web/app/routes/workflow-detail.tsx | 56 +++++++++---------- apps/arc-web/app/routes/workflow-diagram.tsx | 3 + apps/arc-web/app/routes/workflow-runs.tsx | 3 + 5 files changed, 41 insertions(+), 30 deletions(-) create mode 100644 apps/arc-web/app/routes/workflow-definition.tsx create mode 100644 apps/arc-web/app/routes/workflow-diagram.tsx create mode 100644 apps/arc-web/app/routes/workflow-runs.tsx diff --git a/apps/arc-web/app/routes.ts b/apps/arc-web/app/routes.ts index ad5dd550b..bdc7d7154 100644 --- a/apps/arc-web/app/routes.ts +++ b/apps/arc-web/app/routes.ts @@ -10,7 +10,11 @@ export default [ layout("layouts/app-shell.tsx", [ route("start", "routes/start.tsx"), route("workflows", "routes/workflows.tsx"), - route("workflows/:name", "routes/workflow-detail.tsx"), + route("workflows/:name", "routes/workflow-detail.tsx", [ + index("routes/workflow-definition.tsx"), + route("diagram", "routes/workflow-diagram.tsx"), + route("runs", "routes/workflow-runs.tsx"), + ]), route("runs", "routes/pipelines.tsx"), route("insights", "routes/insights.tsx"), route("settings", "routes/settings.tsx"), diff --git a/apps/arc-web/app/routes/workflow-definition.tsx b/apps/arc-web/app/routes/workflow-definition.tsx new file mode 100644 index 000000000..68c7ed6fe --- /dev/null +++ b/apps/arc-web/app/routes/workflow-definition.tsx @@ -0,0 +1,3 @@ +export default function WorkflowDefinition() { + return

Workflow definition will appear here.

; +} diff --git a/apps/arc-web/app/routes/workflow-detail.tsx b/apps/arc-web/app/routes/workflow-detail.tsx index 1dfa9466b..e5fefb240 100644 --- a/apps/arc-web/app/routes/workflow-detail.tsx +++ b/apps/arc-web/app/routes/workflow-detail.tsx @@ -1,8 +1,7 @@ -import { useState } from "react"; -import { useParams } from "react-router"; +import { Link, Outlet, useLocation, useParams } from "react-router"; import type { Route } from "./+types/workflow-detail"; -const workflowData: Record = { +export const workflowData: Record = { fix_build: { title: "Fix Build", filename: "fix_build.dot", @@ -25,8 +24,11 @@ const workflowData: Record("Definition"); + const basePath = `/workflows/${name}`; if (workflow == null) { return

Workflow not found.

; @@ -55,33 +58,28 @@ export default function WorkflowDetail() {
- {activeTab === "Definition" && ( -

Workflow definition will appear here.

- )} - {activeTab === "Diagram" && ( -

Workflow diagram will appear here.

- )} - {activeTab === "Runs" && ( -

Recent runs will appear here.

- )} +
); diff --git a/apps/arc-web/app/routes/workflow-diagram.tsx b/apps/arc-web/app/routes/workflow-diagram.tsx new file mode 100644 index 000000000..d5f1b2b6f --- /dev/null +++ b/apps/arc-web/app/routes/workflow-diagram.tsx @@ -0,0 +1,3 @@ +export default function WorkflowDiagram() { + return

Workflow diagram will appear here.

; +} diff --git a/apps/arc-web/app/routes/workflow-runs.tsx b/apps/arc-web/app/routes/workflow-runs.tsx new file mode 100644 index 000000000..d6b500876 --- /dev/null +++ b/apps/arc-web/app/routes/workflow-runs.tsx @@ -0,0 +1,3 @@ +export default function WorkflowRuns() { + return

Recent runs will appear here.

; +}