Commit Graph

1 Commits

Author SHA1 Message Date
JasonFraser c0a77a1a65 Fill in missing Resend templates + Freescout support links
Closes gaps identified after Phase 3: the four email templates named
in CLAUDE.md's file tree (§5) were only partially built (weekly brief
only). Adds:

- welcome.html, trial_reminder.html, price_alert.html, new_product.html
  — matching the brief.html styling pattern
- services/email_service.py — send_welcome_email(),
  send_trial_reminder_email(), send_price_alert_email(),
  send_new_product_email(), all via the same plain-Jinja2 + Resend
  pattern as brief_service.py (side-effect failures logged, never raised)
- Three new internal routes for n8n/manual-onboarding to call:
  POST /internal/welcome-email/<tenant_id>
  POST /internal/trial-reminder/<tenant_id>
  POST /internal/alert-email/<alert_id> (dispatches to price_alert or
  new_product template by alert_type, marks delivered_email on success)
- alert_repository.mark_email_delivered() to back that last route

Also adds the "Contact support" (Freescout) placeholder link CLAUDE.md
calls for in both the sidebar (visible on every page) and AccountPage,
pointing at support.bettersight.io. The actual Freescout container,
DNS/Pangolin routing, and mailbox are real infra this backend can't
provision — the link is a placeholder until that's deployed.

216 backend tests passing, 95% coverage, 100% on the new email_service.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-01 13:32:56 -04:00