feat(broadcasts): add cancel command - #359
Merged
Merged
Conversation
Cancels a queued or scheduled broadcast via the SDK's new broadcasts.cancel(), which bumps the resend dependency to 6.19.0. Adds a 'scheduled' case to the status indicator, used by the new picker that filters to cancelable (queued/scheduled) broadcasts. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This was referenced Aug 11, 2026
dielduarte
marked this pull request as ready for review
August 11, 2026 14:31
gabrielmfern
approved these changes
Aug 11, 2026
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 7 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
- Require sending_access instead of the full_access default, so a send-only key can cancel a broadcast it's allowed to send. - Extract statusFilteredBroadcastPickerConfig, deduplicating sendBroadcastPickerConfig and cancelBroadcastPickerConfig down to their differing filter predicate. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
cubic's suggestion to mirror send's sending_access permission was wrong: apps/public-api's SEND_ROUTES allowlist (is-authenticated.ts) only exempts /broadcasts/:id/send for sending_access keys, not /cancel. A sending_access key hitting cancel gets a 401 restricted_api_key from the real API. cancel requires full_access, which is the default this restores. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
0 issues found across 1 file (changes from recent commits).
Requires human review: Adds a new 'cancel' command for broadcasts, which is a new feature introducing operational tradeoffs (cancelling delivery). Human review is needed to confirm the command semantics, error handling, and compatibility with the broader rollout.
Re-trigger cubic
Merged
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.
Summary
resend broadcasts cancel <id>— cancels a queued or scheduled broadcast, mirroring thedeletecommand's structure but usingrunWrite(no confirmation prompt, since cancel is non-destructive: it stops delivery / reverts to draft rather than removing the broadcast).resenddependency to6.19.0, the first published version withbroadcasts.cancel().cancelBroadcastPickerConfigfiltering toqueued/scheduledbroadcasts, and ascheduledcase tobroadcastStatusIndicator(previously only handled draft/queued/sent).broadcastsskill reference doc and the top-levelbroadcastshelp text/examples.Part of the broadcast cancel rollout: resend/resend-monorepo#8126, resend/resend-openapi#85, resend/resend-node#1059 / #1064, resend/resend-docs#1722, resend/resend-go#144, resend/resend-java#122, resend/resend-php#135, resend/resend-python#250, resend/resend-ruby#216, resend/resend-rust#91, resend/resend-dotnet#136.
Test plan
vitest run tests/commands/broadcasts/— 75/75 passing (4 new)tsc --noEmit— clean (theresendbump also fixed pre-existing type errors from a stale lockfile version)biome check .— clean on touched files (2 pre-existing warnings elsewhere, unrelated)🤖 Generated with Claude Code
Summary by cubic
Add
resend broadcasts cancel <id>to cancel queued or scheduled broadcasts without deleting them. Adds a cancel-focused picker and scheduled status in the UI, and updates help and docs.New Features
cancelcommand: stops queued sends mid-send and reverts scheduled to draft; draft/sent cannot be cancelled.cancelrequiresfull_access— send-only (sending_access) keys are not allowed.Dependencies
resendto6.19.0to usebroadcasts.cancel().Written for commit 2697b6d. Summary will update on new commits.