refactor: Simplify StartNode component to improve clarity
All checks were successful
Deploy Development / deploy (push) Successful in 57s
Build Test / pytest-backend (push) Successful in 4s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 16s

- Removed the trimming of the analysis title, now displaying only the node label or defaulting to 'Start'.
- Updated documentation to clarify the purpose of properties, specifically distinguishing between display on the canvas and analysis metadata.

These changes enhance the readability and maintainability of the StartNode component in the workflow editor.
This commit is contained in:
Lars 2026-04-11 12:30:10 +02:00
parent 0ce98e8973
commit 4c9e0e3c98

View File

@ -3,16 +3,14 @@ import { Handle, Position } from 'reactflow'
/**
* StartNode - Workflow Einstiegspunkt
*
* Properties:
* - data.label: Node-Label (default: "Start")
* - selected: Boolean (Node ist ausgewählt)
* - data.label: Anzeige auf dem Canvas (Node-Name)
* - data.analysis_title: nur für KI-Analyse-UI, nicht auf dem Canvas
*/
export function StartNode({ data, selected }) {
const title = (data.analysis_title || '').trim()
return (
<div className={`workflow-node start-node ${selected ? 'selected' : ''}`}>
<div className="node-icon">🚀</div>
<div className="node-label">{title || data.label || 'Start'}</div>
<div className="node-label">{data.label || 'Start'}</div>
{/* Nur Source Handle (kein Target, da Einstiegspunkt) */}
<Handle