AP1.15c: Join/Branch-Topologie mit parallel_group und optional_branch.
Deploy Development / deploy (push) Successful in 50s
Test Suite / pytest-backend (push) Successful in 2m18s
Test Suite / lint-backend (push) Successful in 3s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / k6 /api/health Baseline (push) Successful in 18s
Test Suite / playwright-smoke (push) Successful in 13s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-07-11 09:27:56 +02:00
1 parent 364ad44759
commit d7aefed0de
13 files changed
+321 -43

No files matched your search

@@ -19,11 +19,14 @@ function formatDate(value) {
export function GateDesignerNodePanel({
item,
graphState,
criteriaProgress,
onClose,
}) {
if (!item) return null
const graphItem = graphState?.items?.[item.id]
const progress = criteriaProgress?.[item.id]
const closed = progress?.closed ?? 0
const total = progress?.total ?? 0
@@ -69,8 +72,20 @@ export function GateDesignerNodePanel({
)}
</dl>
{item.goal_description && (
<p className="gate-designer-node-panel__goal muted">{item.goal_description}</p>
{item.goal_description && (
<p className="gate-designer-node-panel__goal muted">{item.goal_description}</p>
)}
{graphItem?.parallel_group_keys?.length > 0 && (
<p className="gate-designer-node-panel__topology muted">
Parallel: {graphItem.parallel_group_keys.join(', ')}
</p>
)}
{graphItem?.optional_prerequisites?.length > 0 && (
<p className="gate-designer-node-panel__topology muted">
Optional: {graphItem.optional_prerequisites.length} Zweig(e) — blockieren nicht
</p>
)}
<div className="gate-designer-node-panel__actions">
+38 -13
View File
@@ -15,7 +15,7 @@ import {
loadManualGatePositions,
storeManualGatePositions,
} from '../plan/gateGraphDesigner.js'
import { DESIGNER_EDGE_KINDS, DESIGNER_EDGE_LABELS } from '../plan/gateGraphTopology.js'
import { DESIGNER_EDGE_KINDS, DESIGNER_EDGE_LABELS, edgeKindNeedsGroupKey, resolveDependencyEndpoints } from '../plan/gateGraphTopology.js'
import { LoadingState } from './LoadingState.jsx'
import { ErrorState } from './ErrorState.jsx'
import { EmptyState } from './EmptyState.jsx'
@@ -62,6 +62,7 @@ export function GateGraphDesigner({
busy: busyProp = false,
onCreate,
onGraphChanged,
graphState,
}) {
const viewportRef = useRef(null)
const [dependencies, setDependencies] = useState([])
@@ -73,6 +74,7 @@ export function GateGraphDesigner({
const [error, setError] = useState(null)
const [busyLocal, setBusyLocal] = useState(false)
const [edgeType, setEdgeType] = useState('requires')
const [groupKey, setGroupKey] = useState('phase-1')
const [selectedEdgeId, setSelectedEdgeId] = useState(null)
const [selectedNodeId, setSelectedNodeId] = useState(null)
const [showCreate, setShowCreate] = useState(false)
@@ -150,21 +152,28 @@ export function GateGraphDesigner({
onGraphChanged?.()
}
async function handleCreateEdge(fromId, toId) {
if (!fromId || !toId || fromId === toId) return
async function handleCreateEdge(sourceId, targetId) {
if (!sourceId || !targetId || sourceId === targetId) return
if (edgeKindNeedsGroupKey(edgeType) && !groupKey.trim()) {
setError('Parallelgruppe benötigt einen Schlüssel (group_key).')
return
}
setBusyLocal(true)
setError(null)
try {
let fromItemId = fromId
let toItemId = toId
if (edgeType === 'requires') {
fromItemId = toId
toItemId = fromId
}
await addRoadmapItemDependency(fromItemId, {
const { from_item_id: fromItemId, to_item_id: toItemId } = resolveDependencyEndpoints(
edgeType,
sourceId,
targetId,
)
const body = {
to_item_id: toItemId,
dependency_type: edgeType,
})
}
if (edgeKindNeedsGroupKey(edgeType)) {
body.group_key = groupKey.trim()
}
await addRoadmapItemDependency(fromItemId, body)
await notifyGraphChanged()
} catch (err) {
setError(err?.message || 'Kante konnte nicht angelegt werden.')
@@ -448,6 +457,20 @@ export function GateGraphDesigner({
</label>
)}
{canManage && edgeKindNeedsGroupKey(edgeType) && (
<label className="gate-graph-designer__edge-type">
<span className="muted">Gruppenschlüssel</span>
<input
type="text"
value={groupKey}
maxLength={128}
disabled={busy}
placeholder="z. B. phase-1"
onChange={(e) => setGroupKey(e.target.value)}
/>
</label>
)}
<div className="gate-graph-designer__zoom-group" role="group" aria-label="Zoom">
<button
type="button"
@@ -493,8 +516,9 @@ export function GateGraphDesigner({
{canManage && (
<p className="gate-graph-designer__hint muted">
Vom unteren Punkt eines Gates zur Zielkante ziehen. Doppelklick auf leere Fläche legt ein
Gate an. Klick auf Gate öffnet das Info-Panel.
Vom unteren Punkt ziehen: Voraussetzung/Block/Bezug/Parallel/Optional. Join-Gates
verbinden mehrere Pflicht-Voraussetzungen (AND). Doppelklick auf leere Fläche legt ein
Gate an.
</p>
)}
@@ -627,6 +651,7 @@ export function GateGraphDesigner({
{selectedItem && (
<GateDesignerNodePanel
item={selectedItem}
graphState={graphState}
criteriaProgress={criteriaProgress}
onClose={() => setSelectedNodeId(null)}
/>
+8
View File
@@ -105,6 +105,14 @@ export function GateMapView({ initiativeId, items, graphState: graphStateProp })
<span className="gate-map-view__legend-line gate-map-view__legend-line--related" />
Bezug
</span>
<span className="gate-map-view__legend-item">
<span className="gate-map-view__legend-line gate-map-view__legend-line--parallel" />
Parallel
</span>
<span className="gate-map-view__legend-item">
<span className="gate-map-view__legend-line gate-map-view__legend-line--optional" />
Optional
</span>
</div>
<div className="gate-map-view__canvas-wrap">
@@ -130,6 +130,7 @@ export function GatesPlanPanel({
busy={busy}
onCreate={canManage ? onCreate : undefined}
onGraphChanged={refreshGraphState}
graphState={graphState}
/>
)}
</div>