diff --git a/frontend/src/components/Runs/NewRun.tsx b/frontend/src/components/Runs/NewRun.tsx index 2167198..c2e03d2 100644 --- a/frontend/src/components/Runs/NewRun.tsx +++ b/frontend/src/components/Runs/NewRun.tsx @@ -9,6 +9,7 @@ import { type fluksio__api__routes__runs__RunRow as RunRow, RunsService, } from "@/client" +import { asText } from "@/components/Flow/NodePanel" import { flowQueryOptions, flowsQueryOptions } from "@/components/Flow/queries" import { declaredInputs, @@ -353,7 +354,7 @@ function RunForm({ flow }: { flow: string }) { ...Object.fromEntries( Object.entries(run.params).map(([key, value]) => [ key, - asParamText(value), + asText(value), ]), ), }) @@ -437,13 +438,6 @@ function submissionKey(): string { return `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}` } -/** A stored parameter back in the field it was typed into. */ -function asParamText(value: unknown): string { - if (value === null || value === undefined) return "" - if (typeof value === "object") return JSON.stringify(value) - return String(value) -} - function placeholderFor(dtype: DType | undefined): string { if (dtype === "artifact") return "@run:. or sha256:…" if (dtype === "int" || dtype === "float") { diff --git a/frontend/src/components/Runs/RunsScreen.tsx b/frontend/src/components/Runs/RunsScreen.tsx index 0f357eb..544ed29 100644 --- a/frontend/src/components/Runs/RunsScreen.tsx +++ b/frontend/src/components/Runs/RunsScreen.tsx @@ -399,8 +399,8 @@ export function FlowRail({ {empty ?? (

- Nothing has been run yet. New run is where to start one, and a - run from the CLI or the API lands here too. + Nothing has been run yet. New run is where to start one, and a run + from the CLI or the API lands here too.

)}