Display email delivery statistics#222
Open
jkbcz wants to merge 3 commits into
Open
Conversation
jkbcz
commented
Jul 14, 2026
Contributor
- Adds UI for displaying delivery statistics when sending out an email
- The new UI is only enabled for new emails, because we didn't store the notification id, so it's impossible to fetch statistics for older notifications.
There was a problem hiding this comment.
Pull request overview
This PR adds support for displaying (and manually refreshing) email delivery statistics for sent notifications in the bcc-login editor UI by persisting the CoreAPI notification id + delivery stats in post meta and exposing a REST endpoint to refresh stats.
Changes:
- Persist notification
id,type, and delivery statistics insent_notificationsmeta when sending notifications. - Add a REST endpoint to refresh delivery statistics by fetching the notification from CoreAPI and updating stored meta.
- Replace the “sent notifications” UI from a simple table to a per-notification summary + delivery statistics section with a refresh action and toast feedback.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Updates/locks dependencies pulled in by the UI + tooling changes. |
| plugins/bcc-login/src/visibility.js | Stops pre-formatting sent_notifications and passes raw meta through to the list component. |
| plugins/bcc-login/src/components/sent-notifications-list.js | New UI for listing sent notifications and showing/refreshing delivery statistics. |
| plugins/bcc-login/src/components/send-notifications.js | Dispatches an updated notifications payload after sending. |
| plugins/bcc-login/includes/class-bcc-notifications.php | REST endpoints now return updated notifications; adds refresh-statistics endpoint; stores delivery stats. |
| plugins/bcc-login/includes/class-bcc-login-visibility.php | Extends REST meta schema for sent_notifications (adds id/type/stats); removes sanitize callback. |
| plugins/bcc-login/includes/class-bcc-coreapi-client.php | send_notification() returns decoded JSON; adds get_notification() helper. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.