Skip to content

fix(contests): show skeletons only until feature flag resolves#14314

Open
dylanjeffers wants to merge 1 commit into
mainfrom
fix/contests-page-skeleton-delay
Open

fix(contests): show skeletons only until feature flag resolves#14314
dylanjeffers wants to merge 1 commit into
mainfrom
fix/contests-page-skeleton-delay

Conversation

@dylanjeffers
Copy link
Copy Markdown
Contributor

Summary

  • Contests page disabled its useAllRemixContests query while useFeatureFlag(CONTESTS).isEnabled was still undefined during Optimizely's ~14s cold-load. Disabled queries report isPending: true, so the skeleton state stayed on screen indefinitely on first paint.
  • Fix: start the query optimistically before the flag resolves by gating enabled on !isFlagLoaded || isContestsPageEnabled. The existing <Navigate to='/' /> continues to redirect once the flag loads as false, so users without access still can't see contest data.

Test plan

  • Cold-load /contests with Optimizely throttled — verify contest cards render as soon as the API responds rather than waiting on the flag.
  • Toggle the CONTESTS flag off — verify the page still redirects to / after the flag resolves.
  • Flag on, no contests in response — verify empty state still renders correctly.

🤖 Generated with Claude Code

The contests page disabled its remix-contests query while
`useFeatureFlag(CONTESTS).isEnabled` was still `undefined`. Disabled
queries report `isPending: true`, so skeletons stayed on screen for the
full ~14s Optimizely cold-load. Start the query optimistically before
the flag resolves; the existing `<Navigate to='/' />` still handles the
flag-off case once it loads.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 14, 2026

⚠️ No Changeset found

Latest commit: 91aa45a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant