override email feature - #1371
Conversation
priosshrsth
commented
Jul 3, 2026
- override email contents for some workspaces
* Handle expected Prisma request errors
* Warn on known Prisma errors instead of silencing them
…orkspaces (#1366) * feat(notifications): evaluation-framed reminder emails for override workspaces
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Deployment failed with the following error: Learn More: https://vercel.link/multiple-function-regions |
Greptile SummaryThis PR adds a workspace-level email override for reminder notifications, replacing the generic task reminder copy with mystery-shop-evaluation-specific HTML content (
Confidence Score: 4/5Safe to merge for non-override workspaces; the override path is well-tested but carries a small risk of a body-less email for pathological task titles. The XSS escaping is correct and tested, the standard email path is untouched, and the test suite is thorough. The two concerns are narrow: the "Action Required: " strip uses an unanchored string replace (could silently mangle titles that contain the phrase mid-string), and if stripping the prefix leaves an empty string the resulting override email will have neither body nor htmlBody. Both are edge cases unlikely to be hit in production, but neither is guarded against in the code. src/jobs/notifications/send-reminder-email.ts — the evaluationTitle derivation logic around line 36. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[sendReminderEmail called] --> B{workspace in\noverrideWorkspaces?}
B -- No --> C[getReminderEmailDetails\nno evaluationTitle]
C --> D[email: standard subject/header/title/body]
B -- Yes --> E[compute displayTitle\nvia reminderSubjectSearch replace]
E --> F[compute evaluationTitle\nstrip 'Action Required: ' prefix]
F --> G[getReminderEmailDetails\nwith evaluationTitle]
G --> H{evaluationTitle\ntruthy?}
H -- Yes --> I[htmlBody: mystery shop\nevaluation HTML]
H -- No --> J[htmlBody: undefined]
I --> K[email: custom header/title\n+ htmlBody, no body]
J --> L[email: custom header/title\n+ htmlBody undefined, no body]
K --> M[copilot.createNotification]
L --> M
D --> M
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[sendReminderEmail called] --> B{workspace in\noverrideWorkspaces?}
B -- No --> C[getReminderEmailDetails\nno evaluationTitle]
C --> D[email: standard subject/header/title/body]
B -- Yes --> E[compute displayTitle\nvia reminderSubjectSearch replace]
E --> F[compute evaluationTitle\nstrip 'Action Required: ' prefix]
F --> G[getReminderEmailDetails\nwith evaluationTitle]
G --> H{evaluationTitle\ntruthy?}
H -- Yes --> I[htmlBody: mystery shop\nevaluation HTML]
H -- No --> J[htmlBody: undefined]
I --> K[email: custom header/title\n+ htmlBody, no body]
J --> L[email: custom header/title\n+ htmlBody undefined, no body]
K --> M[copilot.createNotification]
L --> M
D --> M
Reviews (1): Last reviewed commit: "Merge branch 'production' into main" | Re-trigger Greptile |