unsend icon indicating copy to clipboard operation
unsend copied to clipboard

feat: allow deleting ses settings

Open KMKoushik opened this issue 1 month ago • 3 comments

Summary

  • add a delete action to the SES configuration table so admins can remove settings from the UI
  • expose a deleteSesSettings mutation that tears down SNS topics/configuration sets, clears queues, and drops the DB record
  • allow EmailQueueService to drop per-region queues/workers so deleted regions no longer dispatch mail

Testing

  • pnpm lint (fails: existing warnings in packages/ui lint task)

Codex Task


Summary by cubic

Adds a delete action for SES configurations in the admin dashboard. Deleting a configuration cleans up SES/SNS resources, stops regional queues, and removes the database record.

  • New Features
    • Added delete button with confirmation dialog in the SES configurations table.
    • New admin.deleteSesSettings mutation to delete a setting by ID.
    • SES: added deleteConfigurationSet helper (handles NotFoundException).
    • SesSettingsService.deleteSesSetting: deletes SES config sets and SNS topic, removes region queues, deletes DB row, and invalidates cache.
    • EmailQueueService.removeRegion: closes and removes per-region queues/workers.

Written for commit a5b2f0ff11f24ef9d9b71d28048c9f9e59544570. Summary will update automatically on new commits.

Summary by CodeRabbit

Release Notes

  • New Features
    • Users can now delete SES email configurations with a confirmation dialog for safety.
    • Automatic cleanup of email queues, configuration sets, and related resources upon deletion.
    • Delete option available alongside edit functionality in the configurations list.

KMKoushik avatar Nov 17 '25 00:11 KMKoushik

Deploying usesend with  Cloudflare Pages  Cloudflare Pages

Latest commit: a5b2f0f
Status: ✅  Deploy successful!
Preview URL: https://baf22911.usesend.pages.dev
Branch Preview URL: https://codex-add-option-to-delete-s.usesend.pages.dev

View logs

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
unsend-marketing Ready Ready Preview Comment Nov 17, 2025 0:44am

vercel[bot] avatar Nov 17 '25 00:11 vercel[bot]

Walkthrough

This pull request implements SES configuration deletion functionality across the application stack. A new React component displays a confirmation dialog in the admin UI for deleting SES settings. The backend introduces a TRPC mutation that orchestrates the deletion workflow, which includes removing AWS configuration sets, SNS topics, cleaning up email queue services for the region, and deleting the database record. Supporting AWS and service layer functions were added to handle SES configuration set deletion and email queue region cleanup.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: allow deleting ses settings' accurately and concisely summarizes the main change: adding SES deletion functionality. It clearly conveys the primary feature addition without being vague or misleading.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • [ ] 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment
  • [ ] Commit unit tests in branch codex/add-option-to-delete-ses-settings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Nov 17 '25 00:11 coderabbitai[bot]