Skip to content

feat(broadcasts): add cancel command - #359

Merged
dielduarte merged 3 commits into
mainfrom
broadcasts-cancel
Aug 11, 2026
Merged

feat(broadcasts): add cancel command#359
dielduarte merged 3 commits into
mainfrom
broadcasts-cancel

Conversation

@dielduarte

@dielduarte dielduarte commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds resend broadcasts cancel <id> — cancels a queued or scheduled broadcast, mirroring the delete command's structure but using runWrite (no confirmation prompt, since cancel is non-destructive: it stops delivery / reverts to draft rather than removing the broadcast).
  • Bumps the resend dependency to 6.19.0, the first published version with broadcasts.cancel().
  • Adds a new cancelBroadcastPickerConfig filtering to queued/scheduled broadcasts, and a scheduled case to broadcastStatusIndicator (previously only handled draft/queued/sent).
  • Updates the bundled broadcasts skill reference doc and the top-level broadcasts help 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 (the resend bump 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

    • cancel command: stops queued sends mid-send and reverts scheduled to draft; draft/sent cannot be cancelled.
    • Picker filters to queued/scheduled and shows scheduled status; uses a shared status-filtered picker config.
    • Docs updated; cancel requires full_access — send-only (sending_access) keys are not allowed.
  • Dependencies

    • Bump resend to 6.19.0 to use broadcasts.cancel().

Written for commit 2697b6d. Summary will update on new commits.

Review in cubic

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>
@socket-security

socket-security Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedresend@​6.19.098100100100100

View full report

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 7 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread src/commands/broadcasts/cancel.ts
Comment thread src/commands/broadcasts/utils.ts Outdated
dielduarte and others added 2 commits August 11, 2026 13:12
- 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>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@dielduarte
dielduarte merged commit 5aacece into main Aug 11, 2026
12 checks passed
@dielduarte
dielduarte deleted the broadcasts-cancel branch August 11, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants