screen-locker/stronglift_replacement/workout_app/lib/models
Krzysztof kuhy Rudnicki 6f2ec1fa86 Manual-workout phone sync P4: Dart model + validation
Dart port of the Python manual-workout model so the phone can build the same
signed-on-ingest sync payload the PC form produces.

- lib/models/manual_workout.dart: ManualWorkoutDraft (mirrors the Python
  dataclass), validateManualWorkout (ports validate_manual_workout: required
  fields, HH:MM end-after-start, min duration, RPE range, per-sport rules,
  reflection length), buildEntry/buildSyncPayload (byte-for-byte equivalent of
  the Python build_entry + kind/date), manualSyncRecordId, buildManualRecord.
  The MANUAL_WORKOUT_* constants are inlined here (a const-only file has no
  coverable lines and trips the 100%-coverage file-presence guard), replacing
  models/manual_workout_constants.dart.
- test/models/manual_workout_test.dart: the cross-language wire fixture (an
  identical literal to test_manual_workout.py::TestSyncWireFormat — this catches
  key-name/format drift between the two serializers) plus full validation
  coverage. 29 tests; manual_workout.dart is 100% covered.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PM3auNTifaVgcXWDizZrjH
2026-07-13 12:55:05 +02:00
..
exercise_result.dart Add comprehensive test suite, backup service, and linting to workout app 2026-06-28 08:11:43 +02:00
exercise.dart Add comprehensive test suite, backup service, and linting to workout app 2026-06-28 08:11:43 +02:00
manual_workout.dart Manual-workout phone sync P4: Dart model + validation 2026-07-13 12:55:05 +02:00
set_result.dart Add comprehensive test suite, backup service, and linting to workout app 2026-06-28 08:11:43 +02:00
workout_plan.dart Add comprehensive test suite, backup service, and linting to workout app 2026-06-28 08:11:43 +02:00
workout_session.dart Add comprehensive test suite, backup service, and linting to workout app 2026-06-28 08:11:43 +02:00