Add muscle recovery tracking and recovery page component#27
Conversation
…ails for better user experience
|
Qodo Merge was enabled for this repository. To continue using it, please link your Git account with your Qodo account here. PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
Qodo Merge was enabled for this repository. To continue using it, please link your Git account with your Qodo account here. PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
There was a problem hiding this comment.
Pull Request Overview
This PR adds a muscle recovery tracking module and a new Recovery Page component, and updates muscle details, tests, and documentation to support enhanced recovery calculation and display.
- Introduces recovery module functions with recovery percentage calculations and status determination.
- Enhances muscle definitions with recovery_hours and muscle_group properties.
- Adds comprehensive tests for recovery logic, updates exercise retrieval, and incorporates daisyUI usage in documentation.
Reviewed Changes
Copilot reviewed 7 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| app/src/lib/recovery.ts | Implements recovery calculations and status determination logic. |
| app/src/lib/muscles.ts | Enhances muscle details with recovery_hours and muscle_group properties. |
| app/src/lib/muscles.test.ts | Updates tests to validate new muscle properties. |
| app/src/lib/exercises.ts | Implements getExerciseById and adjusts imports using absolute paths. |
| app/src/lib/exercises.test.ts | Adds tests for getExerciseById. |
| .github/copilot-instructions.md | Updates instructions to include daisyUI component usage. |
Files not reviewed (2)
- app/src/lib/components/NavigationMenu.svelte: Language not supported
- app/src/routes/recovery/+page.svelte: Language not supported
…nt and muscles tests
…gging for muscle details
…ecks for recovery_hours
…er checkout configuration in CI workflow
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a muscle recovery tracking module with a new Recovery Page component, updates to muscle details with recovery hours and muscle groups, and adds supporting tests and documentation.
- Added recovery.ts which implements recovery percentage calculations and status determination
- Updated muscles.ts to include recovery_hours and muscle_group properties and adjusted corresponding tests
- Updated exercise retrieval, CI workflow, and documentation to reflect these new features
Reviewed Changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| app/src/lib/recovery.ts | Adds recovery calculations and functions to determine muscle status |
| app/src/lib/muscles.ts | Enhances muscle details with new recovery and classification fields |
| app/src/lib/muscles.test.ts | Updates tests to include validation of recovery_hours and muscle_group |
| app/src/lib/exercises.ts | Implements getExerciseById for exercise retrieval |
| app/src/lib/exercises.test.ts | Adds tests for getExerciseById functionality |
| .github/workflows/ci.yml | Modifies dependency installation and test execution commands |
| .github/copilot-instructions.md | Updates documentation to emphasize Tailwind CSS and daisyUI usage |
Files not reviewed (2)
- app/src/lib/components/NavigationMenu.svelte: Language not supported
- app/src/routes/recovery/+page.svelte: Language not supported
Comments suppressed due to low confidence (1)
.github/workflows/ci.yml:34
- Using '--force' with pnpm install may bypass caching benefits and unnecessarily reinstall dependencies. Consider evaluating if this flag is essential or if restoring caching steps would improve CI efficiency.
pnpm install --force
…rAllMuscles for clarity
… workout item handling
…mber for consistency
…for recovered muscles
There was a problem hiding this comment.
Copilot reviewed 12 out of 17 changed files in this pull request and generated 1 comment.
Files not reviewed (5)
- app/package.json: Language not supported
- app/src/lib/components/NavigationMenu.svelte: Language not supported
- app/src/routes/+layout.svelte: Language not supported
- app/src/routes/recovery/+page.svelte: Language not supported
- app/src/routes/workout/+page.svelte: Language not supported
Comments suppressed due to low confidence (1)
.github/workflows/ci.yml:36
- [nitpick] Review the downgrade from actions/cache@v4 to actions/cache@v3 to confirm that it is intentional and no important caching improvements from v4 are missed.
- uses: actions/cache@v3
| * @param recoveryHours - The number of hours needed for full recovery | ||
| * @returns A number from 0 to 100 representing recovery percentage | ||
| */ | ||
| export function calculateRecoveryPercentage( |
There was a problem hiding this comment.
Consider adding a check to ensure the 'recoveryHours' parameter is greater than zero before using it in the division to avoid potential division by zero errors.
…lateRecoveryPercentage function
Closes #3
User description
Introduce a recovery page component and enhance muscle details with recovery hours and muscle group classification. Implement a recovery module for tracking muscle recovery status, including calculations and improved data display. Add navigation for easy access to the recovery page and update documentation to emphasize the use of daisyUI components.
PR Type
Enhancement, Tests, Documentation
Description
Introduced a muscle recovery tracking module with detailed calculations.
calculateRecoveryPercentagefunction for recovery percentage computation.getMuscleRecoveryStatusandgetSingleMuscleRecoveryStatusfor recovery data retrieval.Enhanced muscle details with recovery hours and muscle group classification.
muscles.tsto includerecovery_hoursandmuscle_groupproperties.muscles.test.tsto validate new properties.Developed a new Recovery Page component for tracking muscle recovery.
Added tests for the recovery module and related functionalities.
Updated navigation to include a link to the Recovery Page.
Improved documentation to emphasize the use of daisyUI components.
Changes walkthrough 📝
3 files
Added tests for `getExerciseById` function.Updated tests to validate recovery hours and muscle group.Added comprehensive tests for recovery module.5 files
Implemented `getExerciseById` function for exercise retrieval.Enhanced muscle details with recovery hours and groups.Implemented muscle recovery tracking logic.Added Recovery link to navigation menu.Created Recovery Page component with grouped muscle data.1 files
Updated instructions to emphasize daisyUI usage.