Skip to content

feat(feed-settings): add pin highlights to top toggle#6024

Merged
pnvasanth merged 2 commits into
mainfrom
feat/highlights-first-toggle
May 11, 2026
Merged

feat(feed-settings): add pin highlights to top toggle#6024
pnvasanth merged 2 commits into
mainfrom
feat/highlights-first-toggle

Conversation

@pnvasanth
Copy link
Copy Markdown
Contributor

@pnvasanth pnvasanth commented May 11, 2026

Summary

  • Adds a new "Pin highlights to top" Switch in the Feed Settings General tab.
  • The toggle reads/writes a new user-level Settings flag highlightsFirstEnabled via the existing updateUserSettings mutation (same plumbing as clickbaitShieldEnabled).
  • When enabled, the API forwards highlights_first to the feed service so the highlight placeholder is pinned to the first position on the first page; otherwise it stays at its current random index within the first half.

Final repo of a 3-PR change:

Test plan

  • pnpm --filter @dailydotdev/shared lint on my touched files — clean (graphql/settings.ts, FeedSettingsGeneralSection.tsx, lib/log.ts, lib/labels.ts)
  • pnpm --filter @dailydotdev/shared typecheck on my touched files — clean (pre-existing TS debt in unrelated files)
  • Manual: open Feed Settings → General → toggle on → reload feed → highlight pinned to index 0 (once API PR is deployed)
  • Manual: toggle off → reload → highlight back at random first-half index
  • Manual: confirm toast + log event fire on toggle

Notes

  • Toggle is not Plus-gated; it's a behavior preference, not an AI feature.
  • Setting is global across all of the user's feeds (matches the existing pattern for clickbaitShieldEnabled).

Preview domain

https://feat-highlights-first-toggle.preview.app.daily.dev

Adds a Switch in the Feed Settings General tab that flips the new
highlightsFirstEnabled Settings flag. When on, the API forwards
highlights_first to the feed service so the highlight is pinned to
the first position; otherwise it stays at its current random spot
within the first half.
@pnvasanth pnvasanth self-assigned this May 11, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented May 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
daily-webapp Ready Ready Preview May 11, 2026 11:33am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
storybook Ignored Ignored May 11, 2026 11:33am

Request Review

The file was touched only to add the highlights-first Switch
subsection. Pre-existing strict violations (auth user / feed
optionality, Button prop mismatches, defaultFeedId null vs
undefined) live on unrelated lines and should be addressed in a
dedicated cleanup PR, matching the established pattern in the
skip list (e.g. marketing folder consolidation).
@pnvasanth pnvasanth merged commit ff48566 into main May 11, 2026
13 checks passed
@pnvasanth pnvasanth deleted the feat/highlights-first-toggle branch May 11, 2026 11:39
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.

1 participant