feat: add brand_color placeholder to email templates for Queens pink #344
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/basketball-api#344
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Lineage
Discovered during Kiana/Kelsie contract email send (2026-04-05). Queens emails rendered with Kings red CTA button. Worked around with runtime
html.replace('#d42026', '#e91e8c')in kubectl ad-hoc send — never committed.Repo
forgejo_admin/basketball-apiUser Story
As a Queens parent receiving a contract email, I want the email branding to match the Queens pink color scheme so that the email feels consistent with the contract page.
Context
The compiled email templates in
/data/email-templates/(mounted from~/westside-email-templates/compiled/on the host) have hardcoded#d42026(Kings red) for CTA buttons and accent elements. Queens emails should use#e91e8c(Queens pink).The templates are compiled MJML → HTML files stored in a local directory (
~/westside-email-templates/compiled/), NOT a git repo. They're mounted into the basketball-api pod at/data/email-templates/. To update a template, edit the compiled HTML file on the host and the running pod picks it up.The
load_email_template()function inemail.py(line 1107) does{{key}}→ value replacement. Adding{{brand_color}}as a placeholder follows the existing pattern.#d42026appears in all 3 templates: action.html (10x), announcement.html (13x), notification.html (9x). This ticket parameterizes ALL of them — they all need brand-aware color.File Targets
~/westside-email-templates/compiled/action.html— replace all#d42026with{{brand_color}}~/westside-email-templates/compiled/announcement.html— same~/westside-email-templates/compiled/notification.html— samesrc/basketball_api/services/email.py— updateload_email_template()to defaultbrand_colorto#d42026if not provided in data dict. This ensures backwards compatibility — existing callers that don't pass brand_color get Kings red.Files NOT inside a git repo: the compiled templates are on the host filesystem. Agent should edit them directly at
~/westside-email-templates/compiled/.Acceptance Criteria
#d42026in action.html replaced with{{brand_color}}#d42026in announcement.html replaced with{{brand_color}}#d42026in notification.html replaced with{{brand_color}}load_email_template()injectsbrand_color: '#d42026'into data dict if not provided (backwards compat)brand_color: '#e91e8c'renders pink CTA buttonTest Expectations
pytest tests/brand_color='#e91e8c', verify pink buttonpytest tests/Constraints
Checklist
Related
westside-basketball— parent projectarch-contracts-westside-basketballforgejo_admin/westside-contracts#34— parent data-driven contracts workScope Review: NEEDS_REFINEMENT
Review note:
review-837-2026-04-03Ticket has good template coverage and full traceability, but file targets and repo placement need fixes before an agent can execute.
westside-email-templates/compiled/action.htmlis not inside basketball-api — it's a standalone local directory (~/westside-email-templates), not a git repo. Agent needs to know how the template is versioned and deployed to/data/email-templates.send_contract_offer_emailfunction exists in email.py. Issue says "update callers" but doesn't say which function/route sends contract offer emails viaload_email_template("action", ...).html.replace('#d42026', '#e91e8c')not found in codebase — may have been ad-hoc. Clarify if AC #3 (remove hack) is applicable.#d42026hardcoded in 3/5 templates (announcement: 13, action: 10, notification: 9). Scope decision needed on whether to parameterize all or just action.html.Scope Review: READY (re-review)
Review note:
review-837-2026-04-03All 5 issues from previous review resolved. Template completeness verified, traceability complete, all 4 file targets confirmed on disk, blast radius contained (3 templates + email.py default). 7 AC items assessed as within 5-minute rule (homogeneous find-replace work). No decomposition needed. Ticket is ready for dispatch.
Agent picked up this ticket.