Enhance Progression Path Suggestion Logic and UI Feedback
Test Suite / pytest-backend (push) Successful in 41s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 13s
Test Suite / k6 /health Baseline (push) Successful in 33s
Test Suite / playwright-tests (push) Successful in 1m18s
Deploy Development / deploy (push) Successful in 44s

- Updated `suggest_progression_path` to include AI-generated gap fill offers when exercises are missing, improving the relevance of suggested paths.
- Introduced a match summary to provide insights on library matches and gap fill offers, enhancing user feedback in the `ProgressionGraphEditor`.
- Refined the `pick_best_path_hit` function to ensure proper handling of roadmap stage matches based on primary topics.
- Added tests to validate the new gap fill offer logic and match summary functionality, ensuring robustness in path suggestion features.
This commit is contained in:
Lars committed 2026-06-11 11:17:53 +02:00
1 parent 044ce2ee60
commit 8f1dad53ab
5 files changed
+121 -8

No files matched your search

@@ -71,6 +71,7 @@ export default function ProgressionGraphEditor({ graphId, embedded = false, onSa
const [busy, setBusy] = useState(false)
const [loadErr, setLoadErr] = useState('')
const [actionErr, setActionErr] = useState('')
const [matchNotice, setMatchNotice] = useState('')
const [pickContext, setPickContext] = useState(null)
const [pathQa, setPathQa] = useState(null)
const [gapFillOffers, setGapFillOffers] = useState([])
@@ -396,6 +397,7 @@ export default function ProgressionGraphEditor({ graphId, embedded = false, onSa
}
setMatching(true)
setActionErr('')
setMatchNotice('')
try {
const synced = syncProgressionRoadmapFromSlots(draft)
const override = majorStepsToOverridePayload(synced.slots)
@@ -427,6 +429,21 @@ export default function ProgressionGraphEditor({ graphId, embedded = false, onSa
setTargetSummary(res?.target_profile_summary || null)
setPathQa(res?.path_qa || null)
setGapFillOffers(remainingOffers)
const ms = res?.match_summary
if (ms) {
setMatchNotice(
`Match: ${ms.library_matches ?? 0}/${ms.slot_count ?? '?'} Slots aus Bibliothek, ${ms.gap_fill_offer_count ?? 0} KI-Angebote.`,
)
}
try {
await saveProgressionGraphDraft(api, graphId, {
...matched,
lastFindings: res?.path_qa || null,
})
setDraft((prev) => (prev ? { ...prev, dirty: false } : prev))
} catch (saveErr) {
console.warn('Match-Artefakt konnte nicht gespeichert werden', saveErr)
}
} catch (e) {
setActionErr(e.message || 'Übungs-Match fehlgeschlagen')
} finally {
@@ -868,6 +885,9 @@ export default function ProgressionGraphEditor({ graphId, embedded = false, onSa
{busy ? 'Speichern…' : 'Graph speichern'}
</button>
</div>
{matchNotice ? (
<p style={{ margin: '8px 0 0', fontSize: '11px', color: 'var(--accent-dark)' }}>{matchNotice}</p>
) : null}
{draft.dirty ? (
<p style={{ margin: '8px 0 0', fontSize: '11px', color: 'var(--accent-dark)' }}>
Ungespeicherte Änderungen