Stop emailing everyone on every plugin approval - #476
Merged
Conversation
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>
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.
What
New plugin announcements are now in-app only — no email.
NewPluginAvailable::via()returns['database']instead of['mail', 'database'].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
PluginApprovedemailNewPluginAvailableemail + in-appPlugin::approve()is unchanged — it still dispatchesSendNewPluginNotificationson 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
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 tovia()if we decide this went too far. Happy to strip it if we'd rather not carry dead code.plugins:resend-new-plugin-notificationsno longer sends email. That command exists to re-sendNewPluginAvailable, 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.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