FN-7269: preserve workflow settings and prompts across import
Workflow exports now carry project-specific settings and prompt overrides through import. - Add settingValues and promptOverrides to workflow export envelopes and client API types.\n- Restore imported setting values and prompt overrides onto the freshly created workflow with validation and rollback on failure.\n- Cover custom and built-in workflow round-trips plus invalid restore-map rejection cases.\n- Document portable workflow exports and add a patch changeset.\n\nFiles changed:\n ...7269-workflow-export-import-settings-prompts.md | 7 ++\n docs/workflow-editor.md | 4 +-\n packages/dashboard/app/api/legacy.ts | 10 +-\n .../__tests__/workflow-import-export.test.ts | 113 ++++++++++++++++++++-\n .../src/routes/register-workflow-routes.ts | 86 +++++++++++++++-\n 5 files changed, 210 insertions(+), 10 deletions(-) Fusion-Task-Id: FN-7269 Fusion-Task-Lineage: 718f42d0-c72d-4818-8f8c-979d01e960af Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
This commit is contained in:
@@ -156,8 +156,8 @@ If you switch workflows while an AI design request is in flight, the stale resul
|
||||
|
||||
## Import, export, auto-layout, save, and delete
|
||||
|
||||
- **Export:** downloads the active persisted workflow as a JSON envelope. Export is available for built-ins too because it reads the server's saved definition.
|
||||
- **Import:** choose a JSON workflow envelope to create a workflow from it. Invalid JSON and server validation errors render in a persistent inline error region; non-blocking import warnings render beside it.
|
||||
- **Export:** downloads the active persisted workflow as a JSON envelope. Export is available for built-ins too because it reads the server's saved definition. The envelope includes the Workflow IR, layout, metadata, and the active project's stored workflow setting values and prompt overrides for the selected workflow.
|
||||
- **Import:** choose a JSON workflow envelope to create a workflow from it. Fusion creates a fresh editable workflow id, restores exported setting values and prompt overrides onto that new id, and keeps validating those restored maps against the imported setting declarations and prompt-bearing nodes. Invalid JSON and server validation errors render in a persistent inline error region; non-blocking import warnings render beside it.
|
||||
- **Auto-layout:** applies a left-to-right tidy layout to editable graph nodes. It changes positions only and marks the workflow dirty.
|
||||
- **Save:** custom workflows serialize the current graph, columns, fields, and setting declarations to Workflow IR and update the active workflow. After saving, Fusion compiles the workflow to report whether it can run on the linear engine or must run on the graph interpreter.
|
||||
- **Delete:** deletes the active custom workflow after confirmation. Built-in workflows cannot be deleted.
|
||||
|
||||
Reference in New Issue
Block a user