You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Delete broadcasts (with archive for sent ones) #147
Broadcasts can't be deleted from the dashboard or MCP. DELETE /sequences/:sequenceId exists in the REST API, but nothing calls deleteSequence in apps/web/lib/api.ts, and there is no MCP tool for it.
Risk in the current API:deleteSequence (apps/api/src/sequences/queries.ts) has no status guard. Because email_deliveries and ongoing_sequences use ON DELETE CASCADE on sequences.id, deleting a broadcast that is sending or already sent removes its delivery history and report.
Scope
API: allow hard delete only for drafts and scheduled broadcasts that haven't started. Once sending has started or finished, return 409 with a code (for example broadcast_sent). Sent broadcasts get archive instead (hidden from the list by default, report and web-archive page kept), as Mailchimp does. Update the OpenAPI docs.
MCP: add a delete_broadcast tool (and archive_broadcast if archive ships here).
Dashboard: a Delete action in the broadcasts list row menu and on the detail page, with a shadcn AlertDialog confirmation. Disable it, with a reason, when delete isn't allowed.
Observability:sequence_deleted already fires. Add an archive event if archive ships.
Web archive: a deleted or archived broadcast is removed from /w/:handle, the feed and the sitemap.
MediaLit assets: when this delete removes content, also delete the MediaLit files it referenced that are no longer used anywhere (media row and file). Use the shared helper from #157. Keep assets used by sent or archived content.
Tests: check that the MediaLit files this entity owned are deleted (assert deleteMedia calls with the MediaLit client mocked, and that the media rows are gone), and that shared or sent-mail media is kept. See the test list in #157.
Activity
clbotdev commentedon Oct 29, 2026
MediaLit assets: when this delete removes content, also delete the MediaLit files it referenced that are no longer used anywhere (
mediarow and file). Use the shared helper from #157. Keep assets used by sent or archived content.clbotdev commentedon Oct 29, 2026
Tests: check that the MediaLit files this entity owned are deleted (assert
deleteMediacalls with the MediaLit client mocked, and that themediarows are gone), and that shared or sent-mail media is kept. See the test list in #157.Merge pull request #165 from codelitdev/feat/147-broadcast-delete-arc…