Skip to content

Conversation

@Muhammadulawal
Copy link
Owner

This pull request adds new features and improvements to the school activities app, including support for more activities, participant management (signup and unregister), UI enhancements, and comprehensive API tests. The most important changes are grouped below.

Backend features and validation:

  • Added new activities to the activities dictionary in src/app.py, including sports, artistic, and intellectual options such as Soccer Team, Basketball Club, Art Workshop, Drama Club, Math Olympiad, and Science Club.
  • Implemented validation to prevent duplicate signups and added an endpoint to unregister participants from activities in src/app.py.

Frontend UI enhancements:

  • Updated the activities list in src/static/app.js to display participants for each activity, including an option to unregister via a delete icon, with error handling and UI feedback.
  • Added new CSS styles in src/static/styles.css for the participants section, delete icon, and improved activity card appearance. [1] [2]

Testing:

  • Added tests in tests/test_app.py for all main API endpoints, including getting activities, signing up, duplicate signup prevention, unregistering, error cases, and activity not found.

@Muhammadulawal Muhammadulawal merged commit e7a3cd5 into main Dec 2, 2025
3 checks passed
Copy link

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 pull request enhances the student activity registration system by adding new activity options, implementing participant management features (including unregistration), improving the UI with participant visibility, and adding comprehensive API test coverage.

  • Expanded the activities catalog with 6 new options across sports, arts, and intellectual categories
  • Implemented duplicate signup prevention and participant unregistration functionality
  • Enhanced the frontend to display participant lists with inline delete functionality

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

File Description
src/app.py Added 6 new activities, implemented duplicate signup validation, and added unregister endpoint
src/static/app.js Added participant list display with delete icons and error handling for unregistration
src/static/styles.css Added styling for participant sections, delete icons, and activity card shadows
tests/test_app.py Added comprehensive test suite covering all API endpoints including edge cases

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.



# Unregister a participant from an activity
from fastapi import Query
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

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

The import statement for Query should be moved to the top of the file with other imports. Having imports in the middle of the file violates Python conventions and can make the code harder to maintain.

Copilot uses AI. Check for mistakes.
# Get the specific activity
activity = activities[activity_name]

# Validate student is not already signed up
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

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

The comment has incorrect indentation - it should align with the code it describes rather than being outdented to column 0.

Suggested change
# Validate student is not already signed up
# Validate student is not already signed up

Copilot uses AI. Check for mistakes.
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