feat(exercises): update to version 0.8.100 and enhance combination exercise handling
Deploy Development / deploy (push) Successful in 38s
Test Suite / pytest-backend (push) Successful in 35s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 12s
Test Suite / playwright-tests (push) Successful in 56s

- Bumped app version to 0.8.100, reflecting recent updates.
- Improved validation logic for combination exercises in the backend, ensuring proper handling of exercise variants.
- Enhanced frontend components, including the ExercisePickerModal, to support filtering and displaying combination exercises.
- Updated API payloads and utility functions to accommodate new exercise types and their properties.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Sonnet 4.6 committed 2026-05-13 06:30:53 +02:00
1 parent 8a9f9f960f
commit 3dc4c9c79e
7 files changed
+162 -54

No files matched your search

+21 -4
View File
@@ -40,12 +40,28 @@ def _optional_positive_int(val, field_name: str) -> Optional[int]:
def _validate_variant_for_exercise(cur, exercise_id: Optional[int], variant_id: Optional[int]):
if not exercise_id:
if variant_id:
raise HTTPException(
status_code=400, detail="exercise_variant_id nur zusammen mit exercise_id erlaubt"
)
return
cur.execute(
"SELECT COALESCE(exercise_kind, 'simple') AS exercise_kind FROM exercises WHERE id = %s",
(int(exercise_id),),
)
ek_row = cur.fetchone()
if not ek_row:
raise HTTPException(status_code=400, detail="Übung nicht gefunden")
if str(r2d(ek_row).get("exercise_kind") or "simple").strip().lower() == "combination":
if variant_id:
raise HTTPException(
status_code=400,
detail="Kombinationsübungen haben keine Varianten — bitte exercise_variant_id weglassen",
)
return
if not variant_id:
return
if not exercise_id:
raise HTTPException(
status_code=400, detail="exercise_variant_id nur zusammen mit exercise_id erlaubt"
)
cur.execute(
"SELECT 1 FROM exercise_variants WHERE id = %s AND exercise_id = %s",
(variant_id, exercise_id),
@@ -434,6 +450,7 @@ def _fetch_sections(cur, unit_id: int) -> List[Dict[str, Any]]:
"""
SELECT tusi.*,
e.title AS exercise_title,
e.exercise_kind AS exercise_kind,
e.summary AS exercise_summary,
(
SELECT fa.name FROM exercise_focus_areas efa
+9 -2
View File
@@ -1,6 +1,6 @@
# Shinkan Jinkendo Version Information
APP_VERSION = "0.8.99"
APP_VERSION = "0.8.100"
BUILD_DATE = "2026-05-12"
DB_SCHEMA_VERSION = "20260512056"
@@ -24,7 +24,7 @@ MODULE_VERSIONS = {
"exercises": "2.24.0", # Phase 2: Kombinationsübungen exercise_kind/combination_slots + Archetyp/Profil (Migration 056)
"training_units": "0.2.0",
"training_programs": "0.1.0",
"planning": "0.9.0", # apply-training-module; Trainingsmodule-Bibliothek (Phase 1)
"planning": "0.9.1", # Kombinationsübungen: Sektionen PATCH/validator + exercise_kind GET; Frontend KEINE Varianten bei combination
"training_modules": "1.0.0",
"import_wiki": "1.0.0",
"admin": "1.0.0",
@@ -35,6 +35,13 @@ MODULE_VERSIONS = {
}
CHANGELOG = [
{
"version": "0.8.100",
"date": "2026-05-12",
"changes": [
"Planungs-API/UI: Kombinationsübungen in Trainingsseinheiten (exercise_kind in Sektions-Responses; PATCH verbietet exercise_variant_id für combination); ExercisePicker ohne simple-only Filter, Badge Kombination.",
],
},
{
"version": "0.8.99",
"date": "2026-05-12",