Update email notification template to include course details and pending request list - #544
Merged
cycomachead merged 1 commit intoAug 6, 2026
Conversation
Refactor the pending requests notification to use ERB templates and provide more context to course staff. The email now includes: - Full course name, semester, and links to the course and requests page. - A summary of auto-approved requests within the notification window. - A detailed list of individual pending requests (capped at 50). - Improved link generation logic and multi-part HTML/text support. Co-authored-by: Claude Code <noreply@anthropic.com>
cycomachead
deleted the
cycomachead/224-update-email-notification-template/1
branch
August 6, 2026 19:52
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.
General Info
Changes
Updates the pending requests digest email to include richer context for course staff: a link to the course page, a link to the requests page with the full server URL, a summary of auto-approved requests within the notification window, and a bulleted list of individual pending requests with student name, assignment, days requested, and a direct review link.
Key changes:
PendingRequestsMaileris now a realActionMailerclass (previously wrappedEmailServicewith inline string templates). Email body is rendered from ERB views (app/views/pending_requests_mailer/pending_requests_email.html.erband.text.erb), and the email is now multipart HTML + plain text.PendingRequestsNotificationJobnow loads the full pending request records (with user and assignment preloaded) and counts auto-approvals within the window matching the digest frequency (hourly/daily/weekly).Course#course_link/Course#requests_linkadded to centralize absolute URL generation.Request#request_linkis now public and delegates tocourse.requests_link, removing duplicated host-normalization logic.Testing
spec/jobs/pending_requests_notification_job_spec.rbwith assertions for course links, per-request lines, auto-approval window counting (including that stale approvals outside the window are excluded), and per-frequency wording.spec/mailers/pending_requests_mailer_spec.rbcovering reply-to handling, HTTPS defaulting for schemelessAPP_HOST, per-frequency period labels, nameless-user fallback, and list truncation.Screenshots
Rendered HTML email preview
Documentation
No documentation changes required.
Checklist
Superconductor Ticket Implementation | App Preview | Guided Review