Commit Graph

113 Commits

Author SHA1 Message Date
1f2a4595cd feat: update version to 0.7.9 in changelog
Some checks failed
Deploy Development / deploy (push) Successful in 35s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m56s
- Added new version entry for 0.7.9 in the changelog, documenting the release date and changes related to exercise variants API enhancements.
2026-04-28 16:34:27 +02:00
d7e1a82a37 feat: update version to 0.8.0 and enhance training planning features
Some checks failed
Deploy Development / deploy (push) Successful in 33s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 6s
Test Suite / playwright-tests (push) Has been cancelled
- Incremented application version to 0.8.0 and updated database schema version to 20260428031.
- Introduced support for training plan templates, allowing users to create and manage reusable training structures.
- Enhanced the Training Planning UI to include sections and exercises, improving the organization of training units.
- Updated API endpoints for training plan templates, enabling CRUD operations for better integration with the frontend.
- Improved validation and permission checks for creating training units, ensuring proper access control.
2026-04-28 16:31:45 +02:00
7134fd1a25 feat: update version to 0.7.9 and enhance project documentation
Some checks failed
Deploy Development / deploy (push) Successful in 35s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m54s
- Incremented application version to 0.7.9 and updated database schema version to 20260427030.
- Revised project status documentation to reflect recent milestones and changes, including detailed logs of implemented features and next steps.
- Enhanced API specifications for exercises, including support for exercise variants and improved query parameters.
- Updated frontend routing to streamline exercise variant management within the ExerciseFormPage.
- Implemented role-based media upload limits and refined search/filter specifications for better user experience.
2026-04-28 16:18:25 +02:00
d5fbc2cd5c refactor: update loading state management and enhance search functionality in ExercisesListPage
Some checks failed
Deploy Development / deploy (push) Successful in 35s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 6s
Test Suite / playwright-tests (push) Failing after 1m55s
- Replaced loading state with listFetching for clearer intent in managing exercise list fetching.
- Introduced search title suggestions for improved user experience during exercise searches.
- Updated UI elements to reflect changes in loading states and added datalist for search inputs, enhancing usability.
- Adjusted text for loading indicators to provide a more localized experience.
2026-04-28 15:24:05 +02:00
756263bad4 feat: implement dynamic upload limits for exercise media
Some checks failed
Deploy Development / deploy (push) Successful in 33s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 6s
Test Suite / playwright-tests (push) Failing after 1m54s
- Introduced role-based upload limits for exercise media, allowing users to upload up to 1 MB while admins and superadmins can upload up to 1024 MB.
- Updated the media upload logic to enforce these limits, enhancing the flexibility and control over media management in the application.
2026-04-28 13:56:26 +02:00
91b3fec5cc feat: enhance RichTextEditor and exercise variant management
Some checks failed
Deploy Development / deploy (push) Successful in 33s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 6s
Test Suite / playwright-tests (push) Failing after 1m55s
- Added support for saving and restoring text selection in the RichTextEditor, improving user experience during formatting.
- Updated CSS styles for the RichTextEditor to enhance list formatting and overall appearance.
- Introduced new ExerciseVariantFields component to streamline the editing of exercise variants, including fields for variant name, description, execution changes, and more.
- Enhanced ExerciseFormPage to manage exercise variants more effectively, including improved state handling and UI updates for variant selection.
2026-04-28 13:09:42 +02:00
1ee1a2f2d9 feat: update version to 0.7.9 and enhance exercise variant management
Some checks failed
Deploy Development / deploy (push) Successful in 35s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 6s
Test Suite / playwright-tests (push) Failing after 2m0s
- Incremented application version to 0.7.9 and updated changelog to reflect new features.
- Added support for creating, updating, and deleting exercise variants via new API endpoints.
- Implemented functionality for reordering exercise variants, improving user experience in managing exercise options.
- Enhanced frontend components to display and manage exercise variants, including detailed information and editing capabilities.
2026-04-28 10:59:09 +02:00
cf9f95377c feat: update version to 0.7.8 and enhance exercise variant handling
Some checks failed
Deploy Development / deploy (push) Successful in 34s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m57s
- Incremented application version to 0.7.8 and updated database schema version to 20260427030.
- Added support for including exercise variants in the exercise listing API, improving training planning capabilities.
- Enhanced training unit creation and update logic to validate exercise variant IDs, ensuring proper associations.
- Updated frontend components to support exercise variant selection, improving user experience in training planning.
2026-04-28 09:30:33 +02:00
2c831d6cea refactor: enhance filtering logic and UI for ExercisesListPage
Some checks failed
Deploy Development / deploy (push) Successful in 34s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 2m1s
- Removed the countActiveFilterGroups function and replaced it with a more comprehensive filterChips implementation to manage active filters.
- Improved the rendering of active filters with dynamic chips that allow users to remove individual filters.
- Updated the UI to reflect the new filtering logic, enhancing user experience and interaction with the filter options.
- Adjusted the layout and styling for better visibility and usability of the filter components.
2026-04-28 08:58:17 +02:00
0d4ad9a2c8 feat: implement exercise filter modal and enhance filtering logic
Some checks failed
Deploy Development / deploy (push) Successful in 34s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 2m3s
- Added a new exercise filter modal with improved layout and styling for better user experience.
- Introduced initial filter state and logic to count active filter groups, enhancing the filtering capabilities on the ExercisesListPage.
- Updated CSS styles to support the new modal and improve overall UI consistency.
- Implemented keyboard accessibility for closing the filter modal, enhancing usability.
2026-04-28 08:21:55 +02:00
fd2009294b feat: enhance exercise filtering and UI components
Some checks failed
Deploy Development / deploy (push) Successful in 32s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m54s
- Introduced multi-select functionality for filtering exercises by focus areas, style directions, training types, target groups, and skills, allowing users to select multiple options.
- Updated the ExercisesListPage to utilize the new multi-select component, improving the user experience for filtering exercises.
- Enhanced backend filtering logic to support new array-based query parameters, ensuring efficient handling of multiple filter criteria.
- Adjusted CSS styles for better layout and usability of the exercise filters.
2026-04-28 08:02:08 +02:00
025b161d2f feat: enhance exercise mapping and filtering capabilities
Some checks failed
Deploy Development / deploy (push) Successful in 36s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 6s
Test Suite / playwright-tests (push) Failing after 1m56s
- Added support for style direction mappings in the backend, allowing for improved categorization of exercises.
- Introduced a new function to normalize property synonyms, enhancing the mapping of exercise properties.
- Updated the exercise catalog assignment logic to include style directions, ensuring proper database entries.
- Enhanced the ExercisesListPage with new filtering options for style directions, improving user experience and search capabilities.
2026-04-28 07:25:33 +02:00
76098f5244 feat: update capability levels and enhance exercise filtering
Some checks failed
Deploy Development / deploy (push) Successful in 36s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m55s
- Updated capability level mappings in the backend to reflect new terminology (e.g., "einsteiger" to "basis" and "experte" to "optimierung").
- Refactored the exercise management logic to normalize skill levels using canonical slugs, improving consistency across the application.
- Enhanced the ExercisesListPage with additional filtering options for style direction, training type, and target group, along with AI search capabilities.
- Incremented application version to 0.7.7 and updated changelog to document these changes.
2026-04-27 18:25:23 +02:00
c6d20e4dec feat: add listTrainingStyles to API utility functions
Some checks failed
Deploy Development / deploy (push) Successful in 36s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 6s
Test Suite / playwright-tests (push) Failing after 1m55s
- Introduced listTrainingStyles function to the API utility, enhancing the capabilities for managing training styles.
- This addition supports improved data retrieval for training-related features in the application.
2026-04-27 15:03:48 +02:00
0ad096e483 feat: enhance SQL query handling and UI components for exercise management
Some checks failed
Deploy Development / deploy (push) Successful in 36s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Has been cancelled
- Introduced a new utility function to streamline SQL query construction for active status filtering, improving code reusability across multiple endpoints.
- Updated existing query logic in the catalogs and skills routers to utilize the new utility function, ensuring consistent handling of active status.
- Refactored the ExerciseFormPage to remove deprecated age group handling, simplifying the form structure.
- Enhanced the RichTextEditor component with improved link handling and formatting options for better user experience.
- Updated API utility functions to support new AI features for exercise suggestions and regeneration, expanding the capabilities of the exercise management system.
2026-04-27 15:01:47 +02:00
d8f439a3e5 feat: enhance exercise management with training types and rich text support
Some checks failed
Deploy Development / deploy (push) Successful in 36s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 6s
Test Suite / playwright-tests (push) Failing after 1m58s
- Added support for training types in exercise creation and updates, allowing for better categorization of exercises.
- Implemented a rich text editor for exercise descriptions, improving content formatting capabilities.
- Updated the ExerciseDetailPage to display training types and enhanced the layout for better user experience.
- Refactored ExerciseFormPage to accommodate new multi-association fields for training styles, types, and target groups.
- Improved API payload handling to include training types and ensure proper data structure for exercise management.
- Enhanced the ExercisesListPage with improved loading and filtering functionalities for better performance.
2026-04-27 14:48:46 +02:00
cb11e39201 feat: enhance exercise management and media handling
Some checks failed
Deploy Development / deploy (push) Successful in 36s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m54s
- Introduced new API endpoints for managing exercise media, including upload, update, delete, and reorder functionalities.
- Updated the exercise creation and update logic to ensure goal and execution fields are validated and normalized.
- Refactored frontend components to support the new exercise media features, including a dedicated import section for complete stack files.
- Removed the deprecated ExercisesPage component and replaced it with a more modular structure for exercise management.
- Incremented database schema version to 20260427028 and updated changelog to reflect these changes.
2026-04-27 14:27:25 +02:00
2452b5e2e8 feat: update version to 0.7.6 and add matrix stack bundle functionality
Some checks failed
Deploy Development / deploy (push) Successful in 34s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m54s
- Incremented application version to 0.7.6 and updated maturity models version to 1.4.0.
- Introduced new API endpoints for exporting and importing matrix stack bundles, enhancing the capabilities for managing maturity models and context bindings.
- Updated frontend components to support the new matrix stack export and import features, including UI elements for stack management.
- Documented changes in the changelog for version 0.7.6, detailing the new matrix stack functionality and its usage.
2026-04-27 13:13:36 +02:00
863535aa26 feat: update version to 0.7.5 and enhance maturity model binding logic
Some checks failed
Deploy Development / deploy (push) Successful in 36s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m55s
- Incremented application version to 0.7.5 and updated maturity model version to 1.3.1.
- Improved binding logic to ensure that only relevant entries are considered based on the presence of context bindings.
- Updated documentation to clarify the behavior of binding resolution and its impact on legacy model resolution.
- Documented changes in the changelog for version 0.7.5, detailing the new binding resolution rules.
2026-04-27 13:05:18 +02:00
f2c007cc68 feat: update version to 0.7.4 and enhance maturity model functionality
Some checks failed
Deploy Development / deploy (push) Successful in 36s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m59s
- Incremented application version to 0.7.4 and updated database schema version to 20260427027.
- Enhanced maturity model context bindings to support new filtering options for training styles.
- Introduced new API endpoints for importing and exporting maturity model bundles.
- Updated frontend components to include a matrix view and improved admin UI for managing maturity models.
- Documented changes in the changelog for version 0.7.4, detailing new features and improvements.
2026-04-27 12:48:22 +02:00
3397b2094d feat: update version to 0.7.3 and enhance maturity model context bindings
Some checks failed
Deploy Development / deploy (push) Successful in 38s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m55s
- Incremented application version to 0.7.3 and updated database schema version to 20260427026.
- Enhanced maturity model context bindings with new hierarchical resolution logic for focus areas, style directions, and training types.
- Added new API endpoints for managing maturity model context bindings.
- Updated frontend components to support the new context binding functionality and improved admin UI for better user experience.
- Documented changes in the changelog for version 0.7.3, including new features and improvements.
2026-04-27 12:35:48 +02:00
469ec93074 feat: enhance admin UI for maturity models and skills catalog
Some checks failed
Deploy Development / deploy (push) Successful in 36s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 6s
Test Suite / playwright-tests (push) Failing after 1m55s
- Added new styles and layout for the maturity models admin panel, improving user experience.
- Removed unused multi-selection component for focus areas, style directions, and target groups.
- Updated skills catalog functionality to support editing and sorting of main categories and skills.
- Introduced a modal for editing main categories, categories, and skills with improved accessibility.
- Enhanced responsiveness and visual consistency across admin components.
2026-04-27 12:19:22 +02:00
e8b7e62832 feat: add skill main categories and enhance skills catalog functionality
Some checks failed
Deploy Development / deploy (push) Successful in 48s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m57s
- Introduced endpoints for managing skill main categories, including CRUD operations.
- Enhanced skills catalog endpoint to support hierarchical sorting by main category and category.
- Updated frontend API utility functions to include new skill main category operations.
- Improved admin interface for skills management with new layout and styles.
- Documented changes in the changelog for better tracking of new features and updates.
2026-04-27 11:53:25 +02:00
f1ee1eec7e feat: update maturity models and version to 0.7.2
Some checks failed
Deploy Development / deploy (push) Successful in 35s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m55s
- Incremented application version to 0.7.2 and updated database schema version to 20260427025.
- Enhanced maturity models functionality to support M:N relationships for focus areas, style directions, and target groups.
- Updated frontend to allow multi-selection for focus areas, style directions, and target groups.
- Documented changes in the changelog for version 0.7.2, including new migration details and UI improvements.
2026-04-27 11:42:03 +02:00
5277f4f4cf feat: add maturity models functionality and update version
Some checks failed
Deploy Development / deploy (push) Successful in 34s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m55s
- Introduced new maturity models feature with CRUD operations in the API.
- Added routes and frontend components for managing maturity models.
- Updated version to 0.7.1 with corresponding build date and schema version.
- Enhanced admin navigation to include maturity models section.
- Documented changes in the changelog for version 0.7.1.
2026-04-27 11:32:30 +02:00
5626be792f docs: Dokumentation aktualisiert für Skills-Import Complete
Some checks failed
Deploy Development / deploy (push) Successful in 34s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m54s
Updates:
- DATABASE_SCHEMA.md v0.4.0 (Migration 022+023, Skills-Hierarchie)
- DOMAIN_MODEL.md v0.4.0 (Fähigkeiten-Domäne, Fokusbereich-Zuordnung)
- MEDIAWIKI_IMPORT_SPEC.md v1.1 (Skills via Migration statt API)
- PROJECT_STATUS.md (NEU - Projekt-Übersicht & Deployment-Status)

Änderungen:
- 69 Skills mit Kategorisierung dokumentiert
- Haupt-/Unterkategorien (KARATE/ALLGEMEINE)
- Fokusbereich-Zuordnung (karate/universal)
- Level-Definitionen-Schema
- Migration 021 als DEPRECATED markiert
- Deployment-Status aktualisiert
- Lessons Learned dokumentiert
2026-04-27 11:18:49 +02:00
e8eba57b3a feat: Migration 022+023 - Vollständiger Skills-Import
Some checks failed
Deploy Development / deploy (push) Successful in 36s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m55s
- Migration 022: Schema-Erweiterung
  - skill_main_categories (KARATE / ALLGEMEINE)
  - skills.main_category_id + focus_areas JSONB
  - skill_level_definitions Tabelle
  - Indizes für Performance

- Migration 023: Produktionsreifer Skills-Import
  - 69 Skills mit vollständiger Kategorisierung
  - 2 Haupt-Kategorien, 9 Unterkategorien
  - KARATE: 32 Skills (karate focus)
  - ALLGEMEINE: 37 Skills (universal focus)
  - Duplikat-Bereinigung (Timing, Antizipation, etc.)

- Scripts:
  - parse_matrix.py: Extrahiert Skills aus Fähigkeitsmatrix
  - generate_migration_023_direct.py: Generiert Migration direkt aus Matrix

Source: https://karatetrainer.net/index.php?title=Fähigkeitsmatrix

Verified auf Dev: 69 Skills importiert, korrekte Kategorisierung
2026-04-27 10:58:33 +02:00
97c1bb0c8b feat: import 18 base skills from Fähigkeitsmatrix
Some checks failed
Deploy Development / deploy (push) Successful in 36s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 2m10s
Imported from https://karatetrainer.net/index.php?title=Fähigkeitsmatrix
- 9 skill categories (Kihon, Kumite, Kata, etc.)
- 18 core skills with descriptions

This enables skill-level assignments for imported exercises.
2026-04-27 10:26:10 +02:00
1ddbd76e36 fix: add UNIQUE constraint to exercise_skills table
Some checks failed
Deploy Development / deploy (push) Failing after 28s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 13s
Test Suite / playwright-tests (push) Failing after 2m2s
Fixes: 'no unique or exclusion constraint matching the ON CONFLICT specification'
ON CONFLICT (exercise_id, skill_id) requires UNIQUE constraint.

This was causing 91 import failures.
2026-04-27 10:00:02 +02:00
a02df32ce2 fix: set created_by automatically on MediaWiki import
Some checks failed
Deploy Development / deploy (push) Successful in 37s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m58s
- Added imported_by parameter to _run_import and _upsert_exercise
- Exercises now automatically get created_by set to importing user
- Fixes visibility issue where imported exercises were invisible

Related: Wiki import - exercise visibility fix
2026-04-27 09:52:18 +02:00
e6ce7e241c fix: convert skill target_level to INTEGER instead of string
Some checks failed
Deploy Development / deploy (push) Successful in 54s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m55s
- build_skill_assignments() now returns INTEGER (1-5) for target_level
- Previously returned string names ('einsteiger', 'grundlagen', etc.)
- Caused 91/95 import failures with 'invalid input syntax for type integer'
- Remaining 4 failures are wiki pages missing both goal AND execution (invalid data)

Issue: Wiki import - dict-cursor fixes phase 2
2026-04-27 09:30:29 +02:00
97a7fe7cba fix: reimport dict-cursor bug + add admin cleanup endpoint
Some checks failed
Deploy Development / deploy (push) Successful in 54s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m55s
Problem 1: Reimport fails completely (all exercises fail)
Root cause: Line 465 existing[0] instead of existing['id']
Fix: Changed to existing['id'] for dict-cursor compatibility

Problem 2: 221 exercises skipped, only 2 in database
Root cause: Orphaned wiki_import_references from failed imports
Fix: New admin endpoint to manually cleanup orphaned references

New endpoints:
- DELETE /api/import/mediawiki/admin/cleanup-orphaned-references
  Deletes all references where local_id doesn't exist in target table
  Returns count of deleted references per type

- GET /api/import/mediawiki/admin/stats
  Shows references vs. actual count + orphaned count
  Helps diagnose import state issues

Usage:
1. Call cleanup endpoint to remove orphaned references
2. Run normal import (reimport=false)
3. Should import all previously failed exercises
2026-04-27 08:52:05 +02:00
3a4160fd1c fix: detect and cleanup orphaned import references
Some checks failed
Deploy Development / deploy (push) Successful in 38s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m54s
Problem: 221 exercises skipped, but only 2 actually in database
Root cause: Failed imports created wiki_import_references entries,
but exercises were never saved (due to earlier bugs)

Duplicate check only verified references existed, not actual data.
Result: All subsequent imports skipped 'already imported' items.

Solution:
- Enhanced duplicate check to verify BOTH reference AND actual entity
- If reference exists but entity is missing → delete orphaned reference
- Item will be re-imported on same run (no manual cleanup needed)

Check logic:
1. Find reference in wiki_import_references
2. Check if exercises/skills/methods table has matching local_id
3. If both exist → skip (true duplicate)
4. If reference exists but entity missing → delete reference + re-import

This auto-heals broken state from previous failed imports.
2026-04-27 08:45:27 +02:00
1a0708f152 fix: correct remaining dict cursor access (row[0] → row['id'])
Some checks failed
Deploy Development / deploy (push) Successful in 35s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 6s
Test Suite / playwright-tests (push) Failing after 1m57s
Error: 100 exercises failed with error '0' (TypeError suppressed)
Root cause: More row[0] dict access in catalog assignment functions

Previous fix only covered fetchone()[0] in RETURNING clauses.
Missed 6 more locations in SELECT queries where row is dict-like.

Fixed locations:
- Line 511: focus_area_id in exercise_focus_areas INSERT
- Line 524: style_direction_id in exercise_training_styles INSERT
- Line 535: target_group_id in exercise_target_groups INSERT
- Line 546: skill_id in exercise_skills INSERT
- Line 568: skill_id in exercise_skills INSERT (with levels)
- Line 589: category_id assignment in _upsert_skill

All changed from row[0] to row['id'] for RealDictCursor compatibility.

This should fix the remaining 100 import failures.
2026-04-27 08:24:35 +02:00
bcc7d61d07 fix: make exercise goal and execution optional (at least one required)
Some checks failed
Deploy Development / deploy (push) Successful in 36s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m54s
Error: 224/225 exercises failed with NOT NULL constraint violations
Root cause: exercises table requires BOTH goal AND execution (NOT NULL)
Reality: Many wiki exercises have only ONE of these fields

Migration 019:
- ALTER COLUMN goal DROP NOT NULL
- ALTER COLUMN execution DROP NOT NULL
- ADD CHECK constraint: (goal IS NOT NULL OR execution IS NOT NULL)

This allows:
✓ Exercises with only goal
✓ Exercises with only execution
✓ Exercises with both
✗ Exercises with neither (CHECK constraint fails)

Import validation already correct (line 312):
required_ok = bool(mapped.get('goal') or mapped.get('execution'))

DB schema was blocking valid exercises.
2026-04-24 20:42:21 +02:00
a37400bb22 fix: correct dict cursor access in MediaWiki import
Some checks failed
Deploy Development / deploy (push) Successful in 34s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 2m2s
Error: 500 Internal Server Error on execute import
Root cause: Using fetchone()[0] with RealDictCursor (dict-like rows)

PostgreSQL RealDictCursor returns dict-like objects, not tuples.
Accessing [0] on a dict throws TypeError.

Fix: Changed all fetchone()[0] to fetchone()['id']
Locations:
- Line 163: log_id after INSERT INTO wiki_import_log
- Line 485: ex_id after INSERT INTO exercises
- Line 599: skill_id after INSERT INTO skills
- Line 616: method_id after INSERT INTO training_methods

This matches the pattern used in other routers (exercises.py, etc.)
2026-04-24 20:37:31 +02:00
8b51864b53 feat: add recursive subcategory search for MediaWiki import
Some checks failed
Deploy Development / deploy (push) Successful in 34s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 2m2s
Issue: Only 2 exercises found instead of 200+
Root cause: Exercises likely organized in subcategories

Solution:
- Added recursive parameter to get_category_members()
- New _get_subcategories() helper method
- Recursively traverses all subcategories
- Logs subcategory counts for debugging

Behavior:
- get_category_members('Übungen') now finds:
  1. All pages directly in 'Kategorie:Übungen'
  2. All subcategories (e.g. 'Kihon', 'Kata', 'Kumite')
  3. All pages in those subcategories (recursive)

Example structure:
Kategorie:Übungen
├─ Seite: Übung A (2 direkte)
├─ Kategorie:Kihon
│  ├─ Seite: Mae-Geri
│  └─ Seite: Gyaku-Zuki
└─ Kategorie:Kata
   └─ Seite: Heian Shodan
2026-04-24 17:53:11 +02:00
9d041aaf4f fix: add MediaWiki credentials to docker-compose
Some checks failed
Deploy Development / deploy (push) Successful in 37s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m55s
Error: MediaWiki Login fehlgeschlagen: The supplied credentials could not be authenticated
Root cause: MEDIAWIKI_USER and MEDIAWIKI_PASSWORD were empty in container

Fix:
- Set MEDIAWIKI_USER: Jinkendo
- Set MEDIAWIKI_PASSWORD: Jinkendo6970
- karatetrainer.net requires authentication for API access

Note: Credentials are for read-only access to public training wiki
Local .env file also updated (not committed, in .gitignore)
2026-04-24 17:42:28 +02:00
f54d8b2e03 fix: add MediaWiki environment variables to docker-compose
Some checks failed
Deploy Development / deploy (push) Successful in 33s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m54s
Error: 500 Internal Server Error on MediaWiki import
Root cause: MEDIAWIKI_API_URL not configured in container

Fix:
- Added MEDIAWIKI_API_URL: https://karatetrainer.net/api.php
- Added MEDIAWIKI_USER, MEDIAWIKI_PASSWORD (optional, uses .env)
- Added category name overrides (4 categories)

Public wiki access (read-only) does not require authentication.
User/password only needed for write operations.

Note: .env file created locally but not committed (in .gitignore)
Users should copy .env.example and set their credentials if needed.
2026-04-24 17:18:47 +02:00
c738f1234b fix: MediaWiki import - increase limit to 500 and add validation
Some checks failed
Deploy Development / deploy (push) Successful in 35s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 6s
Test Suite / playwright-tests (push) Failing after 1m54s
Error: 422 Unprocessable Entity when limit > 100
Root cause: Backend enforced max=100, frontend allowed any value

Backend fix:
- Increased preview limit from 100 to 500 (consistent with execute)
- import_wiki.py line 64: le=100 → le=500

Frontend fix:
- Added Math.min/max validation to both limit inputs
- Preview limit: max 500 with auto-clamp
- Execute limit: max 500 with auto-clamp
- Updated placeholder: 'Kein Limit (max 500)'

Prevents 422 errors from invalid limit values
2026-04-24 17:15:17 +02:00
89055ddbc4 feat: Admin page navigation with MediaWiki Import link
Some checks failed
Deploy Development / deploy (push) Successful in 36s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m55s
- New AdminPageNav component with horizontal navigation
- Links to Hierarchie / Kataloge / Wiki-Import
- Integrated in all 3 admin pages
- Uses lucide-react icons (TreePine, FolderTree, Download)
- Active state tracking via useLocation
- Mobile-friendly with flexbox layout

Navigation flow:
/admin/hierarchy → /admin/catalogs → /admin/mediawiki-import
2026-04-24 17:03:13 +02:00
df569bbf6e fix: auth register - correct column name created_at
Some checks failed
Deploy Development / deploy (push) Successful in 38s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 6s
Test Suite / playwright-tests (push) Failing after 1m54s
Error: column 'created' of relation 'profiles' does not exist
Fix: Changed 'created' to 'created_at' in INSERT statement
Line: backend/routers/auth.py:247
2026-04-24 16:07:13 +02:00
46d000d6b3 feat: SMW-Importer Frontend (Phase 2 complete)
Some checks failed
Test Suite / lint-backend (push) Waiting to run
Test Suite / build-frontend (push) Waiting to run
Test Suite / playwright-tests (push) Blocked by required conditions
Deploy Development / deploy (push) Has been cancelled
Phase 2A: API Functions
- 5 MediaWiki import functions in api.js
- previewMediaWikiImport, executeMediaWikiImport
- getMediaWikiImportStatus, listMediaWikiImportLogs
- deleteMediaWikiImportReference

Phase 2B: UI Component
- MediaWikiImportPage.jsx (3-tab interface)
- Preview Tab: Category selection, preview with accordions
- Execute Tab: Import form with status polling
- History Tab: Import log list with refresh

Phase 2C: Routing
- Added /admin/mediawiki-import route in App.jsx
- Import and ProtectedRoute wrapper

Issue: SMW-Importer Frontend (Option C from handover)
Related: backend/routers/csv_import.py (MediaWiki endpoints)
2026-04-24 16:06:49 +02:00
a67cc5f812 fix: exercises.py - use direct VARCHAR for age_groups (no catalog table in Shinkan)
Some checks failed
Deploy Development / deploy (push) Successful in 37s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 6s
Test Suite / playwright-tests (push) Failing after 2m0s
2026-04-24 15:27:11 +02:00
a6ea5b95eb fix: exercises.py - correct table name exercise_style_directions (all 3 occurrences)
Some checks failed
Deploy Development / deploy (push) Successful in 36s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Has been cancelled
2026-04-24 15:25:17 +02:00
b617b5a2d8 fix: exercises.py - handle dict rows in fetchone() for INSERT RETURNING
Some checks failed
Deploy Development / deploy (push) Successful in 33s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 6s
Test Suite / playwright-tests (push) Has been cancelled
2026-04-24 15:23:00 +02:00
e80c8e01e1 fix: add listTrainingStyles alias for backward-compatibility (references listStyleDirections)
Some checks failed
Deploy Development / deploy (push) Successful in 33s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Has been cancelled
2026-04-24 15:20:39 +02:00
711bdc99cb fix: Migration 014 - correct table name exercise_style_directions (not exercise_training_styles)
Some checks failed
Deploy Development / deploy (push) Successful in 35s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 6s
Test Suite / playwright-tests (push) Failing after 1m54s
2026-04-24 15:10:26 +02:00
01ed5509f8 feat: Exercises v2.0 + Migrations 014/016/017 (Clean-Room Rebuild)
Some checks failed
Deploy Development / deploy (push) Successful in 36s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 6s
Test Suite / playwright-tests (push) Failing after 1m54s
BREAKING CHANGES:
- exercises.py komplett neu gebaut (kein Legacy-Code)
- Legacy-Felder entfernt: age_groups, focus_area, secondary_areas, training_character
- Nur M:N Relations, keine JSONB-Kataloge

Migrations:
- Migration 014: Variant Progression + Search Vector + Legacy DROP
  - exercise_variants: progression_level, sequence_order, prerequisite_variant_id
  - exercises: search_vector (tsvector für Volltext-Suche)
  - DROP age_groups, focus_area, secondary_areas, training_character
  - Helper: update_timestamp() Funktion für Triggers
- Migration 016: Saved Exercise Searches
  - saved_exercise_searches (profile_id, name, filters JSONB)
- Migration 017: Exercise Blocks + Template Blocks
  - exercise_blocks (name, description, goal, is_template)
  - exercise_block_items (exercise_id, variant_id, sequence_order, is_placeholder, placeholder_criteria)

Backend (exercises.py v2.0):
- GET /exercises: Volltext-Suche via tsvector, M:N Joins
- GET /exercises/{id}: enrich_exercise_detail() mit allen M:N Relations
- POST /exercises: M:N Relations (focus_areas_multi, training_styles_multi, target_groups_multi, age_groups, skills)
- PUT /exercises: Partial Update + M:N Relations
- DELETE /exercises: Cascade-Check für exercise_block_items

Architecture:
- Issue #53 konform: Import = Feld-Zuordnung, keine fachliche Interpretation
- Helper: enrich_exercise_detail() für vollständige Objekte
- Helper: assign_exercise_relations() für M:N Management (DELETE+INSERT Pattern)

Docs:
- SMW_IMPORTER_GAP_ANALYSIS.md: Vollständige Gap-Analyse + Umsetzungsplan

Version: 0.7.0
Module: exercises 2.0.0
Schema: 20260424002
2026-04-24 15:04:27 +02:00
6801c60604 feat: Add MediaWiki import functionality with tracking and mapping
Some checks failed
Deploy Development / deploy (push) Successful in 35s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m55s
- Implemented a new SQL migration for wiki import tracking tables.
- Created an import router for handling MediaWiki imports of exercises, skills, and methods.
- Developed a Semantic MediaWiki API client for direct API interactions.
- Added a mapper to convert SMW properties to local database fields.
- Introduced background tasks for asynchronous import processing.
- Implemented logging and error handling for import operations.
- Added endpoints for previewing imports, checking import status, and managing import references.
2026-04-24 14:41:52 +02:00