Skip to content

Improve student activity registration system - #248

Open
agiledevopsguru wants to merge 7 commits into
skills:mainfrom
agiledevopsguru:accelerate-with-copilot
Open

agiledevopsguru wants to merge 7 commits into
skills:mainfrom
agiledevopsguru:accelerate-with-copilot

Conversation

@agiledevopsguru

Copy link
Copy Markdown

Summary

Changes

This pull request adds several new features and improvements to the student activities signup system, focusing on expanding activity options, enhancing participant management, and improving the user interface. It also introduces automated tests to ensure correct functionality.

Backend enhancements:

  • Added several new activities (Basketball Team, Swimming Club, Art Studio, Drama Club, Debate Team, Science Club) to the activities data structure in src/app.py, each with their own schedule, max participants, and participant list.
  • Implemented validation to prevent duplicate signups and added a new API endpoint (DELETE /activities/{activity_name}/signup) to allow students to unregister from activities.

Frontend improvements:

  • Updated the activities list UI to display participants for each activity, including an "unregister" button next to each participant, and ensured the activities dropdown is reset on reload.
  • Added the unregisterParticipant function to handle participant removal via the new backend endpoint and ensured the activities list refreshes after signup/unregister actions.

Styling updates:

  • Added new CSS rules to style the participant list and unregister button for improved usability and appearance.

Testing:

  • Introduced automated tests in tests/test_app.py to verify fetching activities, preventing duplicate signups, registering/unregistering participants, and handling unknown activities.

Closes:

Task list

  • For workflow changes, I have verified the Actions workflows function as expected.
  • For content changes, I have reviewed the style guide.

Copilot AI balanced review requested due to automatic review settings October 10, 2026 19:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Capacity enforcement and atomic duplicate prevention remain unresolved, and the new API endpoint needs documentation.

2 open findings

🧠 Review effort: Lite

Comment thread src/app.py Resolved
Comment thread src/app.py Outdated
Comment on lines +110 to +112
@app.delete("/activities/{activity_name}/signup")
def unregister_from_activity(activity_name: str, email: str):
"""Remove a student from an activity."""

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unresolved authorization and concurrent-read consistency issues remain in src/app.py.

2 open findings
1 resolved since last review

🧠 Review effort: Lite

Comment thread src/app.py Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Unregister authorization must not rely on the client-controlled X-Student-Email header.

2 open findings

🧠 Review effort: Lite

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Critical token scoping and authentication issues, plus test-state isolation problems, remain unresolved.

4 open findings
1 resolved since last review

🧠 Review effort: Lite

Comment thread src/app.py Resolved
Comment thread src/app.py Resolved
Comment thread tests/test_app.py Resolved
agiledevopsguru and others added 3 commits October 11, 2026 01:26
Ensure participant_tokens are reset after tests.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@agiledevopsguru
agiledevopsguru requested a lite review from Copilot October 10, 2026 20:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@agiledevopsguru
agiledevopsguru requested a lite review from Copilot October 10, 2026 20:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@agiledevopsguru
agiledevopsguru requested a lite review from Copilot October 12, 2026 04:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

2 participants