From cab5758b0d0d3b8ece00223c51a6f51ad0f01297 Mon Sep 17 00:00:00 2001 From: Lars Date: Sat, 4 Apr 2026 22:50:40 +0200 Subject: [PATCH] fix: Save prompt_name in graph_data for readable node display MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- frontend/src/utils/workflowSerializer.js | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/utils/workflowSerializer.js b/frontend/src/utils/workflowSerializer.js index 2b1ebce..4983a5b 100644 --- a/frontend/src/utils/workflowSerializer.js +++ b/frontend/src/utils/workflowSerializer.js @@ -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' }),