Separate editing from running with a draft/publish split

Edits autosave to flow.draft.json and nodes.draft/ instead of the files the
engine reads, so the pipeline keeps running the published version until
someone publishes. Every save carries the version it was based on: a second
client editing the same flow is refused with 409 and offered the choice
between their version and its own, rather than silently overwriting.

Draft saves no longer rebuild the pipeline; validation and node status for a
draft come from a throwaway build that never touches live state.

Also fixes a latent bug where an empty state backend is falsy, so Pipeline
quietly built itself a second, private state and left message history empty.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Melvin Strobl
2026-08-15 23:13:15 +02:00
co-authored by Claude Fable 5
parent 36be6f1081
commit 606ab3c423
18 changed files with 1159 additions and 132 deletions
+12
View File
@@ -8,8 +8,20 @@ Deferring because out of scope is fine, but don't mention deferring than.
## Open
- BUG/UI: enlarge the icon in the sidebar slightly
- BUG/UI: clicking outside the panel does not discard the flow edit panel
- BUG/UI: the graph showed in the node edit panel should also be shown for a specific edge inside the pop-up panel when clicking the edge
- BUG/UI: the "run" button in the toolbar should be stateful; i.e. when a flow is running (i.e. with nodes that automatically emit data such as triggers), it should be possible to pause the flow and resume it. Also for flows without a trigger, the button should change state to allow interrupting a running node
- BUG/UI: the enlarged panel (for code editing) should still maintain its floating style
- BUG/UI: `SidePanel`'s mobile branch does not set `data-testid` on the `SheetContent`, so
`[data-testid=node-panel]` does not exist on a phone. Mobile specs cannot address the panel.
- CHORE/API: node source saves carry no version precondition, so two clients editing the same
node's code are last-writer-wins. The flow document is what the optimistic lock protects;
code files would need their own, and an exact-match one produces false conflicts against a
single client's own interleaved flow and source saves.
- FEAT/UI: publishing and discarding are only reachable while no side panel is open, since the
floating chrome hides for the panel. Editing a node's code and publishing it is therefore
close-panel-then-publish.
- FEAT/UI: no way to point a node parameter at a stored secret. The store and the
`{"$secret": "name"}` reference both work, but the params form only produces literals, so a
webhook secret typed there lands in `flow.json`.