Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands RepTrack’s exercise management capabilities end-to-end: it reseeds/normalizes muscle groups and improves server-side exercise serialization/deletion behavior, while adding a new client Exercises page and enhancing the shared DataTable/UI layer (tooltips, view options, button overrides).
Changes:
- Server: ensure exercise → muscle-group associations are cleaned up on delete, and return muscle groups in a stable (sorted) order; add migration to reseed muscle groups.
- Client: add an Exercises page with create/edit/delete flows; enhance DataTable (view labels, filter-only columns, truncated-cell tooltip) and introduce a Button override layer.
- DevX/ops: add
make downgrade, add.actrc+ README guidance for localact, and relax some docker-compose env requirements for non-SMTP/non-GitHub-console configurations.
Reviewed changes
Copilot reviewed 55 out of 56 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| server/makefile | Adds a downgrade target for stepping back one Alembic revision. |
| server/app/tests/services/exercise/utilities.py | Adds test helper to clear exercises from DB. |
| server/app/tests/services/exercise/test_to_exercise_public.py | Adds coverage for muscle group ordering in public exercise output. |
| server/app/tests/services/exercise/test_get_exercises.py | Ensures a clean exercise set before assertions. |
| server/app/tests/services/exercise/test_get_exercises_with_muscle_groups.py | Ensures a clean exercise set before assertions. |
| server/app/tests/services/exercise/test_delete_exercise.py | Verifies exercise delete also removes join-table rows. |
| server/app/services/exercise.py | Sorts muscle groups in _to_exercise_public. |
| server/app/models/database/exercise.py | Adds cascade/passive delete behavior for exercise ↔ join relationship. |
| server/app/models/database/exercise_muscle_group.py | Adds Exercise back-populated relationship for ORM consistency. |
| server/app/migrations/versions/2026_03_16_0438-3fd5430b243e_reseed_muscle_groups.py | Reseeds muscle groups and remaps/deletes legacy categories. |
| README.md | Updates headings and adds local act and UI override conventions. |
| config/infra/docker-compose.yml | Makes SMTP/GH credential env vars optional depending on backend. |
| config/infra/docker-compose.override.yml | Removes dev override env defaults for email/GH backends. |
| client/src/pages/ResetPassword.tsx | Switches to override Button import. |
| client/src/pages/RequestAccess.tsx | Switches to override Button import. |
| client/src/pages/Register.tsx | Switches to override Button import. |
| client/src/pages/Login.tsx | Switches to override Button import. |
| client/src/pages/ForgotPassword.tsx | Switches to override Button import. |
| client/src/pages/Exercises.tsx | New Exercises page fetching exercises + muscle groups. |
| client/src/pages/Admin.tsx | Renames loading state vars for consistency (isLoading*). |
| client/src/models/session.ts | Renames session context loading → isLoading. |
| client/src/models/data-table.ts | Adjusts DataTable menu item typing (label now optional). |
| client/src/main.tsx | Adds TooltipProvider at app root. |
| client/src/lib/text.ts | Adds identifier formatting helpers for UI labels. |
| client/src/lib/styles.ts | Removes unused background/button style constants. |
| client/src/layout/AppLayout.tsx | Adds Exercises nav link; renames feedback component usage; uses override Button. |
| client/src/components/UsersTable.tsx | Removes selection column usage. |
| client/src/components/ui/tooltip.tsx | New tooltip component wrapper used by truncated cells. |
| client/src/components/ui/overrides/button.tsx | Adds app-level Button variants (e.g., success) and styling overrides. |
| client/src/components/ui/dropdown-menu.tsx | Tweaks destructive icon styling selector. |
| client/src/components/ui/button.tsx | Updates base shadcn button classes/order. |
| client/src/components/ui/badge.tsx | Updates base shadcn badge classes/order. |
| client/src/components/ModeToggle.tsx | Switches to override Button import. |
| client/src/components/Loading.tsx | Switches to override Button import. |
| client/src/components/FeedbackFormDialog.tsx | Renames component; improves form labels/ids; uses success button variant. |
| client/src/components/exercises/ExercisesTable.tsx | New exercises DataTable with inline actions and delete confirmation. |
| client/src/components/exercises/ExerciseFormDialog.tsx | New create/edit dialog for exercises with muscle group selection. |
| client/src/components/data-table/README.md | Documents meta.viewLabel and meta.filterOnly conventions. |
| client/src/components/data-table/DataTableViewOptions.tsx | Supports custom view labels and hides filter-only columns. |
| client/src/components/data-table/DataTableTruncatedCell.tsx | New truncated cell that shows tooltip on overflow. |
| client/src/components/data-table/DataTableToolbar.tsx | Simplifies search handling; uses override Button. |
| client/src/components/data-table/DataTableRowActions.tsx | Uses override Button; adjusts icon spacing. |
| client/src/components/data-table/DataTablePagination.tsx | Uses override Button. |
| client/src/components/data-table/DataTableInlineRowActions.tsx | Uses override Button. |
| client/src/components/data-table/DataTableFacetedFilter.tsx | Uses override Button. |
| client/src/components/data-table/DataTableColumnHeader.tsx | Uses override Button. |
| client/src/components/data-table/DataTable.tsx | Adds initial column visibility + configurable edge padding. |
| client/src/components/AccessRequestsTable.tsx | Removes selection column; refactors loading state and confirm dialog; uses success/destructive variants. |
| client/src/auth/SessionProvider.tsx | Renames loading state to isLoading in context. |
| client/src/auth/RequireGuest.tsx | Updates session loading state usage. |
| client/src/auth/RequireAuth.tsx | Updates session loading state usage. |
| client/src/AppRoutes.tsx | Adds /exercises route. |
| client/package.json | Extends update-components script to run prettier on UI components. |
| client/package-lock.json | Updates flatted version (lockfile delta). |
| client/eslint.config.js | Adds restricted import guidance for the base shadcn Button. |
| .actrc | Adds default configuration for running GitHub Actions locally via act. |
Files not reviewed (1)
- client/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)
client/src/models/data-table.ts:46
MenuItemConfig.labelwas made optional, but the rendering components (DataTableRowActions/DataTableInlineRowActions) always renderitem.label. This makes it easy to accidentally create action items with no visible text / accessible name. Consider makinglabelrequired fortype: 'action'(and for'radio-group'), and only optional for separators via a discriminated union type.
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.