improve: Show question ID in placeholder descriptions
All checks were successful
Deploy Development / deploy (push) Successful in 55s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 15s

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 <noreply@anthropic.com>
This commit is contained in:
Lars 2026-04-09 20:54:43 +02:00
parent 3e93dbbc89
commit f9c244bf48

View File

@ -375,13 +375,14 @@ function extractWorkflowPlaceholders(nodes) {
// Signals und Fragen für Analysis Nodes // Signals und Fragen für Analysis Nodes
if (node.type === 'analysis' && node.data.questions && node.data.questions.length > 0) { if (node.type === 'analysis' && node.data.questions && node.data.questions.length > 0) {
node.data.questions.forEach((q, qIdx) => { node.data.questions.forEach((q, qIdx) => {
const questionId = q.id || `q${qIdx + 1}`
const questionType = q.type || `q${qIdx + 1}` const questionType = q.type || `q${qIdx + 1}`
const questionText = q.question || `Frage ${qIdx + 1}` const questionText = q.question || `Frage ${qIdx + 1}`
// Signal-Platzhalter (Antwort) // Signal-Platzhalter (Antwort)
placeholders.push({ placeholders.push({
placeholder: `{{ ${nodeId}.signal_${questionType} }}`, 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: '📊', icon: '📊',
category: 'Workflow - Signals' category: 'Workflow - Signals'
}) })
@ -389,7 +390,7 @@ function extractWorkflowPlaceholders(nodes) {
// Frage-Text-Platzhalter // Frage-Text-Platzhalter
placeholders.push({ placeholders.push({
placeholder: `{{ ${nodeId}.question_${questionType} }}`, 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: '❓', icon: '❓',
category: 'Workflow - Questions' category: 'Workflow - Questions'
}) })