Skip to content

Stop emailing everyone on every plugin approval - #476

Merged
simonhamp merged 2 commits into
mainfrom
no-plugin-approval-emails
Aug 20, 2026
Merged

Stop emailing everyone on every plugin approval#476
simonhamp merged 2 commits into
mainfrom
no-plugin-approval-emails

Conversation

@simonhamp

@simonhamp simonhamp commented Aug 20, 2026

Copy link
Copy Markdown
Member

What

New plugin announcements are now in-app only — no email.

  • NewPluginAvailable::via() returns ['database'] instead of ['mail', 'database'].
  • Added a sortable Approved (approved_at) column to the admin Plugins table, next to Submitted.

Why

We were emailing the entire opted-in user base once per plugin, every time a plugin was approved. At the rate plugins are landing that's far too much mail for something that isn't urgent.

The notification itself is still useful, so it stays — it just arrives in the UI rather than the inbox.

Behaviour

Before After
Plugin author PluginApproved email unchanged
Opted-in users NewPluginAvailable email + in-app in-app only
Opted-out users nothing nothing

Plugin::approve() is unchanged — it still dispatches SendNewPluginNotifications on first approval, so the fan-out and its "skip the author" / "verified emails only" rules all still apply. The only difference is which channel the notification resolves to.

The "New plugin notifications" toggle in user settings still silences it completely, so the preference remains meaningful.

Sorting by approval date

The admin Plugins table gets a sortable Approved column (rows with no approval show -), so recently approved plugins are easy to pull up now that they aren't announcing themselves by email.

Two things reviewers should weigh in on

  1. NewPluginAvailable::toMail() is now unreachable. I left the method (and its three mail-content tests) in place rather than deleting it — restoring the email is a one-line change to via() if we decide this went too far. Happy to strip it if we'd rather not carry dead code.
  2. plugins:resend-new-plugin-notifications no longer sends email. That command exists to re-send NewPluginAvailable, so it now only re-adds in-app notifications — largely pointless in its current form. If we want to keep a manual "email people about a batch of new plugins" escape hatch, it needs its own notification class; it can't share this one any more.

Tests

  • test_via_returns_database_only_when_user_opted_in — updated assertion.
  • test_via_never_includes_the_mail_channel — new regression guard so the email can't quietly come back.
  • test_plugins_table_can_be_sorted_by_approved_at — covers the new column in both directions.
  • The dispatch, job, and resend-command tests are untouched and still pass, since those paths are unchanged.

Note the three existing toMail() tests still pass but now cover an unreachable method — they'd go along with the method if we strip it.

🤖 Generated with Claude Code

simonhamp and others added 2 commits August 20, 2026 15:27
Approving a plugin no longer dispatches SendNewPluginNotifications, so
users are no longer emailed about every single new plugin. The author
still receives their PluginApproved email, and the job plus the
plugins:resend-new-plugin-notifications command remain for sending a
deliberate batch.

Adds a sortable approved_at column to the admin Plugins table so
recently approved plugins are easy to find when composing that batch.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Switches the approach: instead of dropping the notification entirely on
approval, NewPluginAvailable now goes out on the database channel only.
Opted-in users still get the in-app notification for every new plugin;
nobody gets an email. The opt-out preference still silences it.

Restores the SendNewPluginNotifications dispatch in Plugin::approve(),
returning that method to its original behaviour.

Adds a regression test asserting the mail channel is never returned.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@simonhamp
simonhamp marked this pull request as ready for review August 20, 2026 14:36
@simonhamp
simonhamp merged commit e96c75c into main Aug 20, 2026
3 checks passed
@simonhamp
simonhamp deleted the no-plugin-approval-emails branch August 20, 2026 14:55
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