Merged
Conversation
merge dev into stage
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
Contributor
There was a problem hiding this comment.
Pull request overview
Syncs stage into main, bringing in new exercise/muscle-group functionality across the FastAPI server, DB schema/migrations, test suite, and the React client (including regenerated OpenAPI SDK), plus some infra/dev tooling updates.
Changes:
- Add Exercise CRUD + Muscle Group listing endpoints, services, schemas, DB models, and migrations.
- Rename/refine several API error types/codes and update server + client + tests accordingly.
- Update dev/infra scripts and Docker Compose PgAdmin config wiring; regenerate client OpenAPI types/SDK and adjust client routing imports.
Reviewed changes
Copilot reviewed 97 out of 112 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| server/makefile | Removes -v from pytest commands. |
| server/app/tests/services/token/test_expire_tokens.py | Renames token expiry tests for clarity. |
| server/app/tests/services/muscle_group/test_get_muscle_groups_ordered_by_name.py | Adds service tests for ordered muscle group retrieval. |
| server/app/tests/services/muscle_group/test_get_muscle_groups_by_ids.py | Adds service tests for fetching muscle groups by IDs. |
| server/app/tests/services/feedback/test_create_feedback_service.py | Adjusts import to local test utilities. |
| server/app/tests/services/feedback/init.py | Marks feedback tests as a package for relative imports. |
| server/app/tests/services/exercise/utilities.py | Adds exercise service test helpers (user/exercise creation, muscle group lookup). |
| server/app/tests/services/exercise/test_update_exercise.py | Adds service tests for updating exercises and error cases. |
| server/app/tests/services/exercise/test_to_exercise_public.py | Adds unit tests for ORM→public schema conversion helper. |
| server/app/tests/services/exercise/test_get_exercises_with_muscle_groups.py | Adds tests for internal query helper with eager-loaded muscle groups. |
| server/app/tests/services/exercise/test_get_exercises.py | Adds service tests for listing visible exercises (system + user-owned). |
| server/app/tests/services/exercise/test_get_exercise.py | Adds service tests for fetching a single exercise with auth scoping. |
| server/app/tests/services/exercise/test_delete_exercise.py | Adds service tests for deletion and permission checks. |
| server/app/tests/services/exercise/test_create_exercise.py | Adds service tests for creation + validation/error behavior. |
| server/app/tests/services/exercise/init.py | Marks exercise tests as a package for relative imports. |
| server/app/tests/services/auth/test_request_access.py | Updates tests for renamed email-conflict error type. |
| server/app/tests/services/auth/test_register.py | Updates tests for renamed username-conflict error type and test name. |
| server/app/tests/services/admin/test_update_access_request_status.py | Updates tests for split access-request errors and adjusts imports. |
| server/app/tests/services/admin/init.py | Marks admin service tests as a package. |
| server/app/tests/models/errors/test_http_error.py | Adds coverage for missing status_code/detail on HTTPError subclasses. |
| server/app/tests/fixtures/client.py | Removes stray blank line in fixture. |
| server/app/tests/core/security/test_get_token.py | Adjusts relative import for shared test utilities. |
| server/app/tests/core/security/test_expire_tokens.py | Adjusts relative import for shared test utilities. |
| server/app/tests/api/utilities.py | Adds multipart files support to shared HTTP request helper. |
| server/app/tests/api/user/test_get_current_user.py | Switches to relative imports for API test utilities. |
| server/app/tests/api/user/init.py | Marks user API tests as a package. |
| server/app/tests/api/muscle_groups/test_get_muscle_groups.py | Adds API tests for muscle group listing endpoint. |
| server/app/tests/api/muscle_groups/init.py | Marks muscle groups API tests as a package. |
| server/app/tests/api/health/test_get_health.py | Uses shared make_http_request helper. |
| server/app/tests/api/health/test_get_db_health.py | Uses shared make_http_request helper. |
| server/app/tests/api/health/init.py | Marks health API tests as a package. |
| server/app/tests/api/feedback/test_create_feedback.py | Refactors request building to shared make_http_request, adds files support. |
| server/app/tests/api/feedback/init.py | Marks feedback API tests as a package. |
| server/app/tests/api/exercises/utilities.py | Adds API test helpers for exercises (user creation, create via API, etc.). |
| server/app/tests/api/exercises/test_update_exercise.py | Adds API tests for updating exercises with status/error assertions. |
| server/app/tests/api/exercises/test_get_exercises.py | Adds API tests for listing exercises and auth behavior. |
| server/app/tests/api/exercises/test_get_exercise.py | Adds API tests for fetching exercises (system/user) and 404/401 cases. |
| server/app/tests/api/exercises/test_delete_exercise.py | Adds API tests for deletion and permission behavior. |
| server/app/tests/api/exercises/test_create_exercise.py | Adds API tests for creation + validation and error cases. |
| server/app/tests/api/exercises/init.py | Marks exercises API tests as a package. |
| server/app/tests/api/auth/test_reset_password.py | Switches to relative imports for API test utilities. |
| server/app/tests/api/auth/test_request_access.py | Updates tests for renamed email-conflict error and adjusts imports. |
| server/app/tests/api/auth/test_register.py | Updates tests for renamed username-conflict error and adjusts imports/test name. |
| server/app/tests/api/auth/test_refresh_token.py | Switches to relative imports for API test utilities. |
| server/app/tests/api/auth/test_logout.py | Switches to relative imports for API test utilities. |
| server/app/tests/api/auth/test_login.py | Switches to relative imports for API test utilities. |
| server/app/tests/api/auth/test_forgot_password.py | Switches to relative imports for API test utilities. |
| server/app/tests/api/admin/test_update_access_request_status.py | Updates tests for new access-request error types and adjusts imports. |
| server/app/tests/api/admin/test_get_users.py | Switches to relative imports for API test utilities. |
| server/app/tests/api/admin/test_get_access_requests.py | Switches to relative imports for API test utilities. |
| server/app/services/token.py | Renames where_clause → where_clauses for token expiry helper. |
| server/app/services/muscle_group.py | Adds muscle-group service functions (ordered listing, fetch by IDs). |
| server/app/services/exercise.py | Adds exercise service layer: CRUD + ORM→public conversion and eager loading. |
| server/app/services/auth.py | Updates to renamed email/username conflict errors. |
| server/app/services/admin.py | Uses new access-request error types for not-found/not-pending. |
| server/app/models/schemas/types.py | Reorders type aliases and adds ExerciseName type alias. |
| server/app/models/schemas/muscle_group.py | Adds MuscleGroupPublic schema. |
| server/app/models/schemas/feedback.py | Fixes mutable default for files using default_factory. |
| server/app/models/schemas/exercise.py | Adds exercise request/response schemas. |
| server/app/models/errors.py | Tightens HTTPError subclass requirements; replaces/introduces several domain-specific errors. |
| server/app/models/database/workout_exercise.py | Formatting changes to mapped_column definitions. |
| server/app/models/database/workout.py | Formatting changes to mapped_column definitions. |
| server/app/models/database/user.py | Formatting changes to mapped_column definitions. |
| server/app/models/database/set.py | Formatting changes to mapped_column definitions. |
| server/app/models/database/registration_token.py | Formatting changes to mapped_column definitions. |
| server/app/models/database/password_reset_token.py | Formatting changes to mapped_column definitions. |
| server/app/models/database/muscle_group.py | Adds updated_at column and formatting updates. |
| server/app/models/database/feedback.py | Formatting changes to mapped_column definitions. |
| server/app/models/database/exercise_muscle_group.py | Adds relationship to MuscleGroup + formatting updates. |
| server/app/models/database/exercise.py | Adds relationship to join table; updates unique constraint null handling; formatting updates. |
| server/app/models/database/access_request.py | Formatting changes to mapped_column definitions. |
| server/app/migrations/versions/2026_03_11_1614-1d1475c06895_fix_unique_constraint.py | Recreates exercise uniqueness constraint with postgresql_nulls_not_distinct. |
| server/app/migrations/versions/2026_03_11_1559-ce0019043daf_add_updated_at_column.py | Adds updated_at to muscle_groups. |
| server/app/migrations/versions/2026_03_11_1120-9b0d6eab4c1f_fix_muscle_groups_id_sequence.py | Fixes muscle_groups ID sequence via setval. |
| server/app/migrations/versions/2025_12_22_1054-b38ada12f56b_seed_admin_user.py | Refactors admin-seed migration to centralize env/test value selection. |
| server/app/core/config.py | Changes prod-like backend validation error messages. |
| server/app/api/router.py | Registers new exercise + muscle group routers. |
| server/app/api/endpoints/user.py | Adds router-level auth dependency (requires current user). |
| server/app/api/endpoints/muscle_group.py | Adds authenticated muscle group listing endpoint. |
| server/app/api/endpoints/health.py | Formatting-only router definition change. |
| server/app/api/endpoints/feedback.py | Formatting-only router definition change. |
| server/app/api/endpoints/exercise.py | Adds authenticated exercise CRUD endpoints. |
| server/app/api/endpoints/auth.py | Formatting-only router definition change. |
| server/app/api/endpoints/admin.py | Formatting-only router definition change. |
| scripts/generate_pg_admin_config.sh | Generates per-env PgAdmin config under $HOME and symlinks into config/env. |
| scripts/dev.sh | Passes env argument to PgAdmin config generator. |
| package.json | Bumps lint-staged dev dependency (root). |
| package-lock.json | Updates lockfile for lint-staged bump. |
| config/infra/docker-compose.yml | Mounts PgAdmin config from $HOME/.local/share/reptrack-${ENV} instead of repo env dir. |
| config/infra/docker-compose.override.yml | Refines compose watch paths for client rebuild triggers. |
| client/src/pages/RequestAccess.tsx | Updates error handler code mapping to new server error code. |
| client/src/pages/Register.tsx | Updates error handler code mapping to new server error code. |
| client/src/pages/Login.tsx | Consolidates react-router imports to react-router-dom. |
| client/src/pages/Docs.tsx | Switches to react-router-dom imports. |
| client/src/pages/Admin.tsx | Removes artificial delay before clearing loading states. |
| client/src/main.tsx | Switches BrowserRouter import to react-router-dom. |
| client/src/layout/AppLayout.tsx | Switches react-router imports to react-router-dom. |
| client/src/components/docs/Doc.tsx | Switches useParams import to react-router-dom. |
| client/src/components/AccessRequestsTable.tsx | Updates error handler mapping/message for new access-request error code. |
| client/src/auth/RequireGuest.tsx | Switches react-router imports to react-router-dom. |
| client/src/auth/RequireAuth.tsx | Switches react-router imports to react-router-dom. |
| client/src/api/generated/zod.gen.ts | Regenerates Zod validators including exercises/muscle groups; updates feedback files schema defaulting. |
| client/src/api/generated/types.gen.ts | Regenerates TS types to include exercises/muscle groups endpoints and models. |
| client/src/api/generated/sdk.gen.ts | Regenerates SDK to include ExercisesService and MuscleGroupsService. |
| client/src/api/generated/schemas.gen.ts | Regenerates JSON schema constants including exercises/muscle groups. |
| client/src/api/generated/index.ts | Re-exports new generated services and types. |
| client/src/AppRoutes.tsx | Switches route component imports to react-router-dom. |
| client/package.json | Bumps several client deps (openapi-ts, mermaid, types, typescript-eslint). |
| client/package-lock.json | Updates client lockfile for dependency bumps. |
| PROJECT_OVERVIEW.md | Adds high-level architecture and workflow documentation. |
| .github/workflows/deploy-infra.yml | Passes env to PgAdmin config generator during deploy workflow. |
| .github/copilot-instructions.md | Adds repo-specific Copilot guidance (layout, commands, conventions). |
Files not reviewed (1)
- client/package-lock.json: Language not supported
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.