Conversation
There was a problem hiding this comment.
Pull request overview
Repurposes the existing mentor invite flow in the admin UI to support sending Volunteer invites as well, including a new 2026 Volunteer email template and role-aware server actions.
Changes:
- Add a Volunteers tab to the Admin → Invites page and reuse a shared invites panel with a
roleprop. - Introduce role-aware server actions for sending single and bulk Tito invites for mentors/volunteers.
- Add a new 2026 Volunteer email template (subject + HTML body).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| app/(pages)/admin/invites/page.tsx | Adds “Volunteers” tab and routes mentors/volunteers through a shared panel with role. |
| app/(pages)/admin/_components/MentorVolunteerInvites/MentorVolunteerInvitesPanel.tsx | Generalizes the invites panel copy/UI to work for both roles. |
| app/(pages)/admin/_components/MentorVolunteerInvites/MentorVolunteerSingleInviteForm.tsx | Updates single-invite form to call the new role-aware action. |
| app/(pages)/admin/_components/MentorVolunteerInvites/MentorVolunteerBulkInviteForm.tsx | Updates bulk-invite form to call the new role-aware action and adjusts filenames/copy. |
| app/(api)/_actions/emails/sendSingleMentorOrVolunteerInvite.ts | Sends mentor vs volunteer email subject/template based on role. |
| app/(api)/_actions/emails/sendBulkMentorOrVolunteerInvites.ts | Sends bulk mentor vs volunteer email subject/template based on role. |
| app/(api)/_actions/emails/emailTemplates/2026VolunteerInviteTemplate.ts | Adds the 2026 Volunteer invite HTML email template + subject. |
Comments suppressed due to low confidence (3)
app/(pages)/admin/_components/MentorVolunteerInvites/MentorVolunteerSingleInviteForm.tsx:17
- The component’s default export function is still named
MentorSingleInviteForm, but it now supports both mentors and volunteers and is imported asMentorVolunteerSingleInviteForm. Rename the function to match the file/component name to avoid confusing stack traces and React DevTools labels.
app/(api)/_actions/emails/sendBulkMentorOrVolunteerInvites.ts:29 - This function now supports
role: 'mentor' | 'volunteer', but deeper in the implementation theprocessBulkInvitesconfig still useslabel: 'Mentor', which will produce misleading log prefixes/errors for volunteer runs. Consider deriving the label fromrole(e.g.,VolunteervsMentor) to keep operational logs accurate.
app/(api)/_actions/emails/sendSingleMentorOrVolunteerInvite.ts:25 - Since this action can now send either mentor or volunteer invites, the error logging later in the function should include the
role(and not hard-code “Mentor”) so operational logs can be accurately filtered when volunteer invites fail.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Repurpose Mentor invite system for Volunteer invites, made new template for Volunteers
Closes #511