fix(predict): group new sport types on outcome tabs#31578
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. |
b82963f to
401268d
Compare
This reverts commit 5842dcf.
401268d to
10d396c
Compare
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
SmokePredictions: Directly affected - the Predict market details view, outcome cards, sports market grouping/filtering are all changed. This is the primary tag. The changes are isolated to the Predict feature and don't touch shared infrastructure, navigation, or other wallet flows. Performance Test Selection: |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #31578 +/- ##
==========================================
- Coverage 83.25% 83.25% -0.01%
==========================================
Files 5745 5748 +3
Lines 148745 148895 +150
Branches 34725 34772 +47
==========================================
+ Hits 123833 123957 +124
- Misses 16579 16582 +3
- Partials 8333 8356 +23 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
⚡ Performance Test Results
❌ 1 test failed · 3 tests · 1 device 📱 Devices tested (1)Android: Google Pixel 8 Pro (v14.0) ❌ Failed Tests (1)@team-predict
✅ Passed Tests (2)
Branch: |
Description
Predict sports game-detail screens had two related problems: newer Polymarket sports market types were grouped into the wrong tabs/cards, and the rendering logic for those cards lived in the screen component, which made behavior harder to extend and test.
Reason for the change
Before these changes:
Draw/Neitherwere not always positioned correctly.Solution
This branch moves tab/card shaping closer to the data model, gates grouping to detail-only code paths, and simplifies the UI rendering path.
Provider / grouping
constants/sports.ts(SPORTS_MARKET_TYPE_TO_GROUP,GROUP_ORDER, priorities, moneyline/player-prop helpers).getSportsMarketTypeGroupKeymaps market types to tabs, including player-prop tabs derived from*_player_*types (e.g.soccer_player_shots_on_target→Shots on Target).buildOutcomeGroupsnow builds a full tab → card hierarchy viagetOutcomeSubjectandbuildCardsForType:titleonPredictOutcomeGroupcarries provider-supplied card labels (e.g.Mexico Totals).SUPPORTED_SPORTS_MARKET_TYPESallowlist;filterSupportedSportsOutcomesdrops unsupported types from detail tabs (with one-time dev logging).includeOutcomeGroupsopt-in toparsePolymarketEventsso outcome groups are only built for market-detail and series-resolution calls, not feed/list/search/carousel parsing.UI
PredictGameDetailsOutcomesListowns scroll, pull-to-refresh, and sticky tab/chip headers.PredictGameOutcomeCardhandles simple, line-based, and moneyline-style cards.usePredictGameOutcomeRowsderives card models plus token ids for live pricing.PredictGameOutcomesTabis slimmed to map models → cards with a singleuseLiveMarketPricessubscription per active chip.Draw/Neither; line cards default to the highest-volume line;PredictBetButtonallows two-line labels.Labels / i18n
en.json,readableMarketLabel, and missing-i18n handling for newly supported types.soccer_first_to_score,soccer_second_half_result) and player-prop tab coverage (Goals, Assists, Shots, Goalscorers, Goals + Assists, Shots on Target, Saves).Tests
Changelog
CHANGELOG entry: null
Related issues
Fixes: PRED-957
Manual testing steps
Screenshots/Recordings
Before
Screen.Recording.2026-06-11.at.12.32.17.mov
After
Screen.Recording.2026-06-11.at.12.30.34.mov
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