feat(settings): add highlightsFirstEnabled flag, forward to feed#3865
Conversation
Adds a user-level Settings flag highlightsFirstEnabled that gets forwarded to the feed service as highlights_first when enabled, so the feed can pin the highlight placeholder to the first position instead of a random index within the first half.
|
🍹 The Update (preview) for dailydotdev/api/prod (at a92045a) was successful. ✨ Neo ExplanationRoutine deployment adding the `highlightsFirstEnabled` user preference flag, which controls `highlights_first` in feed config generation. All changes are image tag updates and migration job cycling — ✅ Low Risk.This is a routine application deployment rolling out the All deployment and cron job updates are solely container image tag bumps ( Resource Changes Name Type Operation
~ vpc-native-expire-super-agent-trial-cron kubernetes:batch/v1:CronJob update
~ vpc-native-worker-job-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-bg-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-personalized-digest-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-clean-channel-highlights-cron kubernetes:batch/v1:CronJob update
~ vpc-native-user-profile-analytics-history-clickhouse-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-views-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-current-streak-cron kubernetes:batch/v1:CronJob update
~ vpc-native-private-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-clean-expired-better-auth-sessions-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-zombie-opportunities-cron kubernetes:batch/v1:CronJob update
~ vpc-native-user-posts-analytics-refresh-cron kubernetes:batch/v1:CronJob update
~ vpc-native-calculate-top-readers-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-tag-materialized-views-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-trending-cron kubernetes:batch/v1:CronJob update
~ vpc-native-personalized-digest-cron kubernetes:batch/v1:CronJob update
~ vpc-native-user-profile-analytics-clickhouse-cron kubernetes:batch/v1:CronJob update
~ vpc-native-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-clean-stale-user-transactions-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-zombie-user-companies-cron kubernetes:batch/v1:CronJob update
~ vpc-native-generic-referral-reminder-cron kubernetes:batch/v1:CronJob update
~ vpc-native-rotate-daily-quests-cron kubernetes:batch/v1:CronJob update
+ vpc-native-api-clickhouse-migration-22cc12d3 kubernetes:batch/v1:Job create
~ vpc-native-rotate-weekly-quests-cron kubernetes:batch/v1:CronJob update
+ vpc-native-api-db-migration-22cc12d3 kubernetes:batch/v1:Job create
~ vpc-native-update-source-public-threshold-cron kubernetes:batch/v1:CronJob update
~ vpc-native-hourly-notification-cron kubernetes:batch/v1:CronJob update
~ vpc-native-materialize-yearly-best-post-archives-cron kubernetes:batch/v1:CronJob update
~ vpc-native-validate-active-users-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-tags-str-cron kubernetes:batch/v1:CronJob update
~ vpc-native-post-analytics-clickhouse-cron kubernetes:batch/v1:CronJob update
~ vpc-native-temporal-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-channel-digests-cron kubernetes:batch/v1:CronJob update
~ vpc-native-daily-digest-cron kubernetes:batch/v1:CronJob update
~ vpc-native-user-profile-updated-sync-cron kubernetes:batch/v1:CronJob update
~ vpc-native-check-analytics-report-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-gifted-plus-cron kubernetes:batch/v1:CronJob update
~ vpc-native-sync-subscription-with-cio-cron kubernetes:batch/v1:CronJob update
~ vpc-native-ws-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-update-achievement-rarity-cron kubernetes:batch/v1:CronJob update
- vpc-native-api-db-migration-4b9d08fa kubernetes:batch/v1:Job delete
... and 11 other changes |
|
Seeing this late. all good 🚀 |
Summary
highlightsFirstEnabled(stored in the existingSettings.flagsJSONB column — no migration needed).SettingsFlagsPublicGQL type andSettingsFlagsPublicInputinput so the apps can read/write it through the existingupdateUserSettingsmutation.FeedPreferencesConfigGenerator.generate()now loads the user'sSettingsalongside the existingUserlookup and forwardshighlights_first: trueto the feed service when the flag is on.This is the daily-api half of a 3-repo change. The daily-feed side (https://github.com/dailydotdev/daily-feed/pull/860) consumes
highlights_firstto pin the highlight to index 0 on the first page.Test plan
pnpm run lintcleannpx tsc --noEmit— no new type errors introduced (pre-existing telemetry/workers errors untouched)FeedPreferencesConfigGeneratorsetshighlights_firstwhen the user has the flag enabled, omits it otherwiseupdateUserSettingsmutation persistshighlightsFirstEnabledtoSettings.flagsand reads it back