AP2.2d: B2b Product-Backlog und B3 Sprint-Backlog in UI.
Deploy Development / deploy (push) Successful in 46s
Test Suite / pytest-backend (push) Successful in 2m40s
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 13s
Deploy Development / deploy (push) Successful in 46s
Test Suite / pytest-backend (push) Successful in 2m40s
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 13s
Zeitbox-API im Frontend, Plan/Ausführen Sprint-Ansichten, Backlog-Convert in aktiven Sprint. agile_iteration bei aktiver Zeitbox für continuous_product. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
0b57e2ec75
commit
82a5b9adec
27 files changed
+646
-27
No files matched your search
@@ -0,0 +1,111 @@
|
||||
import { useMemo } from 'react'
|
||||
import { RequireInitiativeScope } from '../../components/RequireInitiativeScope.jsx'
|
||||
import { ScopedInitiativeProvider } from '../../layout/ScopedInitiativeProvider.jsx'
|
||||
import { WorkCyclesPanel } from '../../components/WorkCyclesPanel.jsx'
|
||||
import { InitiativeActionsHub } from '../../components/InitiativeActionsHub.jsx'
|
||||
import { LoadingState } from '../../components/LoadingState.jsx'
|
||||
import { useInitiativeOperations } from '../../context/InitiativeOperationsContext.jsx'
|
||||
|
||||
function PlanSprintInner() {
|
||||
const ops = useInitiativeOperations()
|
||||
const {
|
||||
initiativeId,
|
||||
activeWorkCycle,
|
||||
workCycles,
|
||||
sprintActions,
|
||||
projects,
|
||||
roadmapItems,
|
||||
capabilities,
|
||||
hideDone,
|
||||
setHideDone,
|
||||
loading,
|
||||
error,
|
||||
formBusy,
|
||||
showActionForm,
|
||||
setShowActionForm,
|
||||
editingAction,
|
||||
setEditingAction,
|
||||
actionContextById,
|
||||
actors,
|
||||
actorsLoading,
|
||||
actorsError,
|
||||
actorsUsedFallback,
|
||||
reloadActors,
|
||||
handleCreateWorkCycle,
|
||||
handleActivateWorkCycle,
|
||||
handleCreateAction,
|
||||
handleUpdateAction,
|
||||
handleQuickStatus,
|
||||
handleCreateBlockerForAction,
|
||||
} = ops
|
||||
|
||||
const createSprintAction = useMemo(
|
||||
() => async (payload) => {
|
||||
await handleCreateAction({
|
||||
...payload,
|
||||
work_cycle_id: payload.work_cycle_id || activeWorkCycle?.id || undefined,
|
||||
})
|
||||
},
|
||||
[handleCreateAction, activeWorkCycle?.id],
|
||||
)
|
||||
|
||||
if (loading) {
|
||||
return <LoadingState message="Lade Sprint-Planung …" />
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
{error && <p className="error">{error}</p>}
|
||||
<WorkCyclesPanel
|
||||
workCycles={workCycles}
|
||||
activeWorkCycle={activeWorkCycle}
|
||||
canManage={capabilities.has('kairo.milestone.manage')}
|
||||
onCreate={handleCreateWorkCycle}
|
||||
onActivate={handleActivateWorkCycle}
|
||||
busy={formBusy}
|
||||
/>
|
||||
{activeWorkCycle && (
|
||||
<InitiativeActionsHub
|
||||
initiativeId={initiativeId}
|
||||
actions={sprintActions}
|
||||
projects={projects}
|
||||
roadmapItems={roadmapItems}
|
||||
actionContextById={actionContextById}
|
||||
hideDone={hideDone}
|
||||
onHideDoneChange={setHideDone}
|
||||
showForm={showActionForm}
|
||||
onToggleForm={() => setShowActionForm((v) => !v)}
|
||||
editingActionId={editingAction?.id}
|
||||
onEditAction={setEditingAction}
|
||||
onCancelEdit={() => setEditingAction(null)}
|
||||
onCreateAction={createSprintAction}
|
||||
onUpdateAction={handleUpdateAction}
|
||||
onQuickStatus={handleQuickStatus}
|
||||
onCreateBlockerForAction={handleCreateBlockerForAction}
|
||||
canManage={capabilities.has('kairo.action.manage')}
|
||||
canManageBlocker={capabilities.has('kairo.blocker.manage')}
|
||||
formBusy={formBusy}
|
||||
actors={actors}
|
||||
actorsLoading={actorsLoading}
|
||||
actorsError={actorsError}
|
||||
actorsUsedFallback={actorsUsedFallback}
|
||||
onReloadActors={reloadActors}
|
||||
workCycles={workCycles}
|
||||
activeWorkCycle={activeWorkCycle}
|
||||
sectionTitle="Sprint-Backlog"
|
||||
sectionLead="Arbeitspakete in der aktiven Zeitbox — committet aus dem Product Backlog (Eingang) oder direkt hier."
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export function PlanSprintPage() {
|
||||
return (
|
||||
<RequireInitiativeScope lead="Sprint-Zeitboxen gehören zu einem Vorhaben im Scope.">
|
||||
<ScopedInitiativeProvider>
|
||||
<PlanSprintInner />
|
||||
</ScopedInitiativeProvider>
|
||||
</RequireInitiativeScope>
|
||||
)
|
||||
}
|
||||
@@ -75,6 +75,8 @@ function PlanWorkInner() {
|
||||
onReloadActors={reloadActors}
|
||||
busy={formBusy}
|
||||
executionGraph={executionGraph}
|
||||
sectionTitle="Alle Arbeitspakete"
|
||||
sectionLead="Gesamt-Ist am Vorhaben — Sprint-fokussierte Arbeit unter Ausführen → Sprint."
|
||||
/>
|
||||
</>
|
||||
)
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
import { Navigate, Outlet } from 'react-router-dom'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { ModeAreaShell } from '../../components/ModeAreaShell.jsx'
|
||||
import { ModeAreaNav } from '../../components/ModeAreaNav.jsx'
|
||||
import { ModeShell } from '../../components/ModeShell.jsx'
|
||||
import { WORK_NAV_ITEMS, resolveWorkNavActiveKey } from '../../config/workNav.js'
|
||||
import { useProgramScope } from '../../context/ProgramScopeContext.jsx'
|
||||
import { getActiveWorkCycle } from '../../api/workCycles.js'
|
||||
import { getInitiative } from '../../api/initiatives.js'
|
||||
|
||||
export function WorkLayout() {
|
||||
return (
|
||||
@@ -24,5 +28,34 @@ export function WorkLayout() {
|
||||
}
|
||||
|
||||
export function WorkIndexRedirect() {
|
||||
return <Navigate to="/work/today" replace />
|
||||
const { initiativeId } = useProgramScope()
|
||||
const [target, setTarget] = useState('/work/today')
|
||||
|
||||
useEffect(() => {
|
||||
if (!initiativeId) {
|
||||
setTarget('/work/today')
|
||||
return undefined
|
||||
}
|
||||
let cancelled = false
|
||||
Promise.all([getInitiative(initiativeId), getActiveWorkCycle(initiativeId)])
|
||||
.then(([initiative, activeCycle]) => {
|
||||
if (cancelled) return
|
||||
if (
|
||||
initiative?.archetype_key === 'initiative.product' &&
|
||||
activeCycle?.id
|
||||
) {
|
||||
setTarget(`/work/sprint?initiative=${initiativeId}`)
|
||||
} else {
|
||||
setTarget(`/work/today?initiative=${initiativeId}`)
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
if (!cancelled) setTarget('/work/today')
|
||||
})
|
||||
return () => {
|
||||
cancelled = true
|
||||
}
|
||||
}, [initiativeId])
|
||||
|
||||
return <Navigate to={target} replace />
|
||||
}
|
||||
@@ -0,0 +1,148 @@
|
||||
import { useMemo } from 'react'
|
||||
import { Link } from 'react-router-dom'
|
||||
import { RequireInitiativeScope } from '../../components/RequireInitiativeScope.jsx'
|
||||
import { ScopedInitiativeProvider } from '../../layout/ScopedInitiativeProvider.jsx'
|
||||
import { InitiativeActionsHub } from '../../components/InitiativeActionsHub.jsx'
|
||||
import { NextActionWidget } from '../../widgets/NextActionWidget.jsx'
|
||||
import { LoadingState } from '../../components/LoadingState.jsx'
|
||||
import { EmptyState } from '../../components/EmptyState.jsx'
|
||||
import { useInitiativeOperations } from '../../context/InitiativeOperationsContext.jsx'
|
||||
import { useProgramScope } from '../../context/ProgramScopeContext.jsx'
|
||||
import { scopedPath } from '../../utils/routes.js'
|
||||
|
||||
function WorkSprintInner() {
|
||||
const { initiativeId, hrefWithScope } = useProgramScope()
|
||||
const ops = useInitiativeOperations()
|
||||
const {
|
||||
activeWorkCycle,
|
||||
sprintActions,
|
||||
projects,
|
||||
roadmapItems,
|
||||
capabilities,
|
||||
hideDone,
|
||||
setHideDone,
|
||||
loading,
|
||||
error,
|
||||
formBusy,
|
||||
showActionForm,
|
||||
setShowActionForm,
|
||||
editingAction,
|
||||
setEditingAction,
|
||||
actionContextById,
|
||||
actors,
|
||||
actorsLoading,
|
||||
actorsError,
|
||||
actorsUsedFallback,
|
||||
reloadActors,
|
||||
handleCreateAction,
|
||||
handleUpdateAction,
|
||||
handleQuickStatus,
|
||||
handleCreateBlockerForAction,
|
||||
initiative,
|
||||
steeringSnapshot,
|
||||
steeringSnapshotLoading,
|
||||
} = ops
|
||||
|
||||
const defaultWorkCycleId = activeWorkCycle?.id || ''
|
||||
|
||||
const createAction = useMemo(
|
||||
() => async (payload) => {
|
||||
await handleCreateAction({
|
||||
...payload,
|
||||
work_cycle_id: payload.work_cycle_id || defaultWorkCycleId || undefined,
|
||||
})
|
||||
},
|
||||
[handleCreateAction, defaultWorkCycleId],
|
||||
)
|
||||
|
||||
if (loading) {
|
||||
return <LoadingState message="Lade Sprint-Backlog …" />
|
||||
}
|
||||
|
||||
const isProductArchetype = initiative?.archetype_key === 'initiative.product'
|
||||
|
||||
return (
|
||||
<>
|
||||
{error && <p className="error">{error}</p>}
|
||||
|
||||
{!activeWorkCycle && isProductArchetype && (
|
||||
<section className="card">
|
||||
<EmptyState
|
||||
message="Kein aktiver Sprint — lege unter Plan → Sprint eine Zeitbox an und aktiviere sie."
|
||||
/>
|
||||
<p>
|
||||
<Link to={hrefWithScope('/plan/sprint')} className="link-inline">
|
||||
Zur Sprint-Planung
|
||||
</Link>
|
||||
</p>
|
||||
</section>
|
||||
)}
|
||||
|
||||
{activeWorkCycle && (
|
||||
<>
|
||||
<section className="card sprint-context-banner">
|
||||
<h2>Sprint-Backlog</h2>
|
||||
<p className="section-lead muted">
|
||||
<strong>{activeWorkCycle.title}</strong>
|
||||
{activeWorkCycle.goal_description && ` — ${activeWorkCycle.goal_description}`}
|
||||
{' · '}
|
||||
Product Backlog triagierst du unter{' '}
|
||||
<Link to={scopedPath('/plan/inbox', { initiativeId })} className="link-inline">
|
||||
Plan → Eingang
|
||||
</Link>
|
||||
.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<NextActionWidget
|
||||
scope="initiative"
|
||||
initiativeId={initiativeId}
|
||||
items={steeringSnapshot?.next_actions}
|
||||
loading={steeringSnapshotLoading}
|
||||
embedded
|
||||
title="Nächster Schritt im Sprint"
|
||||
/>
|
||||
|
||||
<InitiativeActionsHub
|
||||
initiativeId={initiativeId}
|
||||
actions={sprintActions}
|
||||
projects={projects}
|
||||
roadmapItems={roadmapItems}
|
||||
actionContextById={actionContextById}
|
||||
hideDone={hideDone}
|
||||
onHideDoneChange={setHideDone}
|
||||
showForm={showActionForm}
|
||||
onToggleForm={() => setShowActionForm((v) => !v)}
|
||||
editingActionId={editingAction?.id}
|
||||
onEditAction={setEditingAction}
|
||||
onCancelEdit={() => setEditingAction(null)}
|
||||
onCreateAction={createAction}
|
||||
onUpdateAction={handleUpdateAction}
|
||||
onQuickStatus={handleQuickStatus}
|
||||
onCreateBlockerForAction={handleCreateBlockerForAction}
|
||||
canManage={capabilities.has('kairo.action.manage')}
|
||||
canManageBlocker={capabilities.has('kairo.blocker.manage')}
|
||||
formBusy={formBusy}
|
||||
actors={actors}
|
||||
actorsLoading={actorsLoading}
|
||||
actorsError={actorsError}
|
||||
actorsUsedFallback={actorsUsedFallback}
|
||||
onReloadActors={reloadActors}
|
||||
workCycles={ops.workCycles}
|
||||
activeWorkCycle={activeWorkCycle}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export function WorkSprintPage() {
|
||||
return (
|
||||
<RequireInitiativeScope lead="Sprint-Backlog ist vorhabenspezifisch — wähle ein Product-Vorhaben im Scope.">
|
||||
<ScopedInitiativeProvider>
|
||||
<WorkSprintInner />
|
||||
</ScopedInitiativeProvider>
|
||||
</RequireInitiativeScope>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user