feat(ui): Geführter Eingang und Steuerungskurzinfo auf Plan-Profil
Deploy Development / deploy (push) Successful in 47s
Test Suite / pytest-backend (push) Successful in 4m0s
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 18s
Test Suite / playwright-smoke (push) Successful in 18s
Deploy Development / deploy (push) Successful in 47s
Test Suite / pytest-backend (push) Successful in 4m0s
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 18s
Test Suite / playwright-smoke (push) Successful in 18s
BacklogIntakeGuide und PlanSteeringSummary leiten aus Operating Context — keine Archetyp-Ifs, klarere Commit-Pfade A/B. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
a3b14d9c00
commit
a13913f1a0
8 files changed
+578
-16
No files matched your search
@@ -0,0 +1,82 @@
|
||||
import { Link } from 'react-router-dom'
|
||||
import {
|
||||
buildBacklogIntakeGuideSteps,
|
||||
isBacklogIntakeGuideComplete,
|
||||
} from '../utils/backlogIntakeGuide.js'
|
||||
import { scopedPath } from '../utils/routes.js'
|
||||
|
||||
/**
|
||||
* Geführter Plan-Eingang — Schritte aus Methoden-Vertrag / Backlog-Vokabular.
|
||||
*/
|
||||
export function BacklogIntakeGuide({
|
||||
initiativeId,
|
||||
vocabulary,
|
||||
sprintCommitEnabled,
|
||||
hasPlanableSprint,
|
||||
hasBacklogItems,
|
||||
hasCommittableItems,
|
||||
hasConvertedItems,
|
||||
directWorkEnabled,
|
||||
compact = false,
|
||||
}) {
|
||||
if (!initiativeId) return null
|
||||
|
||||
const steps = buildBacklogIntakeGuideSteps({
|
||||
vocabulary,
|
||||
sprintCommitEnabled,
|
||||
hasPlanableSprint,
|
||||
hasBacklogItems,
|
||||
hasCommittableItems,
|
||||
hasConvertedItems,
|
||||
directWorkEnabled,
|
||||
initiativeId,
|
||||
scopedPath,
|
||||
})
|
||||
|
||||
if (!steps.length) return null
|
||||
|
||||
const complete = isBacklogIntakeGuideComplete(steps)
|
||||
|
||||
if (compact && complete) {
|
||||
return (
|
||||
<p className="backlog-intake-guide backlog-intake-guide--compact muted">
|
||||
Eingang bereit — Items committen oder{' '}
|
||||
{directWorkEnabled ? (
|
||||
<Link to={scopedPath('/plan/work', { initiativeId })}>direkt unter Plan → Arbeit</Link>
|
||||
) : (
|
||||
'committete Arbeit unter Ausführen bearbeiten'
|
||||
)}
|
||||
.
|
||||
</p>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="backlog-intake-guide card-list-item">
|
||||
<p className="backlog-intake-guide__title">
|
||||
<strong>So funktioniert der Eingang</strong>
|
||||
</p>
|
||||
<ol className="backlog-intake-guide__steps">
|
||||
{steps.map((step) => (
|
||||
<li
|
||||
key={step.id}
|
||||
className={`backlog-intake-guide__step backlog-intake-guide__step--${step.state}`}
|
||||
>
|
||||
<span className="backlog-intake-guide__step-marker" aria-hidden="true">
|
||||
{step.state === 'done' ? '✓' : step.state === 'current' ? '→' : '○'}
|
||||
</span>
|
||||
<div className="backlog-intake-guide__step-body">
|
||||
<strong>{step.title}</strong>
|
||||
<p className="muted backlog-intake-guide__step-detail">{step.detail}</p>
|
||||
{step.to && step.linkLabel && step.state !== 'done' && (
|
||||
<Link to={step.to} className="backlog-intake-guide__step-link">
|
||||
{step.linkLabel}
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
</li>
|
||||
))}
|
||||
</ol>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -12,6 +12,7 @@ import { backlogKindLabel, resolveBacklogVocabulary } from '../utils/resolveBack
|
||||
import { useMinWidth } from '../hooks/useMinWidth.js'
|
||||
import { useInitiativeOperations } from '../context/InitiativeOperationsContext.jsx'
|
||||
import { hasSteeringElement } from '../registry/steeringElementRegistry.js'
|
||||
import { BacklogIntakeGuide } from './BacklogIntakeGuide.jsx'
|
||||
import { actionTitleById } from '../utils/actionReferences.js'
|
||||
|
||||
const PLANNING_STATUSES = new Set(['planned', 'active', 'at_risk'])
|
||||
@@ -107,6 +108,11 @@ export function BacklogSection({
|
||||
}, [epicItems])
|
||||
|
||||
const defaultKind = vocabulary.default_kind || 'story'
|
||||
const hasConvertedItems = items.some((item) => item.status === 'converted')
|
||||
const directWorkEnabled = Boolean(
|
||||
operatingContext?.ui_profile?.planOutlineKeys?.includes('work'),
|
||||
)
|
||||
const guideCompact = sortedItems.length > 0 && (showSprintPlanning || hasConvertedItems)
|
||||
|
||||
function closeModal() {
|
||||
setModalMode(null)
|
||||
@@ -247,6 +253,20 @@ export function BacklogSection({
|
||||
)}
|
||||
</div>
|
||||
|
||||
{canManage && (
|
||||
<BacklogIntakeGuide
|
||||
initiativeId={initiativeId}
|
||||
vocabulary={vocabulary}
|
||||
sprintCommitEnabled={sprintCommitEnabled}
|
||||
hasPlanableSprint={planableSprints.length > 0}
|
||||
hasBacklogItems={sortedItems.length > 0}
|
||||
hasCommittableItems={committableItems.length > 0}
|
||||
hasConvertedItems={hasConvertedItems}
|
||||
directWorkEnabled={directWorkEnabled}
|
||||
compact={guideCompact}
|
||||
/>
|
||||
)}
|
||||
|
||||
{sprintCommitEnabled && canManage && !showSprintPlanning && (
|
||||
<div className="backlog-sprint-setup card-list-item">
|
||||
<p className="backlog-sprint-setup__title">
|
||||
@@ -295,10 +315,13 @@ export function BacklogSection({
|
||||
</div>
|
||||
)}
|
||||
|
||||
{items.length === 0 && <EmptyState message="Backlog ist leer." />}
|
||||
{sortedItems.length === 0 && !hasConvertedItems && (
|
||||
<EmptyState message="Noch keine Items im Eingang — Schritt 2 in der Anleitung oben." />
|
||||
)}
|
||||
|
||||
<ul className="item-list backlog-reorder-list">
|
||||
{displayRows.map(({ item, depth }) => {
|
||||
{(sortedItems.length > 0 || hasConvertedItems) && (
|
||||
<ul className="item-list backlog-reorder-list">
|
||||
{displayRows.map(({ item, depth }) => {
|
||||
const isDragging = dragItemId === item.id
|
||||
const isDropTarget = dropTargetId === item.id && dragItemId && dragItemId !== item.id
|
||||
const reorderable = canReorder && item.status !== 'converted'
|
||||
@@ -415,18 +438,19 @@ export function BacklogSection({
|
||||
</li>
|
||||
)
|
||||
})}
|
||||
{items
|
||||
.filter((item) => item.status === 'converted')
|
||||
.map((item) => (
|
||||
<li key={item.id} className="list-item card-list-item backlog-reorder-item--converted">
|
||||
<div className="list-item-main">
|
||||
<strong>{item.title}</strong>
|
||||
<p className="list-item-sub muted">Konvertiert — nicht mehr sortierbar</p>
|
||||
</div>
|
||||
<StatusBadge kind="backlog" status={item.status} />
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
{items
|
||||
.filter((item) => item.status === 'converted')
|
||||
.map((item) => (
|
||||
<li key={item.id} className="list-item card-list-item backlog-reorder-item--converted">
|
||||
<div className="list-item-main">
|
||||
<strong>{item.title}</strong>
|
||||
<p className="list-item-sub muted">Konvertiert — nicht mehr sortierbar</p>
|
||||
</div>
|
||||
<StatusBadge kind="backlog" status={item.status} />
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
)}
|
||||
|
||||
<Modal open={Boolean(modalMode)} title={modalTitle} onClose={closeModal}>
|
||||
{modalMode?.kind === 'create' && (
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
import { Link } from 'react-router-dom'
|
||||
import { useInitiativeOperations } from '../context/InitiativeOperationsContext.jsx'
|
||||
import {
|
||||
backlogVocabularyProfileLabel,
|
||||
planSteeringElementLabels,
|
||||
} from '../registry/steeringElementRegistry.js'
|
||||
import { methodLabelForKey } from '../utils/archetypes.js'
|
||||
import { resolveBacklogVocabulary } from '../utils/resolveBacklogVocabulary.js'
|
||||
import { scopedPath } from '../utils/routes.js'
|
||||
|
||||
const COMPOSITION_MODIFIER_LABELS = {
|
||||
agile_iteration: 'Agile Iteration (aktiver Sprint)',
|
||||
}
|
||||
|
||||
/**
|
||||
* Kurzüberblick Steuerung auf Plan-Profil — aus Operating Context, nicht Archetyp-If.
|
||||
*/
|
||||
export function PlanSteeringSummary({ initiativeId }) {
|
||||
const {
|
||||
operatingContext,
|
||||
steeringElements,
|
||||
steeringMethods,
|
||||
activeWorkCycle,
|
||||
} = useInitiativeOperations()
|
||||
|
||||
if (!operatingContext) return null
|
||||
|
||||
const methodKey = operatingContext.method_key
|
||||
const methodLabel = methodLabelForKey(methodKey, steeringMethods)
|
||||
const vocabulary = resolveBacklogVocabulary(operatingContext.backlog_vocabulary)
|
||||
const vocabLabel = backlogVocabularyProfileLabel(vocabulary.profile_key)
|
||||
const elementLabels = planSteeringElementLabels(steeringElements)
|
||||
const compositionKey = operatingContext.active_composition_modifier
|
||||
const compositionLabel = compositionKey
|
||||
? COMPOSITION_MODIFIER_LABELS[compositionKey] || compositionKey
|
||||
: null
|
||||
|
||||
const planOutlineKeys = operatingContext.ui_profile?.planOutlineKeys || []
|
||||
const showsDirectWork = planOutlineKeys.includes('work')
|
||||
const showsInbox = planOutlineKeys.includes('inbox')
|
||||
|
||||
return (
|
||||
<section className="plan-steering-summary card-list-item" aria-label="Steuerungsüberblick">
|
||||
<h3 className="plan-steering-summary__title">Steuerung (aus Methode)</h3>
|
||||
<dl className="plan-steering-summary__list">
|
||||
<div className="plan-steering-summary__row">
|
||||
<dt className="muted">Methode</dt>
|
||||
<dd>
|
||||
<strong>{methodLabel}</strong>
|
||||
{compositionLabel && (
|
||||
<span className="plan-steering-summary__tag muted"> · {compositionLabel}</span>
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
{vocabLabel && vocabulary.kinds?.length > 0 && (
|
||||
<div className="plan-steering-summary__row">
|
||||
<dt className="muted">Eingang</dt>
|
||||
<dd>{vocabLabel}</dd>
|
||||
</div>
|
||||
)}
|
||||
{elementLabels.length > 0 && (
|
||||
<div className="plan-steering-summary__row">
|
||||
<dt className="muted">Aktive Elemente</dt>
|
||||
<dd>
|
||||
<ul className="plan-steering-summary__pills">
|
||||
{elementLabels.map((label) => (
|
||||
<li key={label} className="plan-steering-summary__pill">
|
||||
{label}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</dd>
|
||||
</div>
|
||||
)}
|
||||
{activeWorkCycle?.title && (
|
||||
<div className="plan-steering-summary__row">
|
||||
<dt className="muted">Aktiver Sprint</dt>
|
||||
<dd>
|
||||
<strong>{activeWorkCycle.title}</strong>
|
||||
</dd>
|
||||
</div>
|
||||
)}
|
||||
{(showsInbox || showsDirectWork) && (
|
||||
<div className="plan-steering-summary__row">
|
||||
<dt className="muted">Commit-Pfade</dt>
|
||||
<dd className="plan-steering-summary__paths">
|
||||
{showsInbox && (
|
||||
<span>
|
||||
A:{' '}
|
||||
<Link to={scopedPath('/plan/inbox', { initiativeId })}>Eingang → Commit</Link>
|
||||
</span>
|
||||
)}
|
||||
{showsInbox && showsDirectWork && ' · '}
|
||||
{showsDirectWork && (
|
||||
<span>
|
||||
B:{' '}
|
||||
<Link to={scopedPath('/plan/work', { initiativeId })}>Plan → Arbeit (direct)</Link>
|
||||
</span>
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
)}
|
||||
</dl>
|
||||
<p className="muted plan-steering-summary__footnote">
|
||||
Details und Methodenwechsel unter{' '}
|
||||
<Link to={scopedPath('/control/status', { initiativeId })}>Kontrolle → Steuerung</Link>.
|
||||
</p>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user