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

@@ -263,6 +263,32 @@ def test_resolve_path_primary_topic_from_stage_learning_goal():
assert primary and "mawashi" in primary
def test_pick_roadmap_relaxed_for_non_technique_stage():
stage_goal = "Progression Hüftflexibilität und Adduktoren dehnen"
stage_brief = build_stage_match_brief(learning_goal=stage_goal)
hits = [
{
"id": 11,
"title": "Adduktoren Dehnung am Boden",
"summary": "Flexibilität Hüfte",
"goal": "Mobilität",
"score": 0.68,
"semantic_score": 0.22,
"stage_semantic_score": 0.22,
},
]
chosen = pick_best_path_hit(
hits,
set(),
stage_learning_goal=stage_goal,
roadmap_stage_match=True,
stage_match_brief=stage_brief,
path_primary_topic=None,
)
assert chosen is not None
assert int(chosen["id"]) == 11
def test_pick_rejects_kumite_when_primary_only_in_stage_goal():
brief = build_semantic_brief("Trainingsprogression")
stage_goal = "Perfektionierung der statischen Mawashi Geri Technik"