Skip to content

Refactor#26

Merged
xsimpse merged 9 commits intomainfrom
Refactor
Mar 23, 2026
Merged

Refactor#26
xsimpse merged 9 commits intomainfrom
Refactor

Conversation

@DylanHNicolay
Copy link
Copy Markdown
Owner

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.role constraint.

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.

Comment thread INIT.sql Outdated
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')),
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
role TEXT NOT NULL CHECK (role IN ('athlete', 'admin')),
role TEXT NOT NULL CHECK (role IN ('athlete', 'coach', 'admin')),

Copilot uses AI. Check for mistakes.
@xsimpse xsimpse merged commit 4e35a9d into main Mar 23, 2026
1 check passed
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.

3 participants