Skip to content

feat(settings): add highlightsFirstEnabled flag, forward to feed#3865

Merged
pnvasanth merged 1 commit into
mainfrom
feat/highlights-first-setting
May 11, 2026
Merged

feat(settings): add highlightsFirstEnabled flag, forward to feed#3865
pnvasanth merged 1 commit into
mainfrom
feat/highlights-first-setting

Conversation

@pnvasanth
Copy link
Copy Markdown
Contributor

Summary

  • Adds a new user-level Settings flag highlightsFirstEnabled (stored in the existing Settings.flags JSONB column — no migration needed).
  • Exposes it on SettingsFlagsPublic GQL type and SettingsFlagsPublicInput input so the apps can read/write it through the existing updateUserSettings mutation.
  • FeedPreferencesConfigGenerator.generate() now loads the user's Settings alongside the existing User lookup and forwards highlights_first: true to 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_first to pin the highlight to index 0 on the first page.

Test plan

  • pnpm run lint clean
  • npx tsc --noEmit — no new type errors introduced (pre-existing telemetry/workers errors untouched)
  • New test: FeedPreferencesConfigGenerator sets highlights_first when the user has the flag enabled, omits it otherwise
  • New test: updateUserSettings mutation persists highlightsFirstEnabled to Settings.flags and reads it back
  • Existing settings-flags assertions + snapshot updated to include the new field
  • CI runs full Jest suite (Postgres + Redis required, not run locally)

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.
@pnvasanth pnvasanth self-assigned this May 11, 2026
@pulumi
Copy link
Copy Markdown

pulumi Bot commented May 11, 2026

🍹 The Update (preview) for dailydotdev/api/prod (at a92045a) was successful.

✨ Neo Explanation

Routine 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 highlightsFirstEnabled user setting feature. The new setting allows users to opt-in to having feed highlights shown first, surfaced via FeedPreferencesConfigGenerator which now fetches the Settings entity and passes highlights_first: true to the feed config when enabled.

All deployment and cron job updates are solely container image tag bumps (4b9d08fa22cc12d3). The migration Jobs (both DB and Clickhouse) are being cycled to the new commit hash — this is the standard pattern for running schema/data migrations on deploy. The highlightsFirstEnabled field is additive to the existing SettingsFlags JSON column, so no destructive schema change is expected.

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

@pnvasanth pnvasanth requested a review from capJavert May 11, 2026 11:03
@pnvasanth pnvasanth merged commit ef121b2 into main May 11, 2026
10 checks passed
@pnvasanth pnvasanth deleted the feat/highlights-first-setting branch May 11, 2026 11:23
@capJavert
Copy link
Copy Markdown
Contributor

Seeing this late. all good 🚀

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.

2 participants