Skip to content

feat(dashboard): send invitation emails on member invite#14

Merged
johannmachemer merged 1 commit into
mainfrom
feat/invitation-emails
Jun 12, 2026
Merged

feat(dashboard): send invitation emails on member invite#14
johannmachemer merged 1 commit into
mainfrom
feat/invitation-emails

Conversation

@johannmachemer

Copy link
Copy Markdown
Contributor

Summary

  • The member-invite route created the invitation row but never sent an emailsendEmail and renderInvitationEmail were dead code, so no invitee ever received a link.
  • Wire them up: render the invitation template and send it, building the accept link as ${APP_URL}/invite/<token>.
  • Response now returns emailSent; when SMTP is unconfigured it falls back to returning inviteUrl so an admin can still share the link manually (instead of always leaking the raw token).
  • Forward SMTP_* vars to the dashboard container in docker-compose.yml (they were never passed through).
  • Client toast reflects reality: success when sent, or a copyable invite link when email isn't configured.

Test plan

  • With SMTP set, inviting a member delivers the email and the accept link works.
  • Without SMTP, the invite still succeeds and the UI surfaces a copyable link.
  • pnpm --filter @yavio/dashboard typecheck passes.

🤖 Generated with Claude Code

The member-invite route created the invitation but never sent an email, so
sendEmail/renderInvitationEmail were dead code. Wire them up: render the
invitation and send it, building the accept link from APP_URL. Return
emailSent, and fall back to returning the invite link when SMTP is
unconfigured so an admin can still share it. Forward SMTP_* vars to the
dashboard container and show accurate toasts on the client.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Coverage Report for dashboard

Status Category Percentage Covered / Total
🔵 Lines 84.26% 1392 / 1652
🔵 Statements 84.26% 1392 / 1652
🔵 Functions 88.88% 88 / 99
🔵 Branches 88.11% 267 / 303
File CoverageNo changed files found.
Generated in workflow #55 for commit fe1e351 by the Vitest Coverage Report Action

@johannmachemer johannmachemer merged commit df94501 into main Jun 12, 2026
11 of 12 checks passed
@johannmachemer johannmachemer deleted the feat/invitation-emails branch June 12, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant