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
@@ -1,11 +1,18 @@
|
||||
import { useCallback, useEffect, useState } from 'react'
|
||||
import { useInitiativeOperations } from '../../context/InitiativeOperationsContext.jsx'
|
||||
import { listInitiativeJourney } from '../../api/journey.js'
|
||||
import {
|
||||
listInitiativeRoadmapCriteriaProgress,
|
||||
listInitiativeRoadmapGraphState,
|
||||
listRoadmapItemCriteria,
|
||||
} from '../../api/roadmap.js'
|
||||
import { DecisionsSection } from '../../components/DecisionsSection.jsx'
|
||||
import { ReviewsSection } from '../../components/ReviewsSection.jsx'
|
||||
import { RecurringSection } from '../../components/RecurringSection.jsx'
|
||||
import { EvidenceSection } from '../../components/EvidenceSection.jsx'
|
||||
import { JourneyTimeline } from '../../components/JourneyTimeline.jsx'
|
||||
import { JourneyGateProgressSection, sortGatesForJourney } from '../../components/JourneyGateProgressSection.jsx'
|
||||
import { JourneyGateMapSection } from '../../components/JourneyGateMapSection.jsx'
|
||||
|
||||
export function InitiativeJourneyPage() {
|
||||
const ops = useInitiativeOperations()
|
||||
@@ -13,6 +20,10 @@ export function InitiativeJourneyPage() {
|
||||
const [journeyEvents, setJourneyEvents] = useState([])
|
||||
const [journeyLoading, setJourneyLoading] = useState(true)
|
||||
const [journeyError, setJourneyError] = useState(null)
|
||||
const [graphState, setGraphState] = useState(null)
|
||||
const [criteriaProgress, setCriteriaProgress] = useState({})
|
||||
const [criteriaByGate, setCriteriaByGate] = useState({})
|
||||
const [gateMetaLoading, setGateMetaLoading] = useState(true)
|
||||
|
||||
const loadJourney = useCallback(async () => {
|
||||
if (!id) return
|
||||
@@ -28,6 +39,53 @@ export function InitiativeJourneyPage() {
|
||||
}
|
||||
}, [id])
|
||||
|
||||
useEffect(() => {
|
||||
if (!id || !roadmapItems.length) {
|
||||
setGraphState(null)
|
||||
setCriteriaProgress({})
|
||||
setCriteriaByGate({})
|
||||
setGateMetaLoading(false)
|
||||
return undefined
|
||||
}
|
||||
let cancelled = false
|
||||
setGateMetaLoading(true)
|
||||
|
||||
Promise.all([
|
||||
listInitiativeRoadmapGraphState(id),
|
||||
listInitiativeRoadmapCriteriaProgress(id),
|
||||
])
|
||||
.then(async ([graph, progress]) => {
|
||||
if (cancelled) return
|
||||
setGraphState(graph || null)
|
||||
setCriteriaProgress(progress || {})
|
||||
const sortedFocus = sortGatesForJourney(roadmapItems, graph || null)
|
||||
.slice(0, 5)
|
||||
.map((item) => item.id)
|
||||
const criteriaEntries = await Promise.all(
|
||||
sortedFocus.map((gateId) =>
|
||||
listRoadmapItemCriteria(gateId)
|
||||
.then((criteria) => [gateId, Array.isArray(criteria) ? criteria : []])
|
||||
.catch(() => [gateId, []]),
|
||||
),
|
||||
)
|
||||
if (cancelled) return
|
||||
setCriteriaByGate(Object.fromEntries(criteriaEntries))
|
||||
})
|
||||
.catch(() => {
|
||||
if (!cancelled) {
|
||||
setGraphState(null)
|
||||
setCriteriaProgress({})
|
||||
setCriteriaByGate({})
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
if (!cancelled) setGateMetaLoading(false)
|
||||
})
|
||||
return () => {
|
||||
cancelled = true
|
||||
}
|
||||
}, [id, roadmapItems])
|
||||
|
||||
useEffect(() => {
|
||||
loadJourney()
|
||||
}, [loadJourney, ops.decisions, ops.reviews, ops.evidenceItems, ops.actions])
|
||||
@@ -40,6 +98,21 @@ export function InitiativeJourneyPage() {
|
||||
<>
|
||||
{error && <p className="error">{error}</p>}
|
||||
|
||||
<JourneyGateProgressSection
|
||||
items={roadmapItems}
|
||||
graphState={graphState}
|
||||
criteriaProgress={criteriaProgress}
|
||||
criteriaByGate={criteriaByGate}
|
||||
loading={gateMetaLoading}
|
||||
/>
|
||||
|
||||
<JourneyGateMapSection
|
||||
initiativeId={id}
|
||||
items={roadmapItems}
|
||||
graphState={graphState}
|
||||
loading={gateMetaLoading}
|
||||
/>
|
||||
|
||||
<section className="card journey-timeline-section">
|
||||
<h2>Journey</h2>
|
||||
<p className="section-lead muted">
|
||||
|
||||
Reference in new issue
Block a user