AP1.16c: Durchführungsplan in Plan-Outline und Action-Detail.
Deploy Development / deploy (push) Successful in 46s
Test Suite / pytest-backend (push) Successful in 2m19s
Test Suite / lint-backend (push) Successful in 2s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / k6 /api/health Baseline (push) Successful in 19s
Test Suite / playwright-smoke (push) Successful in 12s

Ready/blocked-Badges, Planning Debt, Vorgänger-Verwaltung — getrennt vom Gate-Designer.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-07-12 11:25:55 +02:00
1 parent 1166a0c7f1
commit 8546c7021b
14 files changed
+583 -20

No files matched your search

+45 -2
View File
@@ -1,12 +1,17 @@
import { useCallback, useEffect, useState } from 'react'
import { Link, useParams } from 'react-router-dom'
import { getAction } from '../api/actions.js'
import { getInitiativeSteeringSnapshot } from '../api/initiatives.js'
import {
getInitiativeSteeringSnapshot,
listInitiativeActions,
} from '../api/initiatives.js'
import { getInitiativeExecutionGraphState } from '../api/executionPlan.js'
import { listInitiativeProjects } from '../api/projects.js'
import { listInitiativeRoadmapItems } from '../api/roadmap.js'
import { updateAction, setActionAssignments } from '../api/actions.js'
import { createInitiativeBlocker } from '../api/blockers.js'
import { ActionHubCard } from '../components/ActionHubCard.jsx'
import { ActionDependenciesSection } from '../components/ActionDependenciesSection.jsx'
import { ActionForm } from '../components/ActionForm.jsx'
import { TasksSection } from '../components/TasksSection.jsx'
import { ErrorState } from '../components/ErrorState.jsx'
@@ -32,6 +37,8 @@ function ActionDetailBody({
actorsState,
projects = [],
roadmapItems = [],
allActions = [],
executionGraph = null,
}) {
if (editing) {
return (
@@ -78,6 +85,13 @@ function ActionDetailBody({
canManage={capabilities.has('kairo.action.manage')}
roadmapItems={roadmapItems}
/>
<ActionDependenciesSection
initiativeId={action.initiative_id}
action={action}
actions={allActions}
graphState={executionGraph}
canManage={capabilities.has('kairo.action.manage')}
/>
</>
)
}
@@ -90,6 +104,8 @@ function ActionDetailStandalone() {
const [action, setAction] = useState(null)
const [projects, setProjects] = useState([])
const [roadmapItems, setRoadmapItems] = useState([])
const [allActions, setAllActions] = useState([])
const [executionGraph, setExecutionGraph] = useState(null)
const [context, setContext] = useState(null)
const [loading, setLoading] = useState(true)
const [error, setError] = useState(null)
@@ -110,13 +126,17 @@ function ActionDetailStandalone() {
href: actionPath(actionData.id),
initiativeId: actionData.initiative_id,
})
const [snap, projectData, roadmapData] = await Promise.all([
const [snap, projectData, roadmapData, actionList, graphState] = await Promise.all([
getInitiativeSteeringSnapshot(actionData.initiative_id),
listInitiativeProjects(actionData.initiative_id).catch(() => []),
listInitiativeRoadmapItems(actionData.initiative_id).catch(() => []),
listInitiativeActions(actionData.initiative_id).catch(() => []),
getInitiativeExecutionGraphState(actionData.initiative_id).catch(() => null),
])
setProjects(projectData)
setRoadmapItems(roadmapData)
setAllActions(Array.isArray(actionList) ? actionList : [])
setExecutionGraph(graphState)
setContext((snap.actions || []).find((a) => a.id === actionId) || null)
} catch (err) {
setError(err.message)
@@ -232,6 +252,8 @@ function ActionDetailStandalone() {
actorsState={actorsState}
projects={projects}
roadmapItems={roadmapItems}
allActions={allActions}
executionGraph={executionGraph}
/>
</section>
</div>
@@ -244,6 +266,25 @@ function ActionDetailNested() {
const action = ops.actions.find((a) => a.id === actionId)
const context = ops.actionContextById[actionId]
const [editing, setEditing] = useState(false)
const [executionGraph, setExecutionGraph] = useState(null)
useEffect(() => {
if (!ops.initiativeId) {
setExecutionGraph(null)
return undefined
}
let cancelled = false
getInitiativeExecutionGraphState(ops.initiativeId)
.then((state) => {
if (!cancelled) setExecutionGraph(state)
})
.catch(() => {
if (!cancelled) setExecutionGraph(null)
})
return () => {
cancelled = true
}
}, [ops.initiativeId, ops.actions.length])
if (!action) {
return <ErrorState message="Arbeitspaket nicht in diesem Vorhaben." onRetry={ops.reload} />
@@ -274,6 +315,8 @@ function ActionDetailNested() {
}}
projects={ops.projects}
roadmapItems={ops.roadmapItems}
allActions={ops.actions}
executionGraph={executionGraph}
/>
</section>
)
+28 -1
View File
@@ -1,13 +1,17 @@
import { RequireInitiativeScope } from '../../components/RequireInitiativeScope.jsx'
import { ScopedInitiativeProvider } from '../../layout/ScopedInitiativeProvider.jsx'
import { PlanActionsSection } from '../../components/PlanActionsSection.jsx'
import { PlanningDebtBanner } from '../../components/PlanningDebtBanner.jsx'
import { LoadingState } from '../../components/LoadingState.jsx'
import { useInitiativeOperations } from '../../context/InitiativeOperationsContext.jsx'
import { useProgramScope } from '../../context/ProgramScopeContext.jsx'
import { useEffect, useState } from 'react'
import { getInitiativeExecutionGraphState } from '../../api/executionPlan.js'
function PlanWorkInner() {
const ops = useInitiativeOperations()
const { projectId: scopeProjectId } = useProgramScope()
const { initiativeId, projectId: scopeProjectId, hrefWithScope } = useProgramScope()
const [executionGraph, setExecutionGraph] = useState(null)
const {
actions,
projects,
@@ -26,6 +30,24 @@ function PlanWorkInner() {
handleCreateAction,
} = ops
useEffect(() => {
if (!initiativeId) {
setExecutionGraph(null)
return undefined
}
let cancelled = false
getInitiativeExecutionGraphState(initiativeId)
.then((state) => {
if (!cancelled) setExecutionGraph(state)
})
.catch(() => {
if (!cancelled) setExecutionGraph(null)
})
return () => {
cancelled = true
}
}, [initiativeId, actions.length])
if (loading) {
return <LoadingState message="Lade Arbeitspakete …" />
}
@@ -33,6 +55,10 @@ function PlanWorkInner() {
return (
<>
{error && <p className="error">{error}</p>}
<PlanningDebtBanner
planningDebt={executionGraph?.planning_debt}
hrefWithScope={hrefWithScope}
/>
<PlanActionsSection
actions={actions}
projects={projects}
@@ -48,6 +74,7 @@ function PlanWorkInner() {
actorsUsedFallback={actorsUsedFallback}
onReloadActors={reloadActors}
busy={formBusy}
executionGraph={executionGraph}
/>
</>
)