Repository navigation
Exec round (#53) - #63
Merged
Merged
Conversation
VidurShah
force-pushed
the
vidur/review-applications
branch
from
November 30, 2026 21:36
aff65e4 to
2361eea
Compare
VidurShah
force-pushed
the
vidur/exec-round
branch
from
November 30, 2026 21:37
1edd01c to
8752388
Compare
Collaborator
Author
|
Updated:
|
VidurShah
force-pushed
the
vidur/review-applications
branch
from
November 30, 2026 21:46
2361eea to
6ce66fa
Compare
- GET /semesters/:id/recruiting/preview?step=exec lists the exec rejections and invites that would go out, plus blockers (undecided applications, already done) and warnings (selected without a position). - POST /semesters/:id/recruiting/exec-done (superuser) locks the semester row, refuses if already done or undecided, links members, sets exec_round_done_at/by, records email_sends and an audit entry, then sends exec_rejection emails and invites after commit. - Overview gains an Actions section with a confirmation modal that lists every email kind and its count; Confirm stays disabled until the preview loads and nothing blocks it.
…em (#53) - email_sends.failed_recipients (migration 0010) stores the emails the provider rejected; invites keep the login so a resend gets a fresh link. - Exec round done saves its failures; GET /semesters/:id/recruiting/sends lists sends with failure counts and POST /semesters/:id/recruiting/resend retries them without redoing anything (audited as email.resend). - Exec round done is blocked while a Not selected candidate still holds an exec position.
…led emails (#53) - ConfirmStepModal uses the shadcn Dialog, Alert and Button; the Actions buttons use Button. - A Recruiting emails card on the overview (superusers) lists sends with failures and a Resend failed button.
VidurShah
force-pushed
the
vidur/exec-round
branch
from
November 30, 2026 21:48
8752388 to
f71ce3c
Compare
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.
Ticket
Closes #53
What changed
API (superuser only)
GET /semesters/:id/recruiting/preview?step=exec:{ emails: [{ kind, label, recipientCount }], blockers, warnings, alreadyDone }.step=allcomes in WP9.exec_rejection→ exec applications with statusnot_selected.invite→selectedapplicants whose member has no login.POST /semesters/:id/recruiting/exec-done(📝recruiting.exec_round_done), in one transaction:FOR UPDATE) and returns 409 ifexec_round_done_atis already set. Pressing twice, or two superusers at once, can't double-send.invited_at, setsexec_round_done_at/_by, writes oneemail_sendsrow per kind, and writes the audit entry with counts.exec_rejectionemails, then creates each invitee's passwordless login and sends theinviteemail (the WP1 7-day set-password link). Failures are counted in the response (failed) and never undo the round.PUT /submissions/:id/statusalready returns 409 onceexec_round_done_atis set (WP5).email/batch.ts:recordEmailSend()andsendToAll()(loads the template once). Recruiting done reuses them.Web: an Actions section on
/recruitmentwith Exec round done… (superusers only, until it's pressed). It opensConfirmStepModal, which lists every email kind and its count, shows blockers and warnings, and keeps Confirm disabled until the preview loads and nothing blocks it. Accept all and Recruiting done will reuse the modal.Decisions to check
invitecovers "selected and no login". A selected candidate who already has an account (e.g. a returning member) gets nothing from the tool; TDD says selected execs are told directly.How to verify
bun run test:all. APIexec-round.test.ts: superuser-only, blocked while undecided, preview counts equal the emails actually sent, the invite carries a set-password link,email_sends+ audit +exec_round_done_bywritten, second press is 409 with no new sends, decisions locked afterwards. Webstage-actions.test.ts: hidden for non-superusers, Confirm disabled until the preview loads, stays disabled on blockers, posts and shows the result./recruitment, and check the console email driver output matches the counts.Screenshots
To follow with the demo seed (WP10).
Checklist