-
-
Notifications
You must be signed in to change notification settings - Fork 9
Fix link inclusion in reviewer emails #1417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughConsolidated review-related email templates across en-us, es-419, and fr-FR to use a single Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/lib/server/email-service/locales/en-us.json (1)
71-78: Remove deprecated email subject keys from locale files.The keys
reviewProductNoPlayListing,reviewAssetPackage, andreviewPwaProduct(lines 73, 75, 77) and theirWithCommentvariants are no longer used. The email executor only ever usesreviewProductorreviewProductWithCommentfor the messageId (see email.ts lines 104-105). These unused keys should be removed from all locale files (en-us.json, fr-FR.json, es-419.json) to reduce maintenance burden and prevent confusion.
🧹 Nitpick comments (3)
src/lib/server/email-service/locales/es-419.json (1)
35-36: Consider localizing the review email templates.The
reviewProductandreviewProductWithCommenttemplates are in English in the Spanish locale file. While this may be intentional, consider translating these templates to provide a consistent localized experience for Spanish-speaking users.src/lib/server/email-service/locales/fr-FR.json (1)
35-36: Consider localizing the review email templates.The
reviewProductandreviewProductWithCommenttemplates are in English in the French locale file. While this may be intentional, consider translating these templates to provide a consistent localized experience for French-speaking users.src/lib/server/job-executors/email.ts (1)
111-114: Consider handling the empty artifacts case for better user experience.When all artifacts are null, the
". This message is misleading to reviewers when no files are actually available. Consider conditionally displaying a more informative message (e.g., "No files available for review") when the artifacts list is empty, either by adjusting the filter logic or updating the email template.filesstring will be empty, resulting in the email displaying "Here are the product files to be reviewed:
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
src/lib/server/email-service/locales/en-us.json(1 hunks)src/lib/server/email-service/locales/es-419.json(1 hunks)src/lib/server/email-service/locales/fr-FR.json(1 hunks)src/lib/server/job-executors/email.ts(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: checks / build-and-test
🔇 Additional comments (2)
src/lib/server/email-service/locales/en-us.json (1)
35-36: LGTM! Template consolidation simplifies maintenance.The refactoring to use a single
{{files}}placeholder for dynamically-generated artifact links is clean and addresses the issue of incorrect links in republish emails.src/lib/server/job-executors/email.ts (1)
98-103: LGTM! Artifact extraction is clean and type-safe.The consolidation of artifact URLs into a single
filesobject provides a clear, maintainable structure for dynamically building the email content.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/lib/server/job-executors/email.ts (1)
98-103: Dynamicfilesconstruction correctly filters missing artifacts and fixes broken linksThe new
filesmap plus theObject.entries(...).filter((e) => !!e[1])pipeline ensures only artifacts with a realUrlget rendered, so republish flows without an APK (or with a null/undefined URL) will no longer emit a broken APK link. The anchor generation now also uses properly quotedhrefattributes, which should render reliably in email clients. This looks aligned with the PR’s goal of only including valid links.As an optional polish, you might consider mapping the internal keys (
apk,pwa,play-listing,asset-preview) to more human‑friendly or localized labels for the link text, e.g."APK","PWA","Google Play listing","Asset preview", so end users don’t see raw type identifiers.Also applies to: 111-114
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/lib/server/job-executors/email.ts(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: checks / build-and-test
- GitHub Check: checks / typecheck-lint
- GitHub Check: check / build-and-test
chrisvire
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Fixes #1405
Instead of having multiple possible email templates for each combination of artifacts, dynamically builds a list of artifact links from available relevant artifacts.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.