fix: less than 6 items on explore predictions cp-7.80.0#30949
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. |
….com:MetaMask/metamask-mobile into fix/less-than-6-items-on-explore-predictions
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.
Reviewed by Cursor Bugbot for commit 3405810. Configure here.
| query, | ||
| refresh, | ||
| enabled = true, | ||
| pageSize = 6, |
There was a problem hiding this comment.
Home carousel shows twenty items
Medium Severity
Removing pageSize from usePredictionsFeed drops the previous default of six and lets usePredictMarketData fetch twenty markets. Explore uses PredictionsCarouselSection with slice(0, 6), but Predict home’s featured carousel still passes full predictions.data to HorizontalCarousel, so it can show up to twenty cards instead of six.
Reviewed by Cursor Bugbot for commit 3405810. Configure here.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
This is a refactoring of how prediction market data is paginated - moving from API-level page size control to client-side slicing for the carousel display. The search path no longer requests a larger page size (20) from the API. Tag selection rationale:
No other tags are needed - no confirmations flow changes, no controller changes, no navigation changes, no account/network changes. Performance Test Selection: |


Description
Seems like client side filtering on prediction markets was added with these 2 PRs:
This has caused Explore sections showing less than 6 items in multiple cases. Why? Because we fetch 6 items and there is a high chance at least one of them gets filtered out. To overcome this, we have updated the request to use the default of 20 items instead of 6
Changelog
CHANGELOG entry: fix less than 6 items on explore predictions cp-7.80.0
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-3308
Manual testing steps
Screenshots/Recordings
Before
After
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
UI-only feed sizing and display cap in Explore predictions; no auth, payments, or security paths.
Overview
Explore predictions carousels were showing fewer than six cards because feeds only requested six markets while client-side filtering dropped some results.
usePredictionsFeed,useWorldCupPredictionsFeed, anduseExploreSearchno longer pass a six-itempageSize, so underlying predict hooks use their default (20) and return a larger pool after filtering.PredictionsCarouselSectionstill shows at most six items by passingfeed.data.slice(0, 6)into the horizontal carousel. Tests were updated to stop expectingpageSize: 20on explore search.Reviewed by Cursor Bugbot for commit 36b7741. Bugbot is set up for automated code reviews on this repo. Configure here.