feat: ephemeral flows and accept full Flow on create API#479
Merged
Conversation
Add `ephemeral` boolean to FlowProperties — when true, the flow lives only in memory and is never persisted to storage. Toggling from non-ephemeral to ephemeral deletes the stored copy. Frontend exposes this as a checkbox in the flow properties dialog. Change POST /api/flows to accept a full Flow object instead of just name+description. The backend assigns a new ID, clears runtime state, and runs the same validation as update (endpoint trimming, pad computation, link validation, auto-layout). This is extracted into a shared prepare_flow() helper used by both create and update. Simplify frontend import/copy operations from two API calls (create + update) to a single create call. Also removes colons from field labels in the flow properties dialog for consistency. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…te OpenAPI snapshot CreateFlowRequest is unused after the create API was changed to accept a full Flow. Switched create_flow from bare Json to JsonBody for consistent structured error responses. Regenerated openapi.json. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The CreateFlowRequest removal dropped the garde length(1..255) check. Restore equivalent validation directly in the handler. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The create_flow endpoint now accepts a Flow instead of CreateFlowRequest, so the test must send a valid Flow body. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Verify that empty and >255 char names return 400, and that the backend assigns a new ID and clears runtime state on creation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
POST /api/flowsnow accepts a fullFlowbody instead of the limitedCreateFlowRequest, eliminating the create-then-update two-step pattern in frontend import, copy, and gst-launch flowsephemeralflag onFlowProperties— when true, the flow lives only in memory and is never persisted to storage, useful for temporary or API-created flowsCreateFlowRequestwas removedCreateFlowRequesttype and simplifies frontend flow operations (net -57 lines)Test plan
Flowbody — verify it is created with a new ID and cleared runtime statecargo test --test openapi_test— verify snapshot is up to date🤖 Generated with Claude Code