Skip to content

feat(dashboard): Cancel queued mailbox messages - #1498

Draft
sentry-junior[bot] wants to merge 1 commit into
mainfrom
feat/cancel-pending-mailbox
Draft

feat(dashboard): Cancel queued mailbox messages#1498
sentry-junior[bot] wants to merge 1 commit into
mainfrom
feat/cancel-pending-mailbox

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Participants can cancel queued dashboard/Slack mailbox messages before the worker runs them.

The pending mailbox stack now has a Cancel queue control. It clears accepted human-facing pendingMessages only. Internal mailbox work stays in place. The active turn is not stopped.

Changes

  • Mailbox mutation: cancelHumanFacingPendingMessages removes web/slack pending rows under the conversation lock
  • API: DELETE /api/conversations/:id/pending-messages (participant-only)
  • Dashboard: cancel button + optimistic pending-message clear
  • Integration coverage for success, 403, internal-row keep, and 404

Notes

  • Cancel drops queued follow-ups only. It does not abort an in-flight run.
  • Cancelled inbound ids stay in inboundMessageIds so the same idempotency key cannot re-queue.
  • Optional body filter: { inboundMessageIds?: string[] } (UI cancels the full human-facing queue)

Test plan

  • pnpm --filter @sentry/junior exec vitest run tests/integration/api/conversations/cancel-pending-messages.test.ts
  • tsc --noEmit for @sentry/junior and @sentry/junior-dashboard
  • Manual: queue 2+ messages while a turn is active, click Cancel queue, confirm stack clears and messages never run
  • Manual: non-participant cannot cancel

Requested by PDPM.

--

View Junior Session in Sentry

Add a participant-only pending-messages cancel API and a Cancel queue control in the dashboard mailbox stack so deferred follow-ups can be dropped before the worker runs them.

Co-Authored-By: PDPM <pierre.massat@sentry.io>
@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview Aug 12, 2026 11:54pm

Request Review

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.

0 participants