feat(rewards): update campaigns feature flag behavior on dashboard#27803
Conversation
- Remove campaigns feature flag conditional rendering from dashboard - Always show CampaignsPreview and EarnRewardsPreview components - Move feature flag logic to useRewardCampaigns hook - When campaigns disabled: show only upcoming campaigns or fallback to previous season - Add isInteractive prop to CampaignTile to prevent navigation to details when disabled - Add fetchUpcomingOrPreviousSeasonCampaigns method to RewardsController Made-with: Cursor
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
🔍 Smart E2E Test Selection⏭️ Smart E2E selection skipped - draft PR All E2E tests pre-selected. |
|
✅ E2E Fixture Validation — Schema is up to date |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| )} | ||
|
|
||
| {featuredCampaign && <CampaignTile campaign={featuredCampaign} />} | ||
| {featuredCampaign && ( |
There was a problem hiding this comment.
Error banner with retry is unreachable dead code
Medium Severity
The RewardsErrorBanner at line 107 is unreachable. showPreviousSeasonTile (line 57) evaluates to !isLoading && !featuredCampaign, which triggers an early return at line 59. The error banner requires the same !isLoading && !featuredCampaign condition, but that path already returned. The second return block only executes when isLoading || featuredCampaign, making the error banner condition always false. Users who hit a campaign fetch error with no cached data see a PreviousSeasonTile with no way to retry.
Additional Locations (1)
|





Description
Updates how the campaigns feature flag controls behavior on the Rewards Dashboard:
CampaignsPreviewandEarnRewardsPreviewcomponents regardless of feature flag stateuseRewardCampaignshook - when disabled:fetchUpcomingOrPreviousSeasonCampaignsmethod to RewardsController for the fallback logicKey Changes
Changelog
CHANGELOG entry: null
Related issues
N/A
Manual testing steps
Screenshots/Recordings
Pre-merge author checklist
Pre-merge reviewer checklist
Made with Cursor
Note
Medium Risk
Moderate UI/behavior change around the campaigns feature flag that alters what content is shown and which navigation paths are enabled; risk is mainly regressions in campaign visibility and tap behavior when the flag toggles.
Overview
Rewards dashboard now always renders
CampaignsPreviewandEarnRewardsPreview, removing the prior conditional/previous-season UI paths (including the referral header action).Campaign feature flag behavior is pushed down into campaigns components/hooks:
useRewardCampaignsalways fetches campaigns when subscribed but filters results to upcoming-only when the flag is off, whileCampaignTileaddsisInteractive/onPressto disable deep-link navigation and allow alternate navigation.CampaignsPreviewadds a no-campaigns fallback that showsPreviousSeasonTileand navigates toRoutes.PREVIOUS_SEASON_VIEW.Tests were updated accordingly across
RewardsDashboard,CampaignsPreview,CampaignTile,useRewardCampaigns, andRewardsControllerto reflect the new fetch/filtering and interactivity rules.Written by Cursor Bugbot for commit 9ca3bc0. This will update automatically on new commits. Configure here.