feat: Part 2 - Workflow Frontend Execute Integration
Deploy Development / deploy (push) Successful in 50s
Build Test / lint-backend (push) Successful in 1s
Build Test / build-frontend (push) Successful in 18s

Frontend-Komponenten für Workflow-Ausführung implementiert:

**Neue Komponenten:**
- WorkflowExecutePanel.jsx (~140 Zeilen)
  - Execute Button mit Loading State
  - Debug Mode Toggle
  - Error Handling Display

- WorkflowResultViewer.jsx (~300 Zeilen)
  - Fixed Panel (rechts, 600px)
  - Final Output mit Copy-Button
  - Node States (collapsible, Debug Mode)
  - All Signals Display
  - Error Display

**Integration:**
- WorkflowEditorPage.jsx
  - ExecutePanel in Toolbar
  - executionResult State
  - handleExecutionComplete Handler
  - Slug wird beim Erstellen gespeichert

**API:**
- api.executeWorkflow(slug, variables, debug, save)
  - Nutzt /prompts/execute Endpoint
  - Debug Mode Default: true

**Part 2 Status:** ~80% abgeschlossen
- ✅ Execute Button
- ✅ Result Viewer
- ⏸️ Execution History (später entscheiden)

Version: v0.9o
Date: 2026-04-09

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Opus 4.6 committed 2026-04-09 12:58:03 +02:00
1 parent 01e328b6b4
commit 46d39bad38
5 files changed
+479 -3

No files matched your search

+25 -1
View File
@@ -14,6 +14,8 @@ import { QuestionAugmentationPanel } from '../components/workflow/panels/Questio
import { LogicExpressionEditor } from '../components/workflow/panels/LogicExpressionEditor'
import { FallbackConfig } from '../components/workflow/panels/FallbackConfig'
import { JoinConfig } from '../components/workflow/panels/JoinConfig'
import { WorkflowExecutePanel } from '../components/workflow/panels/WorkflowExecutePanel'
import { WorkflowResultViewer } from '../components/workflow/panels/WorkflowResultViewer'
import '../styles/workflowEditor.css'
// Node-Type Mapping
@@ -44,6 +46,7 @@ export default function WorkflowEditorPage() {
const [loading, setLoading] = useState(false)
const [error, setError] = useState(null)
const [availablePrompts, setAvailablePrompts] = useState([])
const [executionResult, setExecutionResult] = useState(null)
// Load available basis prompts for Analysis nodes
useEffect(() => {
@@ -156,7 +159,7 @@ export default function WorkflowEditorPage() {
graph_data
})
console.log('✅ Workflow created:', result)
setCurrentPrompt({ id: result.id, name: workflowName })
setCurrentPrompt({ id: result.id, slug: result.slug, name: workflowName })
alert('Workflow erstellt!')
console.log('🚀 Navigating to:', `/workflow-editor/${result.id}`)
navigate(`/workflow-editor/${result.id}`)
@@ -249,6 +252,11 @@ export default function WorkflowEditorPage() {
}
}
const handleExecutionComplete = (result) => {
console.log('🎯 Execution completed:', result)
setExecutionResult(result)
}
// ── Render ────────────────────────────────────────────────────────────────
return (
@@ -273,6 +281,14 @@ export default function WorkflowEditorPage() {
<button className="btn-secondary" onClick={handleValidate}>
Validieren {validationErrors.length > 0 ? `(${validationErrors.length} ⚠️)` : ''}
</button>
{/* Execute Panel */}
<WorkflowExecutePanel
currentPrompt={currentPrompt}
onExecutionComplete={handleExecutionComplete}
disabled={validationErrors.length > 0}
/>
<button
className="btn-primary"
onClick={handleSave}
@@ -498,6 +514,14 @@ export default function WorkflowEditorPage() {
)}
</div>
)}
{/* Execution Result Viewer */}
{executionResult && (
<WorkflowResultViewer
result={executionResult}
onClose={() => setExecutionResult(null)}
/>
)}
</div>
)
}