New run: reuse asText rather than a second copy of it

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013TTfoK82awm8wvxXhHz3XF
This commit is contained in:
2026-09-02 15:20:31 +02:00
co-authored by Claude Opus 5
parent 5b122341d5
commit 3e4224df53
2 changed files with 4 additions and 10 deletions
+2 -8
View File
@@ -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:<id>.<output> or sha256:…"
if (dtype === "int" || dtype === "float") {
+2 -2
View File
@@ -399,8 +399,8 @@ export function FlowRail({
<FlaskConical className="mb-1 size-4" />
{empty ?? (
<p>
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.
</p>
)}
</div>