Repository navigation
Conversation
Co-Authored-By: Claude Code <noreply@anthropic.com>
|
Thanks @joei4cm, this is a great fix. Pulling the lookup into There are two things I'd like to ask for before we merge. The first is the format check, which is what's failing CI. It checks every file a PR touches, and The second is new now that saved templates reach real inboxes. An admin can save an invitation template that no longer contains Thanks as well for offering to rebase around #280. Whichever one lands second will need it, since both touch the same strings in |
Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
|
Thanks @joei4cm, both of those look great. The accept-link check is exactly what I was after, and it's nice to see the invite routes formatted too. Reading through it again, there are three things I'd like to ask for before we merge. The first is invite templates that were saved before this change. The new check runs on save, so an invite override already in the database never went through it. Once this merges, those rows start going out in real emails. If one is missing The second is the check itself. The third is in |
Refs #279.
Saved template overrides now reach outgoing invitation email.
POST /api/team/inviteandPOST /api/team/invite/resendpass the stored-override lookup intosendEmail, so a savedinviteoverride controls the subject and body, and removing it falls back to the packaged template.The lookup is shared with the template GET and preview routes through
apps/web/src/lib/template-override.ts, so the editor, preview, and delivery path read the same row. The templates screen now distinguishes theinvitetemplate, which is used for outgoing invitations, from the other preview-only templates.Invite previews now use the same context shape the invite routes send, so variables that invitation emails cannot fill render empty in preview instead of showing unrelated sample data. Template subject saves also reject control characters because the subject becomes an email header.
Regression coverage exercises both invite paths with a saved override and after the override is removed, using the real
sendEmailrenderer with a fake transport. Preview coverage checks the invite context and the new subject validation.Validation:
cd apps/web && NODE_OPTIONS='--max-old-space-size=4096' pnpm --config.concurrency=2 exec vitest run src/__tests__/team-api.test.ts src/__tests__/templates-page.test.tsx src/__tests__/templates-api.test.ts --maxWorkers=2— 3 files, 86 tests passed.Note: #280 covers the remaining copy and dead-issue-reference cleanup from #279; this PR is the send-path fix. Happy to rebase if #280 lands first.
🤖 Generated with Claude Code