AP1.5c: Rekursive Projects fuer Mega-Programme ohne Stream-Typ.
Deploy Development / deploy (push) Successful in 53s
Test Suite / pytest-backend (push) Successful in 1m42s
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 21s
Test Suite / playwright-smoke (push) Successful in 14s

parent_project_id und container_kind ermoeglichen verschachtelte Projektstruktur; Arbeitspakete bleiben an Blatt-Projekten gebunden.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-07-06 08:38:58 +02:00
1 parent 6eeddfdc76
commit 4ca0a2c460
15 files changed
+947 -91

No files matched your search

@@ -67,6 +67,7 @@ import { listSteeringMethods, updateInitiativeSteeringMethod } from '../api/stee
import { useCapabilities } from '../hooks/useCapabilities.js'
import { useActors } from '../hooks/useActors.js'
import { useSession } from './SessionContext.jsx'
import { collectProjectSubtreeIds } from '../utils/projectTree.js'
const InitiativeOperationsContext = createContext(null)
@@ -154,17 +155,25 @@ export function InitiativeOperationsProvider({ children }) {
load()
}, [load])
const selectedLeafProjectId = useMemo(() => {
if (!selectedProjectId) return ''
const match = projects.find((p) => p.id === selectedProjectId)
if (match?.is_leaf) return selectedProjectId
return ''
}, [selectedProjectId, projects])
const visibleActions = useMemo(
() => {
let list = hideDone
? actions.filter((a) => a.status !== 'done' && a.status !== 'discarded')
: actions
if (selectedProjectId) {
list = list.filter((a) => a.project_id === selectedProjectId)
const subtreeIds = collectProjectSubtreeIds(projects, selectedProjectId)
list = list.filter((a) => a.project_id && subtreeIds.has(a.project_id))
}
return list
},
[actions, hideDone, selectedProjectId]
[actions, hideDone, selectedProjectId, projects]
)
const actionContextById = useMemo(
@@ -200,7 +209,7 @@ export function InitiativeOperationsProvider({ children }) {
: []
await createInitiativeAction(id, {
...payload,
project_id: payload.project_id || selectedProjectId || undefined,
project_id: payload.project_id || selectedLeafProjectId || undefined,
assigned_actor_ids: assigned,
})
setShowActionForm(false)