From f9c244bf481c562e5782f6efae9f8c6b568d194b Mon Sep 17 00:00:00 2001 From: Lars Date: Thu, 9 Apr 2026 20:54:43 +0200 Subject: [PATCH] improve: Show question ID in placeholder descriptions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Frontend PlaceholderPicker.jsx: - Placeholder descriptions now include question ID (q.id) - Format: "NodeLabel (q21) - Signal type: Question text" - Makes it easier to identify which question a placeholder belongs to Example: Before: "Analysis 4 - Signal: Wie ist die Kalorienbilanz?" After: "Analysis 4 (q21) - Signal kalorienbilanz: Wie ist die Kalorienbilanz?" Shows: - Node label: "Analysis 4" - Question ID: "(q21)" ← User-assigned ID - Question type: "kalorienbilanz" ← Used in placeholder - Question text: "Wie ist..." Placeholder stays: {{ node_4.signal_kalorienbilanz }} But description shows q21 for better identification Version: 0.9p (workflow module) Part 3: End Node Template Engine - UX Improvement Co-Authored-By: Claude Opus 4.6 --- .../src/components/workflow/panels/PlaceholderPicker.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/workflow/panels/PlaceholderPicker.jsx b/frontend/src/components/workflow/panels/PlaceholderPicker.jsx index 1f9b163..d40e983 100644 --- a/frontend/src/components/workflow/panels/PlaceholderPicker.jsx +++ b/frontend/src/components/workflow/panels/PlaceholderPicker.jsx @@ -375,13 +375,14 @@ function extractWorkflowPlaceholders(nodes) { // Signals und Fragen fΓΌr Analysis Nodes if (node.type === 'analysis' && node.data.questions && node.data.questions.length > 0) { node.data.questions.forEach((q, qIdx) => { + const questionId = q.id || `q${qIdx + 1}` const questionType = q.type || `q${qIdx + 1}` const questionText = q.question || `Frage ${qIdx + 1}` // Signal-Platzhalter (Antwort) placeholders.push({ placeholder: `{{ ${nodeId}.signal_${questionType} }}`, - description: `${nodeLabel} - Signal: ${questionText.substring(0, 50)}${questionText.length > 50 ? '...' : ''}`, + description: `${nodeLabel} (${questionId}) - Signal ${questionType}: ${questionText.substring(0, 40)}${questionText.length > 40 ? '...' : ''}`, icon: 'πŸ“Š', category: 'Workflow - Signals' }) @@ -389,7 +390,7 @@ function extractWorkflowPlaceholders(nodes) { // Frage-Text-Platzhalter placeholders.push({ placeholder: `{{ ${nodeId}.question_${questionType} }}`, - description: `${nodeLabel} - Frage-Text: ${questionText.substring(0, 50)}${questionText.length > 50 ? '...' : ''}`, + description: `${nodeLabel} (${questionId}) - Frage ${questionType}: ${questionText.substring(0, 40)}${questionText.length > 40 ? '...' : ''}`, icon: '❓', category: 'Workflow - Questions' })