WPB-19804 Email template validation#4699
Merged
battermann merged 24 commits intodevelopfrom Jan 14, 2026
Merged
Conversation
f6611d6 to
316a8a5
Compare
316a8a5 to
c012d28
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive validation for email templates used in team and user communications, while refactoring the email rendering system to make it more testable and removing unused SMS/call templates.
Changes:
- Added integration tests to validate all email templates render correctly without variable replacement errors
- Refactored email rendering to use a testable polysemy-based approach with error tracking
- Removed deprecated SMS and call templates across all locales
- Updated URLs in configuration files to use new, more user-friendly formats
Reviewed changes
Copilot reviewed 153 out of 153 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| services/brig/test/integration/API/Template.hs | New test module validating email template rendering for teams and users |
| libs/wire-subsystems/src/Wire/EmailSubsystem/Interpreter.hs | Refactored to use polysemy Output effect for tracking unreplaced variables |
| libs/wire-subsystems/src/Wire/EmailSubsystem/Template.hs | Added new rendering functions with error tracking capabilities |
| libs/wire-subsystems/src/Wire/EmailSubsystem/Templates/*.hs | Split template definitions into separate User and Team modules |
| services/brig/src/Brig/Template.hs | Added genTemplateBrandingMap for Map-based branding replacement |
| services/brig/brig.integration.yaml | Updated URLs to use cleaner, more user-friendly formats |
| services/brig/src/Brig/Team/Email.hs | Deleted - functionality moved to EmailSubsystem |
| libs/wire-subsystems/templates//user/sms/ | Removed SMS templates across all locales |
| libs/wire-subsystems/templates//user/call/ | Removed call templates across all locales |
| libs/wire-subsystems/templates//team/email/new-creator-welcome | Removed creator welcome templates |
Comments suppressed due to low confidence (2)
services/brig/test/integration/API/Template.hs:1
- The hardcoded URL in the test assertion should match the configuration in brig.integration.yaml. Consider extracting the base URL and path pattern to avoid inconsistencies between test expectations and actual configuration.
services/brig/test/integration/API/Template.hs:1 - Similar to the previous comment, this hardcoded URL should align with the configuration. Consider using a shared constant or configuration value to ensure consistency.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fisx
approved these changes
Jan 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://wearezeta.atlassian.net/browse/WPB-19804
Checklist
changelog.d