feat(A1): Progression Join-Graph und Multi-Strang-Horizon
Deploy Development / deploy (push) Successful in 52s
Test Suite / pytest-backend (push) Failing after 5m3s
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 3s
Test Suite / compose-smoke (push) Has been skipped
Deploy Development / deploy (push) Successful in 52s
Test Suite / pytest-backend (push) Failing after 5m3s
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 3s
Test Suite / compose-smoke (push) Has been skipped
join_gate, strand_project_id, Join-Auto-Schalten, multi-active Gates, Progression-Demo und PO-Lock-Spec. FE: Today strang-gruppiert, Join-Warteliste in Kontrolle. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
192a65a798
commit
3a0ef3a734
29 files changed
+1457
-230
No files matched your search
@@ -0,0 +1,55 @@
|
||||
import { useMemo } from 'react'
|
||||
import { EmptyState } from './EmptyState.jsx'
|
||||
|
||||
/**
|
||||
* A1 — Join-Schaltknoten: wartende Eingänge (kein Activity Set am Join).
|
||||
*/
|
||||
export function JoinWaitlistPanel({ progressionState = null }) {
|
||||
const joins = useMemo(() => {
|
||||
const list = progressionState?.joins || []
|
||||
return list.filter(
|
||||
(join) => join.status !== 'reached' && (join.pending_inputs?.length || 0) > 0,
|
||||
)
|
||||
}, [progressionState])
|
||||
|
||||
if (joins.length === 0) {
|
||||
return (
|
||||
<section className="card join-waitlist-panel">
|
||||
<h2>Join-Fortschritt</h2>
|
||||
<EmptyState message="Keine Joins warten auf Eingänge." />
|
||||
</section>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<section className="card join-waitlist-panel">
|
||||
<div className="section-header">
|
||||
<div>
|
||||
<h2>Join-Fortschritt</h2>
|
||||
<p className="section-lead muted">
|
||||
Konsolidierte Meilensteine — welche Strang-Gates fehlen noch zum Schalten?
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<ul className="item-list join-waitlist-panel__list">
|
||||
{joins.map((join) => (
|
||||
<li key={join.join_id} className="list-item card-list-item">
|
||||
<div className="list-item-main">
|
||||
<strong>{join.title}</strong>
|
||||
<p className="muted list-item-sub">
|
||||
Wartet auf:{' '}
|
||||
{(join.pending_inputs || [])
|
||||
.map((input) =>
|
||||
input.strand_title
|
||||
? `${input.strand_title} / ${input.title}`
|
||||
: input.title,
|
||||
)
|
||||
.join(' · ')}
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
@@ -16,7 +16,8 @@ export function MaturityStagePanel({
|
||||
.filter((item) => item.item_type === 'maturity_stage')
|
||||
.sort((a, b) => (a.sort_order ?? 0) - (b.sort_order ?? 0))
|
||||
|
||||
const activeStage = stages.find((s) => s.status === 'active')
|
||||
const activeStages = stages.filter((s) => s.status === 'active')
|
||||
const activeStage = activeStages[0]
|
||||
|
||||
useEffect(() => {
|
||||
if (!initiativeId) return undefined
|
||||
@@ -40,15 +41,20 @@ export function MaturityStagePanel({
|
||||
<EmptyState message="Noch keine Reifegrad-Stufen — unter Plan anlegen oder Starter-Kit nutzen." />
|
||||
) : (
|
||||
<>
|
||||
{activeStage && (
|
||||
{activeStages.length > 0 && (
|
||||
<>
|
||||
<p className="maturity-stage-active muted">
|
||||
Aktive Stufe:{' '}
|
||||
<Link to={gatePath(activeStage.id)} className="link-inline">
|
||||
<strong>{activeStage.title}</strong>
|
||||
</Link>
|
||||
Aktive Gate(s):{' '}
|
||||
{activeStages.map((stage, index) => (
|
||||
<span key={stage.id}>
|
||||
{index > 0 ? ' · ' : ''}
|
||||
<Link to={gatePath(stage.id)} className="link-inline">
|
||||
<strong>{stage.title}</strong>
|
||||
</Link>
|
||||
</span>
|
||||
))}
|
||||
</p>
|
||||
{activeProgress && (
|
||||
{activeStage && activeProgress && (
|
||||
<p className="maturity-stage-progress muted">
|
||||
Gate-Fortschritt:{' '}
|
||||
<strong>
|
||||
|
||||
@@ -12,10 +12,10 @@ function formatDueAt(iso) {
|
||||
}
|
||||
}
|
||||
|
||||
function activeMaturityStage(roadmapItems = []) {
|
||||
function activeMaturityStages(roadmapItems = []) {
|
||||
return [...roadmapItems]
|
||||
.filter((item) => item.item_type === 'maturity_stage' && item.status === 'active')
|
||||
.sort((a, b) => (a.sort_order ?? 0) - (b.sort_order ?? 0))[0]
|
||||
.sort((a, b) => (a.sort_order ?? 0) - (b.sort_order ?? 0))
|
||||
}
|
||||
|
||||
function practicesForStage(recurringItems = [], stageId) {
|
||||
@@ -32,20 +32,22 @@ export function RecurringRhythmPanel({
|
||||
canManage = false,
|
||||
embedded = true,
|
||||
}) {
|
||||
const stage = activeMaturityStage(roadmapItems)
|
||||
const stagePractices = practicesForStage(recurringItems, stage?.id)
|
||||
const stages = activeMaturityStages(roadmapItems)
|
||||
const stagePractices = stages.flatMap((stage) =>
|
||||
practicesForStage(recurringItems, stage.id),
|
||||
)
|
||||
const active = stagePractices.filter((item) => item.status === 'active')
|
||||
const paused = stagePractices.filter((item) => item.status === 'paused')
|
||||
|
||||
const body =
|
||||
!stage ? (
|
||||
<EmptyState message="Keine aktive Reifegrad-Stufe — Plan → Stufen prüfen." />
|
||||
stages.length === 0 ? (
|
||||
<EmptyState message="Keine aktiven Work-Gates — Plan → Struktur prüfen." />
|
||||
) : stagePractices.length === 0 ? (
|
||||
<EmptyState message="Keine Übungen für diese Stufe — Starter-Kit oder Stufenwechsel prüfen." />
|
||||
<EmptyState message="Keine Übungen auf aktiven Gates — Starter-Kit oder Join prüfen." />
|
||||
) : (
|
||||
<>
|
||||
<p className="recurring-rhythm-summary muted">
|
||||
Stufe <strong>{stage.title}</strong> — {active.length} aktiv
|
||||
{stages.length} aktive Gate(s) — {active.length} Übung(en) aktiv
|
||||
{paused.length > 0 ? `, ${paused.length} pausiert` : ''}.
|
||||
</p>
|
||||
<ul className="item-list recurring-rhythm-list">
|
||||
@@ -92,9 +94,9 @@ export function RecurringRhythmPanel({
|
||||
<section className="card recurring-rhythm-panel">
|
||||
<div className="section-header">
|
||||
<div>
|
||||
<h2>Übungen der Stufe</h2>
|
||||
<h2>Übungen der aktiven Gates</h2>
|
||||
<p className="section-lead muted">
|
||||
Activity Set der aktiven Reifegrad-Stufe — nicht die Gates selbst (A1).
|
||||
Activity Sets aller aktiven Work-Gates — Join-Knoten haben keine Übungen (A1).
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -13,17 +13,22 @@ function formatDue(iso) {
|
||||
}
|
||||
}
|
||||
|
||||
function activeMaturityStage(roadmapItems = []) {
|
||||
function activeWorkGates(roadmapItems = []) {
|
||||
return [...roadmapItems]
|
||||
.filter((item) => item.item_type === 'maturity_stage' && item.status === 'active')
|
||||
.sort((a, b) => (a.sort_order ?? 0) - (b.sort_order ?? 0))[0]
|
||||
.sort((a, b) => (a.sort_order ?? 0) - (b.sort_order ?? 0))
|
||||
}
|
||||
|
||||
function exercisesForStage(recurringItems = [], stageId) {
|
||||
const active = (recurringItems || []).filter((item) => item.status === 'active')
|
||||
if (!stageId) return active
|
||||
const bound = active.filter((item) => item.roadmap_item_id === stageId)
|
||||
return bound.length > 0 ? bound : active
|
||||
function exercisesForGate(recurringItems = [], gateId) {
|
||||
return (recurringItems || []).filter(
|
||||
(item) => item.status === 'active' && item.roadmap_item_id === gateId,
|
||||
)
|
||||
}
|
||||
|
||||
function strandLabel(gate, projectsById) {
|
||||
const projectId = gate.strand_project_id
|
||||
if (!projectId) return 'Training'
|
||||
return projectsById.get(projectId)?.title || 'Strang'
|
||||
}
|
||||
|
||||
function ExerciseRow({ exercise, canManage, busy, onCompleted }) {
|
||||
@@ -94,23 +99,33 @@ function ExerciseRow({ exercise, canManage, busy, onCompleted }) {
|
||||
}
|
||||
|
||||
/**
|
||||
* A1 — Heutige Übungen der aktiven Stufe (CadenceInstance je Übung).
|
||||
* A1 — Heutige Übungen aller aktiven Work-Gates, gruppiert nach Strang.
|
||||
*/
|
||||
export function WorkTodayPracticePanel({
|
||||
initiativeId,
|
||||
roadmapItems = [],
|
||||
recurringItems = [],
|
||||
projects = [],
|
||||
canManage = false,
|
||||
onCompleted,
|
||||
busy = false,
|
||||
}) {
|
||||
const stage = useMemo(() => activeMaturityStage(roadmapItems), [roadmapItems])
|
||||
|
||||
const todayExercises = useMemo(
|
||||
() => exercisesForStage(recurringItems, stage?.id),
|
||||
[recurringItems, stage?.id],
|
||||
const projectsById = useMemo(
|
||||
() => new Map((projects || []).map((project) => [project.id, project])),
|
||||
[projects],
|
||||
)
|
||||
|
||||
const gates = useMemo(() => activeWorkGates(roadmapItems), [roadmapItems])
|
||||
|
||||
const grouped = useMemo(() => {
|
||||
return gates.map((gate) => ({
|
||||
gate,
|
||||
strand: strandLabel(gate, projectsById),
|
||||
exercises: exercisesForGate(recurringItems, gate.id),
|
||||
}))
|
||||
}, [gates, recurringItems, projectsById])
|
||||
|
||||
const todayExercises = grouped.flatMap((group) => group.exercises)
|
||||
const pending = todayExercises.filter((item) => !item.today_completed)
|
||||
const allDone = todayExercises.length > 0 && pending.length === 0
|
||||
|
||||
@@ -120,20 +135,15 @@ export function WorkTodayPracticePanel({
|
||||
<div>
|
||||
<h2>Heutige Übungen</h2>
|
||||
<p className="section-lead muted">
|
||||
{stage ? (
|
||||
<>
|
||||
Aktive Stufe: <strong>{stage.title}</strong> — pro Übung erledigen, optional Messwert
|
||||
notieren.
|
||||
</>
|
||||
) : (
|
||||
'Tages-Tracking für die aktive Reifegrad-Stufe.'
|
||||
)}
|
||||
{gates.length > 0
|
||||
? `${gates.length} aktive Gate(s) — pro Übung erledigen, optional Messwert notieren.`
|
||||
: 'Tages-Tracking für aktive Work-Gates auf allen Strängen.'}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{todayExercises.length === 0 ? (
|
||||
<EmptyState message="Keine Übungen für die aktive Stufe — Starter-Kit oder Stufenwechsel prüfen." />
|
||||
<EmptyState message="Keine Übungen auf aktiven Gates — Starter-Kit oder Join-Fortschritt prüfen." />
|
||||
) : (
|
||||
<>
|
||||
{allDone && (
|
||||
@@ -141,17 +151,26 @@ export function WorkTodayPracticePanel({
|
||||
Alle Übungen für heute erledigt — nächste Fälligkeit morgen.
|
||||
</p>
|
||||
)}
|
||||
<ul className="item-list work-today-practice__list">
|
||||
{todayExercises.map((exercise) => (
|
||||
<ExerciseRow
|
||||
key={exercise.id}
|
||||
exercise={exercise}
|
||||
canManage={canManage}
|
||||
busy={busy}
|
||||
onCompleted={onCompleted}
|
||||
/>
|
||||
))}
|
||||
</ul>
|
||||
{grouped.map(({ gate, strand, exercises }) =>
|
||||
exercises.length === 0 ? null : (
|
||||
<div key={gate.id} className="work-today-practice__strand">
|
||||
<h3 className="work-today-practice__strand-title">
|
||||
{strand} — {gate.title}
|
||||
</h3>
|
||||
<ul className="item-list work-today-practice__list">
|
||||
{exercises.map((exercise) => (
|
||||
<ExerciseRow
|
||||
key={exercise.id}
|
||||
exercise={exercise}
|
||||
canManage={canManage}
|
||||
busy={busy}
|
||||
onCompleted={onCompleted}
|
||||
/>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
),
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
|
||||
|
||||
Reference in new issue
Block a user