Add inbound emails view to mailers page#2
Open
mgodwin wants to merge 2 commits into
Open
Conversation
This commit adds comprehensive support for tracking and viewing inbound emails alongside outbound emails on the mailers page. Changes: - Add `direction` field to MailDelivery model to distinguish between 'outbound' and 'inbound' emails - Create ActionMailboxSubscriber to capture inbound emails via ActionMailbox events - Update ActionMailerSubscriber to set direction='outbound' for sent emails - Split mailers UI into separate "Outbound Deliveries" and "Inbound Deliveries" sections - Add "Emails Received" metric to summary panel alongside "Emails Sent" - Update controller to filter deliveries by direction parameter - Configure ActionMailbox in test dummy app with test/relay ingress - Create ApplicationMailbox and CatchAllMailbox for handling inbound emails - Add ActionMailbox database migration for inbound_emails and active_storage tables - Create seed task to generate sample inbound and outbound emails for testing - Add comprehensive tests for inbound email capture and UI rendering - Update existing tests to reflect new dual-table UI structure The implementation allows users to view both sent and received emails separately, with metrics tracked independently for each direction.
Update the observatory:seed rake task to periodically generate inbound emails alongside existing outbound emails, requests, and jobs. Changes: - Add inbound email scenarios with variety of subjects (support, inquiries, feedback, etc.) - Update event distribution: 50% requests, 30% jobs, 10% outbound mail, 10% inbound mail - Generate realistic inbound emails using ActionMailbox::InboundEmail API - Each inbound email includes random sender, subject, and message content Usage: bin/rails observatory:seed This allows continuous testing and visualization of both inbound and outbound email tracking in the mailers dashboard.
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.
No description provided.