Topologies UI: a "Run" tab for durable runs with live progress
New TopologyRun component: pick a topology + roles + task, enqueue via
POST /api/topologies/run (202), then poll GET /api/topology-runs/{id} for
live turn-by-turn progress — rendering the per-step checkpoint while running
and the final RunRecord (+ final output) when completed, with a status badge
and recent-runs list. Added as the middle "run" tab in the workbench.
Since the work runs server-side as a durable job, a long-horizon run survives
navigation/restarts; the UI just re-attaches by polling. lint + typecheck +
next build clean. (Also fixed a pre-existing set-state-in-effect lint error in
TopologyCompare surfaced by the Next 16 toolchain.)
Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
272669e1f5
commit
f0963a46b4
@@ -6,12 +6,14 @@ import type { CatalogEntry } from "@/lib/api/topology";
|
||||
|
||||
import { TopologyCompare } from "./TopologyCompare";
|
||||
import { TopologyExplorer } from "./TopologyExplorer";
|
||||
import { TopologyRun } from "./TopologyRun";
|
||||
|
||||
const TABS = ["build", "compare"] as const;
|
||||
const TABS = ["build", "run", "compare"] as const;
|
||||
type Tab = (typeof TABS)[number];
|
||||
|
||||
/** Tabbed topology workbench: Build (catalog + visualizer) and Compare
|
||||
* (run a task across topologies → leaderboard + Pareto). */
|
||||
/** Tabbed topology workbench: Build (catalog + visualizer), Run (one topology
|
||||
* as a durable job with live progress), and Compare (a task across topologies
|
||||
* → leaderboard + Pareto). */
|
||||
export function TopologyWorkbench({ catalog }: { catalog: CatalogEntry[] }) {
|
||||
const [tab, setTab] = useState<Tab>("build");
|
||||
return (
|
||||
@@ -36,6 +38,8 @@ export function TopologyWorkbench({ catalog }: { catalog: CatalogEntry[] }) {
|
||||
</div>
|
||||
{tab === "build" ? (
|
||||
<TopologyExplorer catalog={catalog} />
|
||||
) : tab === "run" ? (
|
||||
<TopologyRun catalog={catalog} />
|
||||
) : (
|
||||
<TopologyCompare catalog={catalog} />
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user