feat(AP1.9d, AP2.2d): Work-Default-UI, Sprint-Planung und Composition Work-Slots
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

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-07-27 18:05:15 +02:00
1 parent 89ae15ca4c
commit 252b3f05f2
20 files changed
+639 -246

No files matched your search

+46 -16
View File
@@ -42,6 +42,8 @@ export function BacklogSection({
busy,
sectionTitle = 'Product Backlog',
sectionLead = 'Eingang vor dem Commit — triagieren, dann in den Sprint planen.',
defaultSprintTargetId = null,
lockSprintTarget = false,
}) {
const { operatingContext, steeringElements, steeringSnapshot } = useInitiativeOperations()
const [modalMode, setModalMode] = useState(null)
@@ -74,6 +76,13 @@ export function BacklogSection({
if (!showSprintPlanning || !initiativeId) {
return
}
if (
defaultSprintTargetId
&& planableSprints.some((cycle) => cycle.id === defaultSprintTargetId)
) {
setSprintTargetId(defaultSprintTargetId)
return
}
const stored = sessionStorage.getItem(SPRINT_TARGET_STORAGE_PREFIX + initiativeId)
if (stored && planableSprints.some((cycle) => cycle.id === stored)) {
setSprintTargetId(stored)
@@ -84,7 +93,13 @@ export function BacklogSection({
}
const preferred = activeWorkCycle?.id || planableSprints[0]?.id || ''
setSprintTargetId(preferred)
}, [showSprintPlanning, initiativeId, planableSprints, activeWorkCycle?.id])
}, [
showSprintPlanning,
initiativeId,
planableSprints,
activeWorkCycle?.id,
defaultSprintTargetId,
])
useEffect(() => {
if (!initiativeId || !sprintTargetId) return
@@ -292,21 +307,36 @@ export function BacklogSection({
{showSprintPlanning && canManage && (
<div className="backlog-sprint-planning card-list-item">
<label className="backlog-sprint-planning__field">
<span className="muted">Ziel-Sprint</span>
<select
value={sprintTargetId}
onChange={(e) => setSprintTargetId(e.target.value)}
disabled={busy}
>
{planableSprints.map((cycle) => (
<option key={cycle.id} value={cycle.id}>
{cycle.title}
{cycle.status === 'active' ? ' (aktiv)' : cycle.status === 'planned' ? ' (geplant)' : ''}
</option>
))}
</select>
</label>
{lockSprintTarget && selectedSprint ? (
<p className="muted backlog-sprint-planning__locked">
Ziel-Sprint: <strong>{selectedSprint.title}</strong>
{selectedSprint.status === 'active'
? ' (aktiv)'
: selectedSprint.status === 'planned'
? ' (geplant)'
: ''}
</p>
) : (
<label className="backlog-sprint-planning__field">
<span className="muted">Ziel-Sprint</span>
<select
value={sprintTargetId}
onChange={(e) => setSprintTargetId(e.target.value)}
disabled={busy}
>
{planableSprints.map((cycle) => (
<option key={cycle.id} value={cycle.id}>
{cycle.title}
{cycle.status === 'active'
? ' (aktiv)'
: cycle.status === 'planned'
? ' (geplant)'
: ''}
</option>
))}
</select>
</label>
)}
{selectedCommittable.length > 0 && (
<button
type="button"
+44 -18
View File
@@ -1,29 +1,55 @@
import { useState } from 'react'
/**
* Generischer Drill-down-Container — AP1.9d Anti-Todo-Wand.
* Bewusst layout-neutral für späteres UI-Redesign.
*/
export function CollapsibleSection({
title,
summary,
defaultOpen = false,
lead,
defaultCollapsed = true,
expandLabel = 'Alle anzeigen',
collapseLabel = 'Einklappen',
headerActions = null,
className = 'card',
children,
className = '',
}) {
const [open, setOpen] = useState(defaultOpen)
const [expanded, setExpanded] = useState(!defaultCollapsed)
return (
<section className={`collapsible-section card ${className}`.trim()}>
<button
type="button"
className="collapsible-section-trigger"
onClick={() => setOpen((v) => !v)}
aria-expanded={open}
>
<span className="collapsible-section-title">{title}</span>
{summary && <span className="collapsible-section-summary muted">{summary}</span>}
<span className="collapsible-section-chevron" aria-hidden="true">
{open ? '▾' : '▸'}
</span>
</button>
{open && <div className="collapsible-section-body">{children}</div>}
<section className={className}>
<div className="section-header">
<div>
{title && <h2>{title}</h2>}
{lead && <p className="section-lead muted">{lead}</p>}
</div>
{headerActions}
</div>
{expanded ? (
<>
{children}
<p className="collapsible-section__toggle">
<button
type="button"
className="btn btn-ghost btn-sm"
onClick={() => setExpanded(false)}
>
{collapseLabel}
</button>
</p>
</>
) : (
<p className="collapsible-section__toggle">
<button
type="button"
className="btn btn-secondary btn-sm"
onClick={() => setExpanded(true)}
>
{expandLabel}
</button>
</p>
)}
</section>
)
}
@@ -1,5 +1,6 @@
import { ActionHubCard } from './ActionHubCard.jsx'
import { ActionForm } from './ActionForm.jsx'
import { CollapsibleSection } from './CollapsibleSection.jsx'
import { EmptyState } from './EmptyState.jsx'
export function InitiativeActionsHub({
@@ -34,35 +35,35 @@ export function InitiativeActionsHub({
sectionTitle = 'Arbeitspakete',
sectionLead = 'Committete operative Einheit — Aufgaben im Detail. Blocker, Nachweise und Reviews hängen am Arbeitspaket.',
allActions = [],
collapsible = false,
defaultCollapsed = true,
expandLabel = 'Alle anzeigen',
collapseLabel = 'Liste einklappen',
}) {
return (
<section className="card initiative-actions-hub">
<div className="section-header">
<div>
<h2>{sectionTitle}</h2>
<p className="section-lead muted">{sectionLead}</p>
</div>
<div className="section-actions">
<label className="checkbox-label inline-filter">
<input
type="checkbox"
checked={hideDone}
onChange={(e) => onHideDoneChange(e.target.checked)}
/>
Erledigte ausblenden
</label>
{canManage && (
<button
type="button"
className="btn btn-primary btn-block-mobile"
onClick={onToggleForm}
>
{showForm ? 'Abbrechen' : 'Arbeitspaket'}
</button>
)}
</div>
</div>
const headerActions = (
<div className="section-actions">
<label className="checkbox-label inline-filter">
<input
type="checkbox"
checked={hideDone}
onChange={(e) => onHideDoneChange(e.target.checked)}
/>
Erledigte ausblenden
</label>
{canManage && (
<button
type="button"
className="btn btn-primary btn-block-mobile"
onClick={onToggleForm}
>
{showForm ? 'Abbrechen' : 'Arbeitspaket'}
</button>
)}
</div>
)
const body = (
<>
{showForm && canManage && (
<div className="inline-form-block">
<ActionForm
@@ -118,6 +119,35 @@ export function InitiativeActionsHub({
/>
))}
</div>
</>
)
if (collapsible) {
return (
<CollapsibleSection
className="card initiative-actions-hub"
title={sectionTitle}
lead={sectionLead}
defaultCollapsed={defaultCollapsed}
expandLabel={expandLabel}
collapseLabel={collapseLabel}
headerActions={headerActions}
>
{body}
</CollapsibleSection>
)
}
return (
<section className="card initiative-actions-hub">
<div className="section-header">
<div>
<h2>{sectionTitle}</h2>
<p className="section-lead muted">{sectionLead}</p>
</div>
{headerActions}
</div>
{body}
</section>
)
}