fix(notifications): consolidate notification utils, update email styling#2822
Merged
waleedlatif1 merged 2 commits intostagingfrom Jan 15, 2026
Merged
fix(notifications): consolidate notification utils, update email styling#2822waleedlatif1 merged 2 commits intostagingfrom
waleedlatif1 merged 2 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile SummaryThis PR consolidates notification email rendering into a shared React component, improving maintainability and consistency. The changes also remove the trace spans feature from notifications due to payload size concerns. Key changes:
The consolidation follows established email component patterns and maintains backward compatibility for existing notification configurations. Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant UI as Notification UI
participant API as API Routes
participant BG as Background Task
participant Email as Email Components
participant Mailer as Email Mailer
Note over UI,API: Configuration Phase
UI->>API: POST /notifications (without includeTraceSpans)
API->>API: Store subscription config
API-->>UI: Return subscription
Note over BG,Mailer: Notification Delivery Phase
BG->>BG: Build payload (no trace spans)
BG->>BG: Add rate limits if enabled
BG->>BG: Add usage data if enabled
BG->>Email: renderWorkflowNotificationEmail(props)
Email->>Email: WorkflowNotificationEmail component
Email->>Email: Apply baseStyles.codeBlock
Email-->>BG: Return HTML string
BG->>Mailer: sendEmail(html, text)
Mailer-->>BG: Delivery result
|
apps/sim/components/emails/notifications/workflow-notification-email.tsx
Outdated
Show resolved
Hide resolved
apps/sim/app/api/workspaces/[id]/notifications/[notificationId]/test/route.ts
Outdated
Show resolved
Hide resolved
Collaborator
Author
|
@greptile |
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.
Summary
Type of Change
Testing
Tested manually
Checklist