Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Implements volunteer access lifecycle management (approve with optional expiry, extend/renew access), wiring frontend UI flows to backend endpoints and adding supporting backend tests/config tweaks.
Changes:
- Frontend: add approve/extend modals with expiry/no-expiry options; add “Renew Access” flow and hook for extending a volunteer’s
access_expires_at. - Backend: enrich volunteer-application list responses with linked volunteer user data (user_id/expiry/days_remaining) and support setting
access_expires_atwhen approving an application; add volunteer-statswarning_days. - Tooling/robustness: dev server host binding, docker-compose cleanup, API/items list guards, .env ignore, and updated frontend tests for new endpoints/hooks.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/vite.config.ts | Expose dev server on 0.0.0.0 for Docker/host access |
| frontend/src/pages/public/VolunteerApplication.test.tsx | Update expected volunteer-application URL (no extra /api) |
| frontend/src/pages/admin/ManageVolunteers.tsx | Add expiry/extend/renew UI + wire to new/updated hooks |
| frontend/src/pages/admin/ManageVolunteers.test.tsx | Mock new useExtendVolunteerAccess hook + pending states |
| frontend/src/pages/admin/ManageVolunteers.css | Styling for renew list + modal checkbox field |
| frontend/src/lib/types.ts | Add volunteer user_id; make expiry fields nullable |
| frontend/src/components/items/ItemList.tsx | Guard against non-array items |
| frontend/src/api/items.api.ts | Guard getAll to always return an array |
| frontend/src/actions/useVolunteers.ts | Fix API paths (no double /api); add expiry support + extend hook |
| docker-compose.yml | Remove obsolete top-level version |
| backend/users/views.py | Add expiry parsing, user linkage enrichment, and warning_days in stats |
| backend/users/tests.py | Add volunteer lifecycle tests (approve/expiry/list enrichment/stats) |
| .gitignore | Ignore .env files |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
qiuethan
approved these changes
Mar 20, 2026
qiuethan
approved these changes
Mar 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixed the renew/extend button by implementing the application logic and connecting frontend + backend
Added expiry date support with a default of 30 days with the
access_expirytimestamp is now correct.Added 5 new backend tests for volunteer lifecycle management.
Additional Fixes
Changed Dockerfile name to the correct name so
docker compose upruns properly.Fixed bug in the items array in API call.
Fixed bug by removing extra
/apiin PATCH call for volunteers.Edit styles of text in buttons to be black from white for readability
Test
Run tests with the following commands: