Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the React UI tab structure by moving Profile/Team tabs under src/components/**/tabs, updates related imports, and introduces new styling and a “Personal Best Scores” table component. It also modifies the database schema’s allowed users.role values.
Changes:
- Update ProfilePage/TeamPage and related components to import tabs from
src/components/**/tabs. - Add new tab components and CSS for profile/team layouts (meets/roster/home).
- Add a new profile “Personal Best Scores” component + styles, and change the DB
users.roleconstraint.
Reviewed changes
Copilot reviewed 11 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| divecloud-react/src/pages/profilePage.tsx | Update imports to new profile tabs location under components |
| divecloud-react/src/pages/TeamPage.tsx | Update imports to new team tabs location under components |
| divecloud-react/src/components/teams/tabs/team-roster-tab.tsx | Fix relative imports for roster subcomponents after refactor |
| divecloud-react/src/components/teams/tabs/team-meets-tab.tsx | Fix relative import for MeetList after refactor |
| divecloud-react/src/components/teams/tabs/team-meets-tab.css | Add styling for team meets tab layout/sidebar |
| divecloud-react/src/components/teams/tabs/team-home-tab.tsx | Add basic TeamHomeTab component |
| divecloud-react/src/components/teams/tabs/TeamRosterTab.css | Add styling for team roster tab layout/filters |
| divecloud-react/src/components/profile/tabs/profile-scores-tab.tsx | Update import path for ScoresSection after tab refactor |
| divecloud-react/src/components/profile/tabs/profile-scores-pbs.tsx | Add Personal Best Scores table component |
| divecloud-react/src/components/profile/tabs/profile-scores-pbs.css | Add styling for Personal Best Scores component |
| divecloud-react/src/components/profile/tabs/profile-scores-eventProgression-tab.tsx | Update imports after moving tab under components |
| divecloud-react/src/components/profile/tabs/profile-meets-tab.tsx | Update MeetCard import path after refactor |
| divecloud-react/src/components/profile/tabs/profile-meets-tab.css | Add styling for profile meets tab filtering/grid |
| divecloud-react/src/components/profile/tabs/profile-home-tab.tsx | Update imports to profile components after refactor |
| divecloud-react/src/components/profile/tabs/profile-home-tab.css | Add styling for profile home tab layout |
| divecloud-react/src/components/profile/scores/ScoresSection.tsx | Update import path for event progression tab after refactor |
| divecloud-react/src/components/profile/ScoresSection.tsx | Update imports for tabs and PBs component (note: appears unused) |
| INIT.sql | Change allowed users.role values (removes coach) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| email TEXT NOT NULL UNIQUE, | ||
| password_hash TEXT NOT NULL, | ||
| role TEXT NOT NULL CHECK (role IN ('athlete', 'coach', 'admin')), | ||
| role TEXT NOT NULL CHECK (role IN ('athlete', 'admin')), |
There was a problem hiding this comment.
The users.role CHECK constraint no longer allows 'coach', but the frontend currently supports selecting a coach account type (e.g., signup RoleSelector uses 'coach'). This schema change will reject inserts/updates for coach users and likely break registration or role-based logic. Either keep 'coach' in the constraint (and/or add a migration path for existing data), or update the application role model end-to-end to remove/rename that role consistently.
| role TEXT NOT NULL CHECK (role IN ('athlete', 'admin')), | |
| role TEXT NOT NULL CHECK (role IN ('athlete', 'coach', 'admin')), |
No description provided.