fix: don't fetch dailyHeadlines until onboarding is complete#6292
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
e328fd3 to
45234d1
Compare
The dailyHeadlines query seeds channel digest follows from the user's onboarding tags on the backend. When it fires mid-onboarding it can race the tag writes, resolve zero tags, and (before the api fix) mark the user as backfilled without any follows. Gate the fetch behind isOnboardingComplete so it only runs once onboarding is done.
45234d1 to
48c23be
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
dailyHeadlinesGraphQL query seeds channel digest follows from the user's onboarding tags on the backend (seedHeadlineChannelsForUser). We found a production user where the query fired ~0.5s before their onboarding tags were persisted, so the backend resolved zero tags and permanently marked them as backfilled with no follows.Fix
Gate the
dailyHeadlinesfetch inCoverTopicsbehindisOnboardingComplete(fromuseOnboardingActions), so the query doesn't fire mid-onboarding. While disabled, the existing skeleton placeholders render as before.CoverTopicsis the only place this query is fetched.Companion backend fix (stops marking users backfilled on an empty resolve, so affected users self-heal on the next call): dailydotdev/daily-api#3991
Preview domain
https://fix-gate-daily-headlines-on-onbo.preview.app.daily.dev