Skip to content

Enhance exercise tracking with metrics structure#9

Merged
brylie merged 6 commits intomainfrom
add-exercise-configuration-fields
Mar 9, 2025
Merged

Enhance exercise tracking with metrics structure#9
brylie merged 6 commits intomainfrom
add-exercise-configuration-fields

Conversation

@brylie
Copy link
Copy Markdown
Owner

@brylie brylie commented Mar 9, 2025

Closes #8

This pull request includes significant updates to the workout history and workout item components, as well as database schema changes to support nested metrics for completed exercises. The most important changes include updating end-to-end tests, adding new Svelte components, and modifying the database schema and related functions.

End-to-End Test Improvements:

  • app/e2e/workout-history.test.ts: Enhanced the test flow for workout generation and history validation by increasing timeouts, using more specific selectors, and adding checks for newly introduced metrics fields.

Svelte Component:

Database Schema and Migration:

  • app/src/lib/database.ts: Updated the database schema to version 2, migrating from flat fields to a nested metrics structure for completed exercises. Added a migration function to convert existing records. [1] [2] [3]

Database Tests:

Migration Tests:

  • app/src/lib/database.migration.test.ts: Added tests to verify the migration from version 1 to version 2 of the completed exercises schema.Introduce a new metrics object for exercises to improve tracking of attributes like sets, reps, weight, and time. Refactor existing data structures to support this new organization and ensure migration from the old format.

@brylie brylie merged commit 3ef5ea5 into main Mar 9, 2025
@brylie brylie deleted the add-exercise-configuration-fields branch March 24, 2025 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add exercise "configuration" fields (boolean to indicate "reps", "weights", "time based" for example)

1 participant