feat(predict): add remote feed banner - #33478
Conversation
|
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. |
🧪 Flaky unit test detectionRun history flaky detectionHistorical failure rate is a hint, not proof — review each suggestion in context. See the flaky-test-detection skill for the full pattern reference and manual audit workflow. Failures / runs sampled per window:
AI-detected flaky patterns
|
⚡ Performance Test Results
✅ All tests passed · 3 tests · 1 device 📱 Devices tested (1)Android: Google Pixel 8 Pro (v14.0) ✅ Passed Tests (3)
Branch: |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Key changes:
Tag selection rationale:
The feature flag is disabled by default so the banner won't render in normal test conditions, but the structural changes to PredictFeed and PredictHome warrant validation to ensure no regressions in the existing Predict UI layout. Performance Test Selection: |
|



Description
Predict currently has no targeted, remotely managed way to display operational or promotional messages inside its feed. This adds a version-gated
predictFeedBannerJSON flag that can publish, update, move, or remove one active message without an app release.The remote payload controls a stable message ID, title, description, MMDS severity, optional dismissal, and a named insertion position. Named slots cover both the current
PredictFeedheader and the redesignedPredictHomesections. Dismissals are persisted under the message ID, so updated content can be shown again by publishing a new ID.The banner uses MMDS
BannerAlertfor semantic light/dark styling. The existing World Cup banner remains mounted in its current position and retains its existing visibility, analytics, and navigation behavior.Example payload:
{ "enabled": true, "minimumVersion": "8.5.0", "id": "predict-maintenance-2026-07-20", "title": "Scheduled maintenance", "description": "Predict will be temporarily unavailable at 18:00 UTC.", "position": "after-world-cup-banner", "severity": "warning", "dismissible": true }Supported positions:
after-balance,after-featured-carousel,after-world-cup-banner,before-portfolio,after-portfolio,after-live-now,after-categories,after-popular-today, andafter-trending.Supported severities:
neutral,info,success,warning, anddanger.Changelog
CHANGELOG entry: Added remotely configurable messages to the Predict feed
Related issues
Refs: PRED-850
Manual testing steps
Automated coverage:
yarn jest app/components/UI/Predict/schemas/flags.test.ts app/components/UI/Predict/selectors/featureFlags/index.test.ts app/components/UI/Predict/components/PredictFeedBanner/PredictFeedBanner.test.tsx app/components/UI/Predict/views/PredictFeed/PredictFeed.test.tsx app/components/UI/Predict/components/PredictWorldCupMainFeedBanner/PredictWorldCupMainFeedBanner.test.tsx tests/feature-flags/feature-flag-registry.test.ts --runInBand --coverage=falseyarn jest -c jest.config.view.js app/components/UI/Predict/views/PredictHome/PredictHome.view.test.tsx --runInBand --silent --coverage=falseyarn lint:tscDevice-matrix testing remains pending while this PR is in draft.
Screenshots/Recordings
Before
N/A - Predict has no existing remote feed message module.
After
LaunchDarkly check on local dev env + remote launchdarkly:
Test render of all variants:
Compared to Figma designs:
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Low Risk
User-facing messaging only, with strict remote parsing and fallbacks to disabled defaults; reuses existing banner dismissal state with no auth or payment changes.
Overview
Introduces remotely configurable operational messages in Predict via a new
predictFeedBannerfeature flag (registered with safe disabled defaults). Remote JSON drives message id, title, description, severity, dismissible behavior, minimumVersion gating, and a single placement among named feed positions.A new
PredictFeedBannercomponent reads validated config fromselectPredictFeedBannerConfig, renders MMDSBannerAlertonly when enabled and the slotpositionmatches, and optionally persists dismissals through the existingdismissBannerflow keyed bypredict-feed-banner:{id}so a new message id can show again after an old one was closed.PredictFeedmounts banner slots after balance, featured carousel, and World Cup banner;PredictHomemounts slots around portfolio and each major section. Schema validation, selector fallbacks, component tests, feed/home integration tests, and view tests cover flag parsing and rendering behavior.Reviewed by Cursor Bugbot for commit 4a42832. Bugbot is set up for automated code reviews on this repo. Configure here.