Skip to content

Improve student activity registration system - #2

Merged
RaLwork merged 3 commits into
mainfrom
accelerate-with-copilot
Nov 16, 2026
Merged

RaLwork merged 3 commits into
mainfrom
accelerate-with-copilot

Conversation

@RaLwork

@RaLwork RaLwork commented Nov 16, 2026

Copy link
Copy Markdown
Owner

This pull request adds the ability to unregister participants from activities, enhances the frontend to display and manage participants for each activity, expands the set of example activities, and introduces comprehensive API tests. The changes improve both backend and frontend functionality, as well as overall test coverage.

Backend API enhancements:

  • Added a new DELETE endpoint /activities/{activity_name}/participants?email=... to allow unregistering a participant from an activity, including error handling for non-existent activities and participants.
  • Updated the signup endpoint to prevent duplicate signups by checking if the student is already registered.
  • Expanded the initial activities data with several new clubs and sample participants.

Frontend improvements:

  • Activities now display a participants section, listing all current participants with a button to remove them. Removing a participant updates the UI and provides feedback messages. [1] [2] [3]
  • Updated styles to support the new participants section and delete buttons, ensuring a clean and user-friendly interface.

Documentation updates:

  • Updated README.md to document the new unregister feature and API endpoint. [1] [2]

Testing:

  • Added a pytest fixture to ensure test isolation by resetting activities data between tests.
  • Introduced a comprehensive test suite for the activities API, covering all endpoints and edge cases, including signup, duplicate signup, unregister, and error scenarios.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unescaped participant emails rendered through innerHTML enable stored XSS for anyone viewing the activity list.

2 open issues
What changed in this PR

This PR extends the student activity app with participant removal and visible participant lists, supported by API tests and updated documentation.

Changes:

  • Adds an unregister endpoint and duplicate-signup validation.
  • Displays participants with removal controls and refreshes activity data after changes.
  • Expands sample activities and adds isolated API tests.
File Description
tests/​test_activities_api.py Tests activity listing, signup, unregister, and error cases.
tests/​conftest.py Provides a test client and restores activity data between tests.
src/​static/​styles.css Styles participant lists and removal buttons.
src/​static/​app.js Displays participants, handles removal, and refreshes activity data.
src/​README.md Documents participant removal and its API endpoint.
src/​app.py Adds unregister support, duplicate checks, and sample activities.
requirements.txt Adds pytest for API testing.

Review effort: Balanced

Comment thread src/static/app.js Resolved
Comment thread src/static/app.js Resolved
@RaLwork RaLwork closed this Nov 16, 2026
@RaLwork RaLwork reopened this Nov 16, 2026
@RaLwork
RaLwork merged commit 96bce6a into main Nov 16, 2026
8 checks passed
@RaLwork
RaLwork deleted the accelerate-with-copilot branch November 16, 2026 11:52
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