Skip to content

[Cleanup] Remove live email frequency; fix broken email images#14288

Merged
dylanjeffers merged 3 commits into
mainfrom
claude/reverent-wescoff-de38f6
May 11, 2026
Merged

[Cleanup] Remove live email frequency; fix broken email images#14288
dylanjeffers merged 3 commits into
mainfrom
claude/reverent-wescoff-de38f6

Conversation

@dylanjeffers
Copy link
Copy Markdown
Contributor

Summary

Note: This PR is one of two. The companion changes live in the pedalboard repo (broadcastEmailAnnouncements rewrite, per-event live-email cleanup across all mappers, the broken-logo + missing-cover-art image fixes). They must merge together.

PART 1 — Remove the "live" email frequency option

  • Drop `EmailFrequency.Live` from `packages/common`
  • Remove the "Live" segmented-control option from the desktop notif modal, mobile settings page, and React Native EmailFrequencyControlRow
  • Identity-service `UserNotificationSettings` model: remove `'live'` from the enum, change `defaultValue` from `'live'` to `'daily'`
  • Add Sequelize migration `20260511000000-remove-live-emails.js` (inverse of `20200723161647-add-live-emails.js`): `UPDATE` existing `live` rows to `daily` on both `UserNotificationSettings` and `NotificationEmails`, flip PG column defaults back to `'daily'`. The PG enum value `'live'` is left orphaned (Postgres can't drop enum labels without root access; matches what the original migration did).

PART 2

In the pedalboard PR.

Test plan

  • Apply migration on staging and verify `UserNotificationSettings`/`NotificationEmails` defaults are `'daily'` and no row has `'live'` frequency
  • Web/Mobile/RN settings pages show only Daily / Weekly / Off; a user previously on `live` sees `Daily` selected after migration
  • Verify pedalboard companion PR is queued to merge alongside this one (otherwise announcement emails will fail to target the now-empty `live` audience)

🤖 Generated with Claude Code

dylanjeffers and others added 2 commits May 8, 2026 14:42
Instruments three key contest interactions following the existing
'Remix Contest:' event prefix and {remixContestId, trackId} property
shape used by the host/pick-winners events:

  - REMIX_CONTEST_VIEW: contest page/screen first resolves trackId+eventId
  - REMIX_CONTEST_ENTER: user taps Enter Contest / Upload Remix
  - REMIX_CONTEST_VIEW_SUBMISSIONS: user opens the submissions tab

Mobile submissions-tab firing uses useFocusedTab from
react-native-collapsible-tab-view because the contest tabs mount
eagerly (lazy: false) — a plain mount effect would fire even for
users who only view the Details tab.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Drop the 'live' option from the EmailFrequency enum and the three UI
surfaces (desktop notif modal, mobile settings page, RN row). Update
the identity-service UserNotificationSettings model: remove 'live' from
the enum and flip defaultValue 'live' -> 'daily'. Add an inverse
Sequelize migration that updates existing rows live -> daily on both
UserNotificationSettings and NotificationEmails and flips PG column
defaults back to 'daily'; the enum value itself is left orphaned since
Postgres can't drop enum labels without root access.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 11, 2026

⚠️ No Changeset found

Latest commit: 3687629

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

dylanjeffers added a commit to AudiusProject/pedalboard that referenced this pull request May 11, 2026
)

PART 1 — Remove "live" email frequency:
- broadcastEmailAnnouncements in announcement.ts now targets every
  deliverable, non-abusive user whose emailFrequency is set and not
  'off' (previously only frequency='live' users). New helper
  UserNotificationSettings#shouldSendEmail backs this.
- Strip dead per-event live-email blocks from ~25 mappers
  (sendNotificationEmail with frequency='live' was gated by the
  optimizely live-email plugin, which has been off in production).
- Remove isLiveEmailEnabled parameter from BaseNotification's
  processNotification signature and from every mapper's
  destructured args (including DM mappers that never used it).
- Remove getIsLiveEmailEnabled from AppNotificationsProcessor and
  stop passing isLiveEmailEnabled to processNotification calls
  (indexAppNotifications.ts, tasks/dmNotifications.ts).
- Drop EmailPluginMappings.Live (and its remote-config diagnostics
  block). The optimizely flag is no longer read.
- Clean up dead 'live'-frequency branches in
  email/notifications/index.ts (getUsersCanNotifyQuery's
  'orWhere live' fallback for daily, the 'live'-only message-id
  narrowing in getNotifications, and the frequency !== 'live'
  sendAt ternary in processGroupOfEmails).
- Update UserNotificationSettings#getUserEmailFrequency default
  from 'live' to 'daily'.

PART 2 — Fix broken email images:
- Body.tsx: replace the 403'd
  gallery.mailchimp.com/.../b1070e55-...png logo with the
  in-pattern download.audius.co/static-resources/email/
  grayLogoHorizontal.png asset. Refresh affected snapshots.
- renderEmail.ts: getTrackCoverArt and getPlaylistImage now fall
  back to getContentNode() (the stable CN gateway) when the
  owner's creator_node_endpoint is missing, instead of returning
  an empty string. Mirrors getUserProfileUrl, which already does
  this.

Companion to apps PR AudiusProject/apps#14288;
must merge together.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…Page

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

🌐 Web preview ready

Preview URL: https://audius-web-preview-pr-14288.audius.workers.dev

Unique preview for this PR (deployed from this branch).
Workflow run

@dylanjeffers dylanjeffers merged commit 76a89ec into main May 11, 2026
14 checks passed
@dylanjeffers dylanjeffers deleted the claude/reverent-wescoff-de38f6 branch May 11, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant