Flow inputs and outputs are visible and editable in the UI

A flow's inputs are the messages it takes from outside — a dashboard control,
a run, the API — and its outputs are what a batch run reports. Both existed in
the document and in the engine, and neither had any UI: the values looked
hard-coded on the canvas and the Run button always used the declared defaults.

The canvas now draws each as a labelled endpoint, the way it already draws a
dashboard tile or another flow, skipping an input something else already
accounts for. The flow panel edits them — mode, name, type, starting value,
and for a live flow the value it currently holds with a way to put a new one
in. Pressing Run on a batch flow asks for its parameters first.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NUb8YpL2s3gmN9WTACTt4q
This commit is contained in:
2026-08-20 18:10:16 +02:00
co-authored by Claude Opus 5
parent 4355c917f8
commit f1e13cdcd4
10 changed files with 644 additions and 22 deletions
+21 -1
View File
@@ -29,12 +29,19 @@ test.beforeAll(async ({ browser }) => {
{
id: "sink",
type: "python",
requires: [{ name: "level", port: "level", dtype: "float" }],
requires: [
{ name: "level", port: "level", dtype: "float" },
{ name: "ceiling", port: "ceiling", dtype: "float" },
],
provides: [],
},
],
inputs: [
{ spec: { name: "level", port: "level", dtype: "float" }, initial: 0 },
{
spec: { name: "ceiling", port: "ceiling", dtype: "float" },
initial: 30,
},
],
version: 1,
},
@@ -88,6 +95,19 @@ test("a dashboard control is drawn on the flow it feeds", async ({ page }) => {
await expect(page.getByText("Lever")).toBeVisible()
})
test("an input nothing else writes is drawn, and the wired one is not", async ({
page,
}) => {
await page.goto(`/flows/${flowName}`)
await page.waitForSelector(".react-flow__node")
// The flow declares it and no node computes it, so it needs a visible
// origin. `level` already has one — the control below — and a second label
// saying the same thing would only be in the way.
await expect(page.getByText("ceiling")).toBeVisible()
await expect(page.getByText("level")).toHaveCount(0)
})
test("the dashboard is never stored as a node of the flow", async ({
page,
}) => {