chore: remove Happening Now notifications#3902
Conversation
Drop the MajorHeadlineAdded notification worker, type, schema, OneSignal mapping, and dismiss-banner UserAction. Highlights display (majorHeadlines query) is unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The Megaphone NotificationIcon was only used by the removed MajorHeadlineAdded builder. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
🍹 The Update (preview) for dailydotdev/api/prod (at 01b1945) was successful. ✨ Neo ExplanationThis is a routine feature removal of the "major headline added" notification system, including its Pub/Sub subscription, worker, and all supporting code. ✅ Low Risk — no stateful data loss beyond the expected deletion of the Pub/Sub subscription and orphaned user notification flag data.This PR removes the 🔵 Info — The GCP Pub/Sub subscription The Resource Changes Name Type Operation
~ vpc-native-update-achievement-rarity-cron kubernetes:batch/v1:CronJob update
- vpc-native-api-db-migration-36e15097 kubernetes:batch/v1:Job delete
~ vpc-native-clean-expired-better-auth-sessions-cron kubernetes:batch/v1:CronJob update
~ vpc-native-rotate-daily-quests-cron kubernetes:batch/v1:CronJob update
~ vpc-native-materialize-monthly-best-post-archives-cron kubernetes:batch/v1:CronJob update
~ vpc-native-user-posts-analytics-refresh-cron kubernetes:batch/v1:CronJob update
~ vpc-native-daily-digest-cron kubernetes:batch/v1:CronJob update
~ vpc-native-personalized-digest-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-clean-gifted-plus-cron kubernetes:batch/v1:CronJob update
~ vpc-native-expire-super-agent-trial-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-old-notifications-cron kubernetes:batch/v1:CronJob update
~ vpc-native-channel-highlights-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-zombie-images-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-zombie-user-companies-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-highlighted-views-cron kubernetes:batch/v1:CronJob update
~ vpc-native-private-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-update-tag-materialized-views-cron kubernetes:batch/v1:CronJob update
~ vpc-native-post-analytics-clickhouse-cron kubernetes:batch/v1:CronJob update
~ vpc-native-calculate-top-readers-cron kubernetes:batch/v1:CronJob update
~ vpc-native-rotate-weekly-quests-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-zombie-users-cron kubernetes:batch/v1:CronJob update
+ vpc-native-api-db-migration-ba83bb5f kubernetes:batch/v1:Job create
+ vpc-native-api-clickhouse-migration-ba83bb5f kubernetes:batch/v1:Job create
~ vpc-native-squad-posts-analytics-refresh-cron kubernetes:batch/v1:CronJob update
~ vpc-native-bg-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-user-profile-updated-sync-cron kubernetes:batch/v1:CronJob update
~ vpc-native-worker-job-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-channel-digests-cron kubernetes:batch/v1:CronJob update
~ vpc-native-hourly-notification-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-trending-cron kubernetes:batch/v1:CronJob update
~ vpc-native-materialize-yearly-best-post-archives-cron kubernetes:batch/v1:CronJob update
- vpc-native-api-clickhouse-migration-36e15097 kubernetes:batch/v1:Job delete
~ vpc-native-update-views-cron kubernetes:batch/v1:CronJob update
~ vpc-native-generic-referral-reminder-cron kubernetes:batch/v1:CronJob update
~ vpc-native-ws-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-personalized-digest-cron kubernetes:batch/v1:CronJob update
~ vpc-native-generate-search-invites-cron kubernetes:batch/v1:CronJob update
~ vpc-native-user-profile-analytics-clickhouse-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-current-streak-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-tags-str-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-zombie-opportunities-cron kubernetes:batch/v1:CronJob update
... and 13 other changes |
Summary
Removes the "Happening Now" (
MajorHeadlineAdded) notification end-to-end: the worker stops generating notifications when a post is highlighted as Breaking, and all server-side wiring is removed. The Highlights feature itself (themajorHeadlinesGraphQL query that feeds the/highlightspage) is intentionally kept — only notifications are removed.Changes
majorHeadlineAddedworker, its registration insrc/workers/notifications/index.ts, and the Pub/Sub subscription in.infra/common.ts.MajorHeadlineAddedvalue fromNotificationType, its default inDEFAULT_NOTIFICATION_SETTINGS, the entry innotificationFlagsSchema, the OneSignal "Happening now" heading, the email noop, theNotificationMajorHeadlineContexttype, and the title/builder innotifications/generate.ts.DismissedMajorHeadlinesAlertsBannervalue fromUserActionType(the apps banner that produced it is also being removed).getHighlightLinkhelper andNotificationIcon.Megaphoneenum value.Key decisions
PostHighlightedMessageand theapi.v1.post-highlightedtopic stay becausenewHighlightRealTimestill consumes them.user_actionwithdismissed_major_headlines_alerts_bannerand any leftovermajor_headline_addedkeys innotificationFlagsJSONB will simply be ignored — harmless and not worth a migration.Test plan
pnpm run build(fulltsc) cleaneslint --max-warnings 0on changed files clean__tests__/notifications.ts,__tests__/highlights.ts,__tests__/workers/notifications.ts,__tests__/workers/newNotificationV2{Mail,Push,RealTime}.ts— 234 passingCloses ENG-1568
Created by Huginn 🐦⬛