AP1.2 + AP1.4: Signals konsolidieren, RoadmapItem mit Gate-Verify
Deploy Development / deploy (push) Successful in 46s
Test Suite / pytest-backend (push) Failing after 1m30s
Test Suite / k6 /api/health Baseline (push) Has been skipped
Test Suite / playwright-smoke (push) Has been skipped
Test Suite / lint-backend (push) Successful in 2s
Test Suite / compose-smoke (push) Has been skipped
Deploy Development / deploy (push) Successful in 46s
Test Suite / pytest-backend (push) Failing after 1m30s
Test Suite / k6 /api/health Baseline (push) Has been skipped
Test Suite / playwright-smoke (push) Has been skipped
Test Suite / lint-backend (push) Successful in 2s
Test Suite / compose-smoke (push) Has been skipped
Entfernt operating_phase aus dem Snapshot zugunsten von Lifecycle + signals. Führt methodenneutrale RoadmapItems (Migration 010), Verify-Pfad und Plan-UI ein. Milestone-API bleibt als Compat-Wrapper; Version 0.13.0-ap1.4. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
a5d9eeb338
commit
09433b5d28
25 files changed
+1582
-343
No files matched your search
@@ -4,7 +4,7 @@ const AREAS = [
|
||||
{
|
||||
to: 'plan',
|
||||
title: 'Plan',
|
||||
description: 'Meilensteine und Roadmap — überprüfbare Zielpunkte pflegen.',
|
||||
description: 'Roadmap, Gates und Plan-Ist — methodenneutral pflegen.',
|
||||
},
|
||||
{
|
||||
to: 'execution',
|
||||
@@ -34,8 +34,8 @@ export function InitiativeNavCards({ initiativeId, counts = {} }) {
|
||||
? `${counts.backlog} Backlog`
|
||||
: area.to === 'execution' && counts.actionsOpen
|
||||
? `${counts.actionsOpen} offen`
|
||||
: area.to === 'plan' && counts.milestones
|
||||
? `${counts.milestones} Meilensteine`
|
||||
: area.to === 'plan' && counts.roadmapItems
|
||||
? `${counts.roadmapItems} Plan-Elemente`
|
||||
: null
|
||||
return (
|
||||
<Link
|
||||
|
||||
@@ -0,0 +1,220 @@
|
||||
import { useState } from 'react'
|
||||
import {
|
||||
MILESTONE_STATUSES,
|
||||
MILESTONE_STATUS_LABELS,
|
||||
ROADMAP_ITEM_TYPE_LABELS,
|
||||
SEQUENCING_MODE_LABELS,
|
||||
} from '../constants/status.js'
|
||||
import { StatusBadge } from './StatusBadge.jsx'
|
||||
import { EmptyState } from './EmptyState.jsx'
|
||||
|
||||
const ITEM_TYPES = ['milestone', 'review_gate', 'maturity_stage']
|
||||
const SEQUENCING_MODES = ['sequential', 'parallel', 'optional']
|
||||
const EDITABLE_STATUSES = MILESTONE_STATUSES.filter(
|
||||
(s) => !['reached', 'moved', 'discarded'].includes(s)
|
||||
)
|
||||
|
||||
function formatDate(value) {
|
||||
if (!value) return null
|
||||
try {
|
||||
return new Date(value.includes('T') ? value : `${value}T12:00:00`).toLocaleDateString(
|
||||
'de-DE'
|
||||
)
|
||||
} catch {
|
||||
return value
|
||||
}
|
||||
}
|
||||
|
||||
export function RoadmapPlanSection({
|
||||
items,
|
||||
canManage,
|
||||
onCreate,
|
||||
onUpdateStatus,
|
||||
onUpdateItem,
|
||||
onVerifyReached,
|
||||
onDelete,
|
||||
busy,
|
||||
}) {
|
||||
const [title, setTitle] = useState('')
|
||||
const [goalDescription, setGoalDescription] = useState('')
|
||||
const [targetDate, setTargetDate] = useState('')
|
||||
const [itemType, setItemType] = useState('milestone')
|
||||
const [sequencingMode, setSequencingMode] = useState('sequential')
|
||||
const [showForm, setShowForm] = useState(false)
|
||||
|
||||
async function handleSubmit(e) {
|
||||
e.preventDefault()
|
||||
if (!title.trim()) return
|
||||
await onCreate({
|
||||
title: title.trim(),
|
||||
goal_description: goalDescription.trim(),
|
||||
target_date: targetDate || undefined,
|
||||
item_type: itemType,
|
||||
sequencing_mode: sequencingMode,
|
||||
})
|
||||
setTitle('')
|
||||
setGoalDescription('')
|
||||
setTargetDate('')
|
||||
setItemType('milestone')
|
||||
setSequencingMode('sequential')
|
||||
setShowForm(false)
|
||||
}
|
||||
|
||||
return (
|
||||
<section className="card">
|
||||
<div className="section-header">
|
||||
<div>
|
||||
<h2>Plan</h2>
|
||||
<p className="section-lead muted">
|
||||
Roadmap-Elemente methodenneutral — Gates, Reifegrade oder Review-Punkte.
|
||||
Erreicht nur über Verify (Evidence, Review oder Decision).
|
||||
</p>
|
||||
</div>
|
||||
{canManage && (
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-primary btn-block-mobile"
|
||||
onClick={() => setShowForm((v) => !v)}
|
||||
>
|
||||
{showForm ? 'Abbrechen' : 'Plan-Element'}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{showForm && canManage && (
|
||||
<form className="inline-form-block milestone-form" onSubmit={handleSubmit}>
|
||||
<label>
|
||||
Typ
|
||||
<select value={itemType} onChange={(e) => setItemType(e.target.value)}>
|
||||
{ITEM_TYPES.map((t) => (
|
||||
<option key={t} value={t}>
|
||||
{ROADMAP_ITEM_TYPE_LABELS[t] || t}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
Titel
|
||||
<input
|
||||
value={title}
|
||||
onChange={(e) => setTitle(e.target.value)}
|
||||
maxLength={255}
|
||||
required
|
||||
placeholder="z. B. MVP nutzbar im Alltag"
|
||||
/>
|
||||
</label>
|
||||
<label>
|
||||
Ziel / Definition of Done
|
||||
<textarea
|
||||
value={goalDescription}
|
||||
onChange={(e) => setGoalDescription(e.target.value)}
|
||||
rows={3}
|
||||
placeholder="Woran erkennst du, dass dieses Element erreicht ist?"
|
||||
/>
|
||||
</label>
|
||||
<label>
|
||||
Abfolge
|
||||
<select
|
||||
value={sequencingMode}
|
||||
onChange={(e) => setSequencingMode(e.target.value)}
|
||||
>
|
||||
{SEQUENCING_MODES.map((m) => (
|
||||
<option key={m} value={m}>
|
||||
{SEQUENCING_MODE_LABELS[m] || m}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
Zieltermin
|
||||
<input
|
||||
type="date"
|
||||
value={targetDate}
|
||||
onChange={(e) => setTargetDate(e.target.value)}
|
||||
/>
|
||||
</label>
|
||||
<button type="submit" className="btn btn-primary" disabled={busy}>
|
||||
Anlegen
|
||||
</button>
|
||||
</form>
|
||||
)}
|
||||
|
||||
{items.length === 0 && (
|
||||
<EmptyState message="Noch kein Plan — strukturiere das Vorhaben in überprüfbare Roadmap-Elemente." />
|
||||
)}
|
||||
|
||||
<ul className="item-list milestone-list">
|
||||
{items.map((item) => (
|
||||
<li key={item.id} className="list-item card-list-item milestone-list-item">
|
||||
<div className="list-item-main">
|
||||
<strong>{item.title}</strong>
|
||||
<p className="muted list-item-sub">
|
||||
{ROADMAP_ITEM_TYPE_LABELS[item.item_type] || item.item_type}
|
||||
{' · '}
|
||||
{SEQUENCING_MODE_LABELS[item.sequencing_mode] || item.sequencing_mode}
|
||||
</p>
|
||||
{item.goal_description && (
|
||||
<p className="list-item-desc">{item.goal_description}</p>
|
||||
)}
|
||||
{item.target_date && (
|
||||
<p className="muted list-item-sub">
|
||||
Zieltermin: {formatDate(item.target_date)}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
<div className="list-item-meta action-controls">
|
||||
<StatusBadge kind="milestone" status={item.status} />
|
||||
{canManage && item.status !== 'reached' && (
|
||||
<>
|
||||
<select
|
||||
className="inline-select"
|
||||
value={item.status}
|
||||
onChange={(e) => onUpdateStatus(item.id, e.target.value)}
|
||||
aria-label="Plan-Status"
|
||||
>
|
||||
{EDITABLE_STATUSES.map((s) => (
|
||||
<option key={s} value={s}>
|
||||
{MILESTONE_STATUS_LABELS[s]}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
<select
|
||||
className="inline-select"
|
||||
value={item.sequencing_mode}
|
||||
onChange={(e) =>
|
||||
onUpdateItem(item.id, { sequencing_mode: e.target.value })
|
||||
}
|
||||
aria-label="Abfolge"
|
||||
>
|
||||
{SEQUENCING_MODES.map((m) => (
|
||||
<option key={m} value={m}>
|
||||
{SEQUENCING_MODE_LABELS[m]}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
{['planned', 'active', 'at_risk'].includes(item.status) && (
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-primary"
|
||||
disabled={busy}
|
||||
onClick={() => onVerifyReached(item.id)}
|
||||
>
|
||||
Verify → erreicht
|
||||
</button>
|
||||
)}
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-secondary"
|
||||
onClick={() => onDelete(item.id)}
|
||||
>
|
||||
Löschen
|
||||
</button>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
import {
|
||||
LIFECYCLE_LABELS,
|
||||
PHASE_LABELS,
|
||||
PHASE_DESCRIPTIONS,
|
||||
SIGNAL_LABELS,
|
||||
NEXT_ACTION_KIND_LABELS,
|
||||
} from '../constants/operating.js'
|
||||
@@ -51,9 +49,7 @@ export function SteeringSnapshotPanel({
|
||||
lifecycle_label,
|
||||
method_key,
|
||||
method_label,
|
||||
operating_phase,
|
||||
operating_phase_deprecated,
|
||||
phase_signals,
|
||||
signals = [],
|
||||
counts,
|
||||
upcoming_milestones = [],
|
||||
next_actions = [],
|
||||
@@ -61,12 +57,7 @@ export function SteeringSnapshotPanel({
|
||||
const displayLabel =
|
||||
lifecycle_label ||
|
||||
LIFECYCLE_LABELS[lifecycle_state] ||
|
||||
PHASE_LABELS[operating_phase] ||
|
||||
lifecycle_state ||
|
||||
operating_phase
|
||||
const phaseDesc = lifecycle_state
|
||||
? null
|
||||
: PHASE_DESCRIPTIONS[operating_phase] || ''
|
||||
lifecycle_state
|
||||
|
||||
const statPills = [
|
||||
{ label: 'Offen', value: counts.actions_open, warn: false },
|
||||
@@ -126,11 +117,9 @@ export function SteeringSnapshotPanel({
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{phaseDesc && <p className="steering-phase-desc">{phaseDesc}</p>}
|
||||
|
||||
{phase_signals?.length > 0 && (
|
||||
{signals?.length > 0 && (
|
||||
<p className="muted snapshot-signals">
|
||||
{phase_signals.map((s) => SIGNAL_LABELS[s] || s).join(' · ')}
|
||||
{signals.map((s) => SIGNAL_LABELS[s] || s).join(' · ')}
|
||||
</p>
|
||||
)}
|
||||
|
||||
|
||||
Reference in new issue
Block a user