af7c5ca55a
fix: Workflow execute - prompt_id → prompt_slug
...
Deploy Development / deploy (push) Successful in 55s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 22s
**Problem:**
Execute-Button funktionierte, aber Ausführung scheiterte mit
"Prompt not found: none" im Analysis Node.
**Root Cause:**
Mismatch zwischen Frontend (speicherte prompt_id/UUID) und
Backend (erwartete prompt_slug/String).
Backend WorkflowNode Model (workflow_models.py:193):
prompt_slug: Optional[str] = Field(...)
**Änderungen:**
- WorkflowEditorPage.jsx: Dropdown auf slug umgestellt
- value: prompt_slug statt prompt_id
- onChange: selectedPrompt.slug statt .id
- handleNodeUpdate: prompt_slug speichern
- workflowSerializer.js: Serialization/Deserialization
- Serialize: prompt_slug statt prompt_id
- Deserialize: node.prompt_slug lesen
**Testing:**
- Workflow mit Analysis Node neu erstellen
- Execute-Button sollte jetzt funktionieren
Part 2 Bugfix - Workflow Execution
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 13:59:54 +02:00
cab5758b0d
fix: Save prompt_name in graph_data for readable node display
...
Deploy Development / deploy (push) Successful in 53s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 14s
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)
2026-04-04 22:50:40 +02:00
dc59596f01
feat: Phase 5 - Visual Workflow Editor (Option B)
...
Deploy Development / deploy (push) Failing after 1s
Build Test / lint-backend (push) Successful in 1s
Build Test / build-frontend (push) Successful in 14s
Backend (Mini-Backend 1-2h):
- Migration 016: ai_prompts.graph_data JSONB column
- workflow_executor: graph_data parameter support (backward-compatible)
- prompt_executor: execute_workflow_prompt uses graph_data
Frontend (Main effort 25-35h):
- WorkflowCanvas: React Flow wrapper component
- 5 Custom Nodes: Start, End, Analysis, Logic, Join
- 4 Config Panels: QuestionAugmentation, LogicExpression, Fallback, Join
- workflowValidation: Structural + logical validation
- workflowSerializer: Canvas ↔ JSONB conversion
- WorkflowEditorPage: Main orchestration (420 LOC)
- Route: /workflow-editor/:id
- CSS: workflowEditor.css (300 LOC)
Architecture:
- Option B: ai_prompts.type='workflow' (not separate table)
- panels/ subdirectory for clean separation
- WorkflowCanvas reusable component
- User GUI identical (Workflows = Prompts)
- Backward-compatible (type='pipeline' unchanged)
Version: v0.9m → v0.9n (Phase 5 complete)
Module: workflow 0.5.0 → 0.6.0
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-04 17:56:00 +02:00