Skip to content

fix: distinguish project-invitation email subject from plain org invitation - #74

Merged
jhosepmyr merged 1 commit into
developfrom
feature/improve-email-html-templates
Jul 10, 2026
Merged

fix: distinguish project-invitation email subject from plain org invitation#74
jhosepmyr merged 1 commit into
developfrom
feature/improve-email-html-templates

Conversation

@jhosepmyr

Copy link
Copy Markdown
Contributor

Description

Follow-up to #73 (merged before this commit was pushed to the branch). Real end-to-end verification against a running app + Mailpit found that sendProjectInvitationEmail's subject, heading, and preheader were copy-pasted verbatim from sendInvitationEmail — a recipient scanning their inbox list couldn't tell a project invite apart from a plain org invite; the only difference was buried in an extra body paragraph.

Both the subject line and the in-email heading/preheader now name the project explicitly.

Bounded context / area: iam

Related issue / US: Follow-up to #73


Type of Change

  • feat — new feature
  • fix — bug fix
  • refactor — code change without behavior change
  • test — tests only
  • docs — documentation only
  • build / ci — build, dependencies, or CI/CD
  • chore — maintenance

Checklist

  • The PR targets develop (not main)
  • Branch name follows feature/*, bugfix/*, or hotfix/*
  • Commits follow Conventional Commits
  • ./gradlew build passes locally (compile + tests)
  • New cross-module access respects module boundaries — change stays inside iam.infrastructure.email
  • Added/updated tests for the change — existing SmtpEmailAdapterTest content assertions still pass; no new test added since the fix is subject-line/heading text, not new logic to unit test in isolation (covered by the E2E Mailpit verification instead)
  • No secrets, credentials, or .pem keys are committed
  • CHANGELOG.md updated under [Unreleased] — not done, this is a same-day fix to an unreleased entry already documented in feat: redesign transactional email templates with 2026 best practices #73; no separate entry needed
  • Database changes are expressed as Flyway migrations — N/A

How to Test

  1. Trigger a project invitation (POST /api/organizations/{orgId}/projects/{projectId}/members/invite) and a plain org invitation (POST /api/organizations/{orgId}/members) side by side
  2. In Mailpit (or any inbox), confirm the two now show visibly different subjects — the project invite names the project, the org invite doesn't

Notes / Screenshots (optional)

Found via real E2E verification (app + Mailpit, all 5 email flows triggered through actual API calls) after #73 merged — not caught by unit tests since they only assert body content, not subject lines.

… invitation

sendProjectInvitationEmail reused sendInvitationEmail's subject,
heading, and preheader verbatim — a recipient scanning their inbox
list couldn't tell a project invite apart from a plain org invite
(the only difference was buried in a body paragraph). Both now name
the project explicitly. Found via real end-to-end Mailpit verification,
not just unit tests.
@jhosepmyr
jhosepmyr requested a review from Kyrubi as a code owner July 10, 2026 16:55
@jhosepmyr
jhosepmyr merged commit e9f5ea6 into develop Jul 10, 2026
5 checks passed
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