Skip to content

feat(email-list): add bulk Not-Spam action to selection toolbar in junk#637

Open
shukiv wants to merge 1 commit into
bulwarkmail:mainfrom
shukiv:feat/bulk-not-spam-toolbar
Open

feat(email-list): add bulk Not-Spam action to selection toolbar in junk#637
shukiv wants to merge 1 commit into
bulwarkmail:mainfrom
shukiv:feat/bulk-not-spam-toolbar

Conversation

@shukiv

@shukiv shukiv commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

What

Adds a Not spam button to the bulk-selection toolbar, shown only when viewing a junk folder — alongside the existing mark-read / mark-unread / delete actions. Selecting spam messages and clicking it un-junks them in one shot, instead of having to open the context menu.

Why

The batch un-spam action already exists (onBatchUndoSpam in the context menu); this just surfaces it as a first-class toolbar icon where it's most useful. Matches the discoverability of the other bulk actions.

Implementation

  • New handleBatchUndoSpam handler in email-list.tsx, reusing the existing batchUndoSpam store action and the same success/error toasts as the context-menu path.
  • Junk-only toolbar button (ShieldCheck icon), gated on effectiveMailboxRole === 'junk' (works for the aggregate "All Junk" view too).
  • Reuses the existing context_menu.not_spam label — no new i18n keys (already translated in all locales).

Testing

  • In Junk: select messages → Not spam appears → click → messages leave Junk, success toast
  • In Inbox/other folders: button not shown
  • tsc clean; lint clean (no new warnings)

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.

1 participant