AP1.9d: Methoden-Default-UI und Product Language für Product-Flow.
Test Suite / lint-backend (push) Waiting to run
Test Suite / compose-smoke (push) Waiting to run
Test Suite / k6 /api/health Baseline (push) Blocked by required conditions
Test Suite / playwright-smoke (push) Blocked by required conditions
Deploy Development / deploy (push) Successful in 47s
Test Suite / pytest-backend (push) Has been cancelled

Prozessleiste, archetypgebundene Modus-Defaults und Sprint/Arbeitspaket-Begriffe schließen den GUI-Kern für continuous_product vor Sprint-Planungs-Flows.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-07-12 19:20:06 +02:00
1 parent 82a5b9adec
commit 09826d146e
20 files changed
+796 -55

No files matched your search

+39 -4
View File
@@ -1,13 +1,48 @@
import { Navigate } from 'react-router-dom'
import { useEffect, useState } from 'react'
import { useProgramScope } from '../../context/ProgramScopeContext.jsx'
import { getInitiative } from '../../api/initiatives.js'
import { getActiveWorkCycle } from '../../api/workCycles.js'
import { resolveMethodUiDefaults } from '../../config/methodUiDefaults.js'
/** Portfolio ohne Scope → Übersicht; mit Vorhaben → Profil als Einstieg. */
/** Portfolio ohne Scope → Übersicht; mit Vorhaben → methoden-Default (AP1.9d). */
export function PlanIndexRedirect() {
const { initiativeId, hrefWithScope } = useProgramScope()
const [target, setTarget] = useState(null)
if (initiativeId) {
return <Navigate to={hrefWithScope('/plan/profile')} replace />
useEffect(() => {
if (!initiativeId) {
setTarget('/plan/portfolio')
return undefined
}
let cancelled = false
Promise.all([
getInitiative(initiativeId),
getActiveWorkCycle(initiativeId).catch(() => null),
])
.then(([initiative, activeCycle]) => {
if (cancelled) return
const defaults = resolveMethodUiDefaults({
archetypeKey: initiative?.archetype_key,
hasActiveSprint: Boolean(activeCycle?.id),
})
setTarget(hrefWithScope(defaults.planDefaultRoute))
})
.catch(() => {
if (!cancelled) setTarget(hrefWithScope('/plan/profile'))
})
return () => {
cancelled = true
}
}, [initiativeId, hrefWithScope])
if (!initiativeId) {
return <Navigate to="/plan/portfolio" replace />
}
return <Navigate to="/plan/portfolio" replace />
if (!target) {
return null
}
return <Navigate to={target} replace />
}
+2 -2
View File
@@ -93,7 +93,7 @@ function PlanSprintInner() {
workCycles={workCycles}
activeWorkCycle={activeWorkCycle}
sectionTitle="Sprint-Backlog"
sectionLead="Arbeitspakete in der aktiven Zeitbox — committet aus dem Product Backlog (Eingang) oder direkt hier."
sectionLead="Arbeitspakete im aktiven Sprint — committet aus dem Product Backlog (Eingang) oder direkt hier."
/>
)}
</>
@@ -102,7 +102,7 @@ function PlanSprintInner() {
export function PlanSprintPage() {
return (
<RequireInitiativeScope lead="Sprint-Zeitboxen gehören zu einem Vorhaben im Scope.">
<RequireInitiativeScope lead="Sprints gehören zu einem Vorhaben im Scope.">
<ScopedInitiativeProvider>
<PlanSprintInner />
</ScopedInitiativeProvider>
+56 -22
View File
@@ -4,23 +4,57 @@ 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 { resolveWorkNavItems } from '../../config/methodUiDefaults.js'
import { useProgramScope } from '../../context/ProgramScopeContext.jsx'
import { getActiveWorkCycle } from '../../api/workCycles.js'
import { getInitiative } from '../../api/initiatives.js'
import { getActiveWorkCycle } from '../../api/workCycles.js'
import { resolveMethodUiDefaults } from '../../config/methodUiDefaults.js'
function WorkAreaNav() {
const { initiativeId } = useProgramScope()
const [navItems, setNavItems] = useState(WORK_NAV_ITEMS)
useEffect(() => {
if (!initiativeId) {
setNavItems(WORK_NAV_ITEMS)
return undefined
}
let cancelled = false
Promise.all([
getInitiative(initiativeId),
getActiveWorkCycle(initiativeId).catch(() => null),
])
.then(([initiative, activeCycle]) => {
if (cancelled) return
setNavItems(
resolveWorkNavItems({
archetypeKey: initiative?.archetype_key,
hasActiveSprint: Boolean(activeCycle?.id),
}),
)
})
.catch(() => {
if (!cancelled) setNavItems(WORK_NAV_ITEMS)
})
return () => {
cancelled = true
}
}, [initiativeId])
return (
<ModeAreaNav
modeLabel="Ausführen"
items={navItems}
resolveActiveKey={resolveWorkNavActiveKey}
/>
)
}
export function WorkLayout() {
return (
<div className="app-page">
<ModeShell modeKey="work" />
<ModeAreaShell
nav={
<ModeAreaNav
modeLabel="Ausführen"
items={WORK_NAV_ITEMS}
resolveActiveKey={resolveWorkNavActiveKey}
/>
}
>
<ModeAreaShell nav={<WorkAreaNav />}>
<Outlet />
</ModeAreaShell>
</div>
@@ -28,7 +62,7 @@ export function WorkLayout() {
}
export function WorkIndexRedirect() {
const { initiativeId } = useProgramScope()
const { initiativeId, hrefWithScope } = useProgramScope()
const [target, setTarget] = useState('/work/today')
useEffect(() => {
@@ -37,25 +71,25 @@ export function WorkIndexRedirect() {
return undefined
}
let cancelled = false
Promise.all([getInitiative(initiativeId), getActiveWorkCycle(initiativeId)])
Promise.all([
getInitiative(initiativeId),
getActiveWorkCycle(initiativeId).catch(() => null),
])
.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}`)
}
const defaults = resolveMethodUiDefaults({
archetypeKey: initiative?.archetype_key,
hasActiveSprint: Boolean(activeCycle?.id),
})
setTarget(hrefWithScope(defaults.workDefaultRoute))
})
.catch(() => {
if (!cancelled) setTarget('/work/today')
if (!cancelled) setTarget(hrefWithScope('/work/today'))
})
return () => {
cancelled = true
}
}, [initiativeId])
}, [initiativeId, hrefWithScope])
return <Navigate to={target} replace />
}
+1 -1
View File
@@ -68,7 +68,7 @@ function WorkSprintInner() {
{!activeWorkCycle && isProductArchetype && (
<section className="card">
<EmptyState
message="Kein aktiver Sprint — lege unter Plan → Sprint eine Zeitbox an und aktiviere sie."
message="Kein aktiver Sprint — lege unter Plan → Sprint einen Sprint an und aktiviere ihn."
/>
<p>
<Link to={hrefWithScope('/plan/sprint')} className="link-inline">