Enhance Exercise Progression Graph Panel and Path Builder with New Features
Deploy Development / deploy (push) Successful in 45s
Test Suite / pytest-backend (push) Successful in 48s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 14s
Test Suite / k6 /health Baseline (push) Successful in 33s
Test Suite / playwright-tests (push) Successful in 1m31s
Deploy Development / deploy (push) Successful in 45s
Test Suite / pytest-backend (push) Successful in 48s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 14s
Test Suite / k6 /health Baseline (push) Successful in 33s
Test Suite / playwright-tests (push) Successful in 1m31s
- Introduced a primary chain selection in the Exercise Progression Graph Panel to streamline exercise path management. - Updated the ProgressionChainEditor to support single path mode, allowing users to manage a single progression path more effectively. - Enhanced the ExerciseProgressionPathBuilder with improved logic for merging graph nodes into path steps and filtering gap offers. - Updated UI elements for better clarity and user experience, including new notifications and styling adjustments. - Incremented application version to reflect these updates.
This commit is contained in:
1 parent
800189ff8f
commit
8d5f0b533c
3 files changed
+224
-55
No files matched your search
@@ -277,6 +277,13 @@ export default function ExerciseProgressionGraphPanel({
|
||||
|
||||
const flowChains = useMemo(() => maximalLinearChains(nextEdgesFiltered), [nextEdgesFiltered])
|
||||
|
||||
const primaryChain = useMemo(() => {
|
||||
if (!flowChains.length) return null
|
||||
return flowChains.reduce((best, chain) =>
|
||||
chain.nodes.length >= best.nodes.length ? chain : best,
|
||||
)
|
||||
}, [flowChains])
|
||||
|
||||
const handleCreateGraph = async (e) => {
|
||||
e.preventDefault()
|
||||
const name = newGraphName.trim()
|
||||
@@ -566,17 +573,42 @@ export default function ExerciseProgressionGraphPanel({
|
||||
|
||||
{selectedGraphId && (
|
||||
<>
|
||||
<ProgressionChainEditor
|
||||
ref={chainEditorRef}
|
||||
graphId={selectedGraphId}
|
||||
chains={flowChains}
|
||||
busy={busy}
|
||||
anchorExerciseId={anchorExerciseId}
|
||||
anchorTitle={anchorTitle}
|
||||
onRefresh={async () => refreshEdges(selectedGraphId)}
|
||||
onPickExercise={setPickContext}
|
||||
loadVariantsForExercise={loadVariantsForExercise}
|
||||
/>
|
||||
<div
|
||||
className="card"
|
||||
style={{
|
||||
marginBottom: '12px',
|
||||
borderColor: 'color-mix(in srgb, var(--accent) 30%, var(--border))',
|
||||
}}
|
||||
>
|
||||
<h3 style={{ marginTop: 0, fontSize: '1rem' }}>Progressionspfad</h3>
|
||||
<p style={{ fontSize: '12px', color: 'var(--text3)', marginTop: 0, lineHeight: 1.45 }}>
|
||||
Der Graph enthält typischerweise <strong>einen linearen Pfad</strong> (Übung → Übung). Unten
|
||||
manuell bearbeiten oder mit dem KI-Planer erweitern — Speichern im KI-Wizard ersetzt den Pfad.
|
||||
</p>
|
||||
|
||||
<ProgressionChainEditor
|
||||
ref={chainEditorRef}
|
||||
graphId={selectedGraphId}
|
||||
chains={primaryChain ? [primaryChain] : []}
|
||||
busy={busy}
|
||||
anchorExerciseId={anchorExerciseId}
|
||||
anchorTitle={anchorTitle}
|
||||
onRefresh={async () => refreshEdges(selectedGraphId)}
|
||||
onPickExercise={setPickContext}
|
||||
loadVariantsForExercise={loadVariantsForExercise}
|
||||
singlePathMode
|
||||
/>
|
||||
|
||||
<ExerciseProgressionPathBuilder
|
||||
graphId={selectedGraphId}
|
||||
disabled={busy}
|
||||
graphChainNodes={primaryChain?.nodes ?? null}
|
||||
graphChainEdgeIds={primaryChain?.edges?.map((e) => e.id) ?? null}
|
||||
onSaved={async () => {
|
||||
await refreshEdges(selectedGraphId)
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="card" style={{ marginBottom: '12px' }}>
|
||||
<h3 style={{ marginTop: 0, fontSize: '1rem' }}>Schwestern & Alternativen</h3>
|
||||
@@ -671,19 +703,6 @@ export default function ExerciseProgressionGraphPanel({
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<details className="card" style={{ marginBottom: '12px' }}>
|
||||
<summary style={{ cursor: 'pointer', fontWeight: 600 }}>KI: Neuen Pfad planen (4 Schritte)</summary>
|
||||
<div style={{ marginTop: '14px' }}>
|
||||
<ExerciseProgressionPathBuilder
|
||||
graphId={selectedGraphId}
|
||||
disabled={busy}
|
||||
onSaved={async () => {
|
||||
await refreshEdges(selectedGraphId)
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<SkillProfilePanel
|
||||
title="Fähigkeiten entlang des Pfads"
|
||||
hint="Alle Übungen als Knoten im Graph (Standardgewicht pro Übung; Intensität und Stufen aus der Übungsverknüpfung)."
|
||||
|
||||
Reference in new issue
Block a user