fix: Save prompt_name in graph_data for readable node display
Bug:
- Analysis nodes showed "Prompt #7edc6d6b-6cd5..." in canvas
- After re-selecting prompt, showed readable name "Pipeline: Ernährungs-Analyse"
- After loading workflow, showed UUID again
Root Cause:
- Serializer saved only prompt_id, not prompt_name
- Deserializer expected prompt_name but got null
- AnalysisNode fallback logic: data.prompt_name || `Prompt #{prompt_id}`
- Result: Showed UUID as fallback
Fix:
- workflowSerializer.js line 25: Added prompt_name to serialization
- Now saves both prompt_id AND prompt_name in graph_data
- On load: prompt_name is restored → AnalysisNode shows readable name
Testing:
- Create workflow with analysis node + prompt selection
- Save → Canvas should show "Pipeline: Körper-Analyse" (not UUID)
- Reload → Canvas should still show readable name (not UUID)
This commit is contained in:
parent
d9bcaaaac6
commit
cab5758b0d
|
|
@ -22,6 +22,7 @@ export function serializeToWorkflowGraph(nodes, edges, metadata = {}) {
|
|||
// Type-spezifische Felder
|
||||
...(node.type === 'analysis' && {
|
||||
prompt_id: node.data.prompt_id || null,
|
||||
prompt_name: node.data.prompt_name || null,
|
||||
questions: node.data.questions || [],
|
||||
fallback_strategy: node.data.fallback_strategy || 'conservative_skip'
|
||||
}),
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user