Skip to content

[PM-31153] email updates for domain claim pt 2#6942

Open
JaredScar wants to merge 9 commits intomainfrom
ac/pm-31153-email-updates-for-domain-claim-pt-2
Open

[PM-31153] email updates for domain claim pt 2#6942
JaredScar wants to merge 9 commits intomainfrom
ac/pm-31153-email-updates-for-domain-claim-pt-2

Conversation

@JaredScar
Copy link
Contributor

@JaredScar JaredScar commented Feb 3, 2026

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-31153

📔 Objective

Fix up email template after feedback from product. Keep in mind this updates the ContactUs template, so it will affect all emails that use this template as well.

📸 Screenshots

image

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

* Updated the email template to include the claimed domain name and user email.
* Modified the `ClaimedUserDomainClaimedEmails` model to include the domain name.
* Adjusted the `SendClaimedDomainUserEmailAsync` method to pass the domain name to the email message.
* Added a new test for rendering the domain claimed email to ensure proper content delivery.
* Adjusted styles and formatting in the DomainClaimedByOrganization email template for improved readability.
* Modified the TitleContactUs layout to ensure proper rendering of titles.
* Updated the HandlebarsMailService to include HTML line breaks in the email title for better presentation.
@JaredScar JaredScar requested review from a team as code owners February 3, 2026 18:37
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

Logo
Checkmarx One – Scan Summary & Details3af27173-a5a0-4153-b53a-6fb69989855e

New Issues (2)

Checkmarx found the following issues in this Pull Request

# Severity Issue Source File / Package Checkmarx Insight
1 MEDIUM Use_Of_Hardcoded_Password /util/Seeder/Factories/UserSeeder.cs: 50
detailsThe application uses the hard-coded password DefaultPassword for authentication purposes, either using it to verify users' identities, or to acces...
Attack Vector
2 MEDIUM Use_Of_Hardcoded_Password /util/Seeder/Factories/UserSeeder.cs: 62
detailsThe application uses the hard-coded password MasterPassword for authentication purposes, either using it to verify users' identities, or to access...
Attack Vector
Fixed Issues (1)

Great job! The following issues were fixed in this Pull Request

Severity Issue Source File / Package
MEDIUM Use_Of_Hardcoded_Password /util/Seeder/Factories/UserSeeder.cs: 12

…gn property for improved consistency in styling
@BTreston BTreston added the ai-review Request a Claude code review label Feb 5, 2026
@JaredScar JaredScar requested a review from BTreston February 5, 2026 17:21
@claude
Copy link
Contributor

claude bot commented Feb 5, 2026

Claude finished @JaredScar's task in 2m 1s —— View job


Code Review Summary

PR: PM-31153 email updates for domain claim pt 2

Overview

This PR enhances domain claimed email notifications by adding the claimed domain name and user email to the email template, improving context for end users. The template styling has also been refined.

Review Status: Approved

All previous feedback has been addressed:

  • Test file comments removed per reviewer request
  • Skipped tests properly annotated with [Fact(Skip = "...")]
  • Test assertions verify email content rendering correctly

Files Reviewed

File Status
src/Core/AdminConsole/OrganizationFeatures/OrganizationDomains/VerifyOrganizationDomainCommand.cs No issues
src/Core/MailTemplates/Handlebars/AdminConsole/DomainClaimedByOrganization.html.hbs No issues
src/Core/MailTemplates/Handlebars/AdminConsole/DomainClaimedByOrganization.text.hbs No issues
src/Core/MailTemplates/Handlebars/Layouts/TitleContactUs.html.hbs No issues
src/Core/Models/Data/Organizations/ClaimedUserDomainClaimedEmails.cs No issues
src/Core/Models/Mail/ClaimedDomainUserNotificationViewModel.cs No issues
src/Core/Platform/Mail/HandlebarsMailService.cs Minor suggestion (existing thread)
test/Core.Test/AdminConsole/OrganizationFeatures/OrganizationDomains/VerifyOrganizationDomainCommandTests.cs No issues
test/Core.Test/Platform/Mail/DomainClaimedEmailRenderTest.cs No issues

Outstanding Item

One existing suggestion remains open regarding the unused EmailDomain property in HandlebarsMailService.cs - this is a minor cleanup opportunity and not a blocker.


Automated review by Claude

TitleFirst = $"Important update to your<br>Bitwarden account",
OrganizationName = CoreHelpers.SanitizeForEmail(org.DisplayName(), false),
DomainName = domainName,
EmailDomain = emailAddress.Split('@').LastOrDefault() ?? "",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTED: The EmailDomain property is computed here but never referenced in the email template (DomainClaimedByOrganization.html.hbs uses DomainName and UserEmail, but not EmailDomain).

Consider removing this unused property assignment, or if it's intended for future use, add a comment explaining the intent.

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
@JaredScar JaredScar requested a review from BTreston February 5, 2026 21:22
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 5, 2026

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

Labels

ai-review Request a Claude code review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants