Skip to content

Saved template overrides never reach outgoing email #279

Description

@NathanTarbert

Template overrides save and preview correctly — PUT /api/templates/[slug] persists through prisma.templateOverride.upsert (apps/web/src/app/api/templates/[slug]/route.ts:125), and the editor previews the unsaved draft (apps/web/src/app/settings/templates/page.tsx:96). What a saved override does not do is reach an outgoing email: the send path still renders the packaged defaults, so an author edits a template, sees the change in the preview, saves it, and every email that goes out is unchanged.

The UI is honest about it today — the save toast and the page description both say so — but they point readers at an issue that no longer exists, so the explanation dead-ends at a 404.

What to do

  • Make the email send path read TemplateOverride and fall back to the packaged default when no override exists
  • Re-point the two user-facing strings at this issue (page.tsx:138, page.tsx:177)
  • Re-point the eleven test docblocks and the middleware.ts:14 comment that reference the removed issues
  • Drop "(preview only)" from the template list badge at page.tsx:221 once sending honours overrides

Acceptance

  • A saved override changes the subject and body of the next outgoing email of that type
  • Removing the override restores the packaged default
  • A test covers override → send, and default → send
  • No string in apps/web or the test suite points at a removed issue number

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: productDashboard / product surfacesbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions