Implement Phase 3 Enhancements for Skill Scoring and Profiles
Deploy Development / deploy (push) Failing after 22s
Test Suite / pytest-backend (push) Successful in 35s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Failing after 3s
Test Suite / k6 /health Baseline (push) Successful in 33s
Test Suite / playwright-tests (push) Successful in 1m14s

- Added capabilities for weighted skill profiles, allowing trainers to compare training modules, frameworks, and regression paths based on skill contributions.
- Updated the skill scoring specification to include peer context separation and list filtering, ensuring accurate comparisons among visible artifacts of the same type.
- Enhanced the API to support batch summaries for skill profiles and discovery suggestions, improving data retrieval efficiency.
- Refactored frontend components to display skill metrics, including scores and peer percentages, with improved filtering options for better user experience.
- Updated documentation to reflect the latest changes and enhancements in the skill scoring system.
This commit is contained in:
Lars committed 2026-05-21 12:35:45 +02:00
1 parent a7a428745f
commit 1d698e4b0a
17 files changed
+296 -88

No files matched your search

@@ -39,14 +39,11 @@ import {
} from '../../utils/navReturnContext'
import { useBeforeUnloadWhen, useUnsavedChangesBlocker } from '../../hooks/useUnsavedChangesBlocker'
const INTENSITY_OPTIONS = [
{ value: '', label: '—' },
{ value: 'niedrig', label: 'niedrig' },
{ value: 'mittel', label: 'mittel' },
{ value: 'hoch', label: 'hoch' },
]
const VARIANT_DIFFICULTY = [
import {
EXERCISE_SKILL_INTENSITY_DEFAULT,
EXERCISE_SKILL_INTENSITY_OPTIONS,
normalizeExerciseSkillIntensity,
} from '../../constants/exerciseSkillIntensity' = [
{ value: '', label: '—' },
{ value: 'easier', label: 'Einfacher' },
{ value: 'same', label: 'Gleich' },
@@ -391,8 +388,7 @@ function detailToForm(exercise) {
skills:
exercise.skills?.map((s) => ({
skill_id: s.skill_id,
is_primary: s.is_primary || false,
intensity: s.intensity || '',
intensity: normalizeExerciseSkillIntensity(s.intensity),
required_level: normalizeSkillLevelSlug(s.required_level),
target_level: normalizeSkillLevelSlug(s.target_level),
})) || [],
@@ -820,8 +816,7 @@ function ExerciseFormPageRoot() {
...formData.skills,
{
skill_id: id,
is_primary: formData.skills.length === 0,
intensity: '',
intensity: EXERCISE_SKILL_INTENSITY_DEFAULT,
required_level: '',
target_level: '',
},
@@ -829,10 +824,10 @@ function ExerciseFormPageRoot() {
setSkillPick('')
}
const setSkillPrimary = (idx) => {
const removeSkillRow = (idx) => {
updateFormField(
'skills',
formData.skills.map((s, i) => ({ ...s, is_primary: i === idx })),
formData.skills.filter((_, i) => i !== idx),
)
}
@@ -843,12 +838,6 @@ function ExerciseFormPageRoot() {
)
}
const removeSkillRow = (idx) => {
const next = formData.skills.filter((_, i) => i !== idx)
if (next.length && !next.some((s) => s.is_primary)) next[0].is_primary = true
updateFormField('skills', next)
}
const performSaveAttempt = useCallback(
async ({ fromUnsavedDialog = false, closeAfter = false } = {}) => {
if (!formData.title || formData.title.trim().length < 3) {
@@ -1880,26 +1869,20 @@ function ExerciseFormPageRoot() {
</span>
) : null}
</div>
<label style={{ fontSize: '12px', display: 'flex', alignItems: 'center', gap: '4px' }}>
<input
type="radio"
name="skill-primary"
checked={row.is_primary}
onChange={() => setSkillPrimary(idx)}
/>
primär
<label className="exercise-filter-skill-level-field">
<span className="exercise-filter-skill-level-caption">Intensität</span>
<select
className="form-input"
value={normalizeExerciseSkillIntensity(row.intensity)}
onChange={(e) => updateSkillField(idx, 'intensity', e.target.value)}
>
{EXERCISE_SKILL_INTENSITY_OPTIONS.map((o) => (
<option key={o.value} value={o.value}>
{o.label}
</option>
))}
</select>
</label>
<select
className="form-input"
value={row.intensity || ''}
onChange={(e) => updateSkillField(idx, 'intensity', e.target.value)}
>
{INTENSITY_OPTIONS.map((o) => (
<option key={o.value || 'i'} value={o.value}>
{o.label}
</option>
))}
</select>
<select
className="form-input"
value={row.required_level || ''}