feat: update World Cup event count in PredictionsSection and related components#31465
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. |
PR template — items to address before "Ready for review"Warnings — informational, address before merging:
See docs/readme/ready-for-review.md for the full Definition of Ready for Review. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #31465 +/- ##
==========================================
+ Coverage 83.10% 83.12% +0.01%
==========================================
Files 5700 5709 +9
Lines 146961 147218 +257
Branches 34249 34323 +74
==========================================
+ Hits 122126 122368 +242
+ Misses 16593 16588 -5
- Partials 8242 8262 +20 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ 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 8854d8b. Configure here.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Tag selection rationale:
The changes are medium risk as they introduce a new network request and modify how event counts are displayed, but don't touch core infrastructure, navigation, or transaction flows directly. Performance Test Selection: |
⚡ Performance Test Results
✅ All tests passed · 3 tests · 1 device 📱 Devices tested (1)Android: Google Pixel 8 Pro (v14.0) ✅ Passed Tests (3)
Branch: |

Description
This PR updates the homepage Predictions World Cup discovery row so the “events in total” count comes from Polymarket’s lightweight pagination endpoint instead of the loaded World Cup market list.
The row now uses:
https://gamma-api.polymarket.com/events/pagination?tag_slug=fifa-world-cup&limit=1&active=true&closed=false&archived=falseand reads
pagination.totalResults.This prevents the UI from showing partial loaded counts like
19+or20+when the real total is much higher. The+suffix is preserved.Changelog
CHANGELOG entry: Fixed the World Cup events count shown in the homepage Predictions discovery row.
Related issues
Fixes:
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
Read-only UI and a lightweight external count API; no auth, payments, or data writes.
Overview
Fixes the homepage Predictions FIFA World Cup 2026 row so “events in total” reflects Polymarket’s full catalog instead of how many markets are already loaded.
A new
useHomepagePredictWorldCupEventCounthook calls Gamma/events/paginationwithlimit=1and the remote-configured World Cup tag, then surfacespagination.totalResultsvia React Query (with refetch on section pull-to-refresh).PredictionsSectionloads that count alongside existing World Cup/NBA discovery feeds and treats event-count fetching as part of discovery loading.HomepagePredictWorldCupDiscoverystops deriving the label frommarketData.length/hasMoreand always formats the API total with the overflow copy (e.g.48+ events in total).MensWorldCupRowhides the subtitle until a count is available so partial loaded counts are not shown while the pagination request is in flight.Hook and section tests cover the pagination URL, invalid/missing totals, disabled queries, and the new UI assertion.
Reviewed by Cursor Bugbot for commit 8a68d99. Bugbot is set up for automated code reviews on this repo. Configure here.