Repository navigation
Show which recipients bounced or complained from a sequence or broadcast - #214
Conversation
- API: GET /sequences/{sequenceId}/deliveries lists each send with its
outcome, hard/soft bounce, the ESP's reason and SMTP codes, and the
address's active suppression. outcome=bounced|complained lists exactly
the sends behind the stats' bounce and complaint rates (same ledger rows).
Contact deliveries now include messageId and outcome.
- MCP list_sequence_deliveries, SDK sequences.deliveries()/listAllDeliveries(),
openapi.json regenerated. MCP reuses the contract's contact-delivery schema.
- Index outbound_messages.campaign_delivery_id (migration 0033) for the
delivery-to-ledger joins.
- Dashboard: Bounce rate and Spam complaints open the recipients behind them;
contact Delivery history shows each send's outcome as a status pill.
- Tooltips mention that auto-pause is checked once 100 emails have gone out.
Closes #213
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 46b4f6d0f9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ...(stats.bounceRate > 0 && actions.onViewBounced | ||
| ? { | ||
| onSelect: actions.onViewBounced, | ||
| selectLabel: "View recipients who bounced", |
There was a problem hiding this comment.
Make recipient action labels configurable
When a library consumer supplies these callbacks, the new action labels are still fixed in English and cannot be customized through SequenceStatsActions; expose the labels as caller-provided props so third-party apps can localize or rebrand this UI.
AGENTS.md reference: packages/email-blocks/AGENTS.md:L3-L4
Useful? React with 👍 / 👎.
Closes #213
What
A broadcast or sequence showed a bounce rate and a spam complaint rate, but there was no way to see who they referred to. This adds the recipients behind those numbers, plus each send's outcome on the contact page.
API, MCP, SDK
GET /sequences/{sequenceId}/deliveries?outcome=bounced|complained: one row per send, with the recipient, contact, which email it was, the outcome (sent,delivered,bounced,complained,failed), hard or soft bounce, the ESP's reason and SMTP codes, when it happened, and the address's active suppression. Paged withoffset/itemsPerPage(100 at most).sequenceDeliveryRates, so a filteredtotalequals the number behindbounceRate/complaintRate. A test asserts this. I chose this over addingsequenceIdto/delivery-eventsbecause events can be duplicated by retries, and an inline SMTP 5xx bounce has no event at all, so an event-based list wouldn't match the rate. A bounced send with no event is reported as a hard bounce with no reason.GET /contacts/{contactId}/deliveriesnow returnsmessageIdandoutcomefor each send (both null for sends from before outbound messages were recorded).list_sequence_deliveriestool, with a parity manifest entry and scope policy. The MCP's copy of the contact-delivery schema is replaced by the contract's, so the two can't drift.sequences.deliveries()andsequences.listAllDeliveries(), documented in the README.openapi.jsonis regenerated.Database
0033: adds an index onoutbound_messages.campaign_delivery_id. Both the contact history and the sequence list join on that column, which had no index. The migration only adds an index (IF NOT EXISTS), so the previous release still runs against the new schema.Dashboard
email-blocks
SequenceAnalyticsMetricgainsonSelect/selectLabel, andsequenceStatsMetricsgainsonViewBounced/onViewComplained. The accessible name keeps the number ("Bounce rate 15.0%: View recipients who bounced").AUTO_PAUSE_MIN_SENT), which is the related fix the issue asked for.Changeset:
sendlitand@sendlit/email-blocksminor.Testing
listSequenceDeliveriesand the contact outcomes, plus web (116), SDK and email-blocks tests, platform conformance, MCP parity, andcheck:drift.outcomeoritemsPerPageover 100) and the 404 for an unknown sequence.qa-issue-213(arm64). Migration0033applied, the health check passes, and the endpoint returns 200 with totals matchingsentfor every sequence. The sequence and contact pages render with no console errors. QA only has Mailpit, so no real bounce or complaint could be exercised there.Not in this PR
🤖 Generated with Claude Code