AP1.6b: Journey um Gate-Fortschritt und Ist-Graph erweitern.
Deploy Development / deploy (push) Successful in 47s
Test Suite / pytest-backend (push) Successful in 2m23s
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 13s
Deploy Development / deploy (push) Successful in 47s
Test Suite / pytest-backend (push) Successful in 2m23s
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 13s
Fokus-Gates mit Kriterien-Checkliste und eingebetteter Graph-Sicht in Kontrolle; Abnahme-Reihenfolge in Roadmap dokumentiert. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
a19c6abd26
commit
b85a6ec0c7
8 files changed
+331
-26
No files matched your search
@@ -18,7 +18,7 @@ function truncateTitle(title, max = 28) {
|
||||
return `${title.slice(0, max - 1)}…`
|
||||
}
|
||||
|
||||
export function GateMapView({ initiativeId, items, graphState: graphStateProp }) {
|
||||
export function GateMapView({ initiativeId, items, graphState: graphStateProp, embedded = false }) {
|
||||
const navigate = useNavigate()
|
||||
const [dependencies, setDependencies] = useState([])
|
||||
const [graphStateLocal, setGraphStateLocal] = useState(null)
|
||||
@@ -80,17 +80,22 @@ export function GateMapView({ initiativeId, items, graphState: graphStateProp })
|
||||
return <ErrorState message={error} />
|
||||
}
|
||||
|
||||
const Wrapper = embedded ? 'div' : 'section'
|
||||
const wrapperClass = embedded ? 'gate-map-view gate-map-view--embedded' : 'card gate-map-view'
|
||||
|
||||
return (
|
||||
<section className="card gate-map-view">
|
||||
<div className="section-header">
|
||||
<div>
|
||||
<h2>Zielzustände (Graph)</h2>
|
||||
<p className="section-lead muted">
|
||||
Read-only Übersicht der Gate-Abhängigkeiten — im Designer modellieren oder auf der
|
||||
Gate-Detailseite Kanten pflegen; Verify und Kriterien dort.
|
||||
</p>
|
||||
<Wrapper className={wrapperClass}>
|
||||
{!embedded && (
|
||||
<div className="section-header">
|
||||
<div>
|
||||
<h2>Zielzustände (Graph)</h2>
|
||||
<p className="section-lead muted">
|
||||
Read-only Übersicht der Gate-Abhängigkeiten — im Designer modellieren oder auf der
|
||||
Gate-Detailseite Kanten pflegen; Verify und Kriterien dort.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="gate-map-view__legend muted">
|
||||
<span className="gate-map-view__legend-item">
|
||||
@@ -209,6 +214,6 @@ export function GateMapView({ initiativeId, items, graphState: graphStateProp })
|
||||
„Abhängigkeiten“ anlegen; ohne Kanten gelten Gates nach Reihenfolge.
|
||||
</p>
|
||||
)}
|
||||
</section>
|
||||
</Wrapper>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
import { GateMapView } from './GateMapView.jsx'
|
||||
|
||||
export function JourneyGateMapSection({ initiativeId, items, graphState, loading }) {
|
||||
if (!items.length) return null
|
||||
|
||||
return (
|
||||
<section className="card journey-gate-map">
|
||||
<h2>Zielzustands-Graph (Ist)</h2>
|
||||
<p className="section-lead muted">
|
||||
Baum der Gate-Abhängigkeiten mit Ist-Status — keine Planungsbearbeitung (Kontrolle /
|
||||
Journey).
|
||||
</p>
|
||||
{loading ? (
|
||||
<p className="muted">Graph wird geladen …</p>
|
||||
) : (
|
||||
<GateMapView
|
||||
initiativeId={initiativeId}
|
||||
items={items}
|
||||
graphState={graphState}
|
||||
embedded
|
||||
/>
|
||||
)}
|
||||
</section>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
import { Link } from 'react-router-dom'
|
||||
import { gateTitleById } from './GateSelect.jsx'
|
||||
import { gatePath } from '../utils/routes.js'
|
||||
import { CRITERION_STATUS_LABELS } from '../constants/status.js'
|
||||
import { StatusBadge } from './StatusBadge.jsx'
|
||||
|
||||
export function GateSteeringHint({ graphState, itemId, siblingItems = [] }) {
|
||||
if (!graphState?.items?.[itemId]) return null
|
||||
|
||||
const itemState = graphState.items[itemId]
|
||||
const enforceBlocking = graphState.graph_profile?.enforce_gate_blocking !== false
|
||||
const blockedBy = itemState.blocked_by || []
|
||||
const wouldBlock = itemState.would_block ?? itemState.blocked
|
||||
|
||||
if (itemState.ready) {
|
||||
return <span className="status-pill status-pill--ready">Bereit</span>
|
||||
}
|
||||
|
||||
if (wouldBlock && blockedBy.length > 0) {
|
||||
const blockerTitle =
|
||||
blockedBy.length === 1 ? gateTitleById(siblingItems, blockedBy[0]) : null
|
||||
const title =
|
||||
blockerTitle != null
|
||||
? `Wartet auf: ${blockerTitle}`
|
||||
: `Wartet auf ${blockedBy.length} Voraussetzungen`
|
||||
const className = enforceBlocking
|
||||
? 'status-pill status-pill--blocked'
|
||||
: 'status-pill status-pill--wait'
|
||||
const label = enforceBlocking ? 'Blockiert' : 'Wartet'
|
||||
return (
|
||||
<span className={className} title={title}>
|
||||
{label}
|
||||
</span>
|
||||
)
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
function sortGatesForJourney(items, graphState) {
|
||||
const terminal = new Set(['reached', 'moved', 'discarded'])
|
||||
const open = items.filter((item) => !terminal.has(item.status))
|
||||
return [...open].sort((a, b) => {
|
||||
const aState = graphState?.items?.[a.id]
|
||||
const bState = graphState?.items?.[b.id]
|
||||
const aReady = aState?.ready ? 0 : 1
|
||||
const bReady = bState?.ready ? 0 : 1
|
||||
if (aReady !== bReady) return aReady - bReady
|
||||
const aWait = aState?.would_block || aState?.blocked ? 1 : 0
|
||||
const bWait = bState?.would_block || bState?.blocked ? 1 : 0
|
||||
if (aWait !== bWait) return aWait - bWait
|
||||
return (a.sort_order ?? 0) - (b.sort_order ?? 0)
|
||||
})
|
||||
}
|
||||
|
||||
export { sortGatesForJourney }
|
||||
|
||||
export function JourneyGateProgressSection({
|
||||
items = [],
|
||||
graphState,
|
||||
criteriaProgress = {},
|
||||
criteriaByGate = {},
|
||||
loading = false,
|
||||
}) {
|
||||
if (loading) {
|
||||
return (
|
||||
<section className="card journey-gate-progress">
|
||||
<p className="muted">Zielzustands-Fortschritt wird geladen …</p>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
|
||||
if (!items.length) {
|
||||
return null
|
||||
}
|
||||
|
||||
const focusGates = sortGatesForJourney(items, graphState).slice(0, 5)
|
||||
|
||||
return (
|
||||
<section className="card journey-gate-progress">
|
||||
<h2>Zielzustands-Fortschritt</h2>
|
||||
<p className="section-lead muted">
|
||||
Nächste Gates und Kriterien im Ist — Schritt für Schritt bis Verify. Vollständige Pflege
|
||||
auf der Gate-Detailseite.
|
||||
</p>
|
||||
<ul className="item-list journey-gate-progress-list">
|
||||
{focusGates.map((gate) => {
|
||||
const progress = criteriaProgress[gate.id]
|
||||
const criteria = criteriaByGate[gate.id] || []
|
||||
const openCriteria = criteria.filter(
|
||||
(c) => !['satisfied', 'waived', 'deferred'].includes(c.status),
|
||||
)
|
||||
return (
|
||||
<li key={gate.id} className="list-item card-list-item journey-gate-progress-item">
|
||||
<div className="list-item-main">
|
||||
<div className="journey-gate-progress-item__head">
|
||||
<Link to={gatePath(gate.id)} className="link-button">
|
||||
<strong>{gate.title}</strong>
|
||||
</Link>
|
||||
<StatusBadge kind="milestone" status={gate.status} />
|
||||
<GateSteeringHint
|
||||
graphState={graphState}
|
||||
itemId={gate.id}
|
||||
siblingItems={items}
|
||||
/>
|
||||
</div>
|
||||
{progress?.total > 0 && (
|
||||
<p className="muted list-item-sub">
|
||||
Kriterien: {progress.closed}/{progress.total} erfüllt
|
||||
</p>
|
||||
)}
|
||||
{criteria.length > 0 && (
|
||||
<ol className="journey-gate-criteria-list">
|
||||
{criteria.map((criterion) => (
|
||||
<li
|
||||
key={criterion.id}
|
||||
className={
|
||||
'journey-gate-criterion' +
|
||||
(['satisfied', 'waived', 'deferred'].includes(criterion.status)
|
||||
? ' journey-gate-criterion--done'
|
||||
: '')
|
||||
}
|
||||
>
|
||||
<span className="journey-gate-criterion__title">{criterion.title}</span>
|
||||
<span className="muted journey-gate-criterion__status">
|
||||
{CRITERION_STATUS_LABELS[criterion.status] || criterion.status}
|
||||
</span>
|
||||
</li>
|
||||
))}
|
||||
</ol>
|
||||
)}
|
||||
{openCriteria.length === 0 && criteria.length > 0 && gate.status !== 'reached' && (
|
||||
<p className="muted list-item-sub">Alle Kriterien bearbeitet — Verify prüfen.</p>
|
||||
)}
|
||||
</div>
|
||||
</li>
|
||||
)
|
||||
})}
|
||||
</ul>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Link } from 'react-router-dom'
|
||||
import { actionPath, gatePath } from '../utils/routes.js'
|
||||
|
||||
const KIND_LABELS = {
|
||||
decision: 'Entscheidung',
|
||||
@@ -40,26 +41,17 @@ export function JourneyTimeline({ events, initiativeId, roadmapItems = [] }) {
|
||||
{event.summary && <p className="list-item-desc muted">{event.summary}</p>}
|
||||
<div className="journey-event-links">
|
||||
{event.roadmap_item_id && gateTitles[event.roadmap_item_id] && (
|
||||
<Link
|
||||
to={`/initiatives/${initiativeId}/plan/items/${event.roadmap_item_id}`}
|
||||
className="link-button"
|
||||
>
|
||||
<Link to={gatePath(event.roadmap_item_id)} className="link-button">
|
||||
Gate: {gateTitles[event.roadmap_item_id]}
|
||||
</Link>
|
||||
)}
|
||||
{event.kind === 'action' && (
|
||||
<Link
|
||||
to={`/initiatives/${initiativeId}/actions/${event.entity_id}`}
|
||||
className="link-button"
|
||||
>
|
||||
<Link to={actionPath(event.entity_id)} className="link-button">
|
||||
Arbeitspaket öffnen
|
||||
</Link>
|
||||
)}
|
||||
{event.kind === 'gate' && (
|
||||
<Link
|
||||
to={`/initiatives/${initiativeId}/plan/items/${event.entity_id}`}
|
||||
className="link-button"
|
||||
>
|
||||
<Link to={gatePath(event.entity_id)} className="link-button">
|
||||
Gate öffnen
|
||||
</Link>
|
||||
)}
|
||||
|
||||
Reference in new issue
Block a user