feat(predict): display outcomes in the outcomes tab with buy flow and sticky headers#28933
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. |
|
Good quality PR with strong test coverage (91.5% on new code per SonarCloud). The architecture is clean with proper memo'd sub-components, well-structured hooks, and thorough i18n. A few issues to address below. HIGH Severity (Should fix before merge)1.
|
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Tag selection rationale:
The changes are self-contained within the Predict feature area with no impact on shared navigation, controllers, Engine, or other wallet features. Performance Test Selection: |
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 9083f8e. Configure here.
| activePositions={activePositions} | ||
| claimablePositions={claimablePositions} | ||
| /> | ||
| <Box style={{ minHeight: windowHeight - stickyHeaderY }}> |
There was a problem hiding this comment.
minHeight formula prevents sticky header from activating
Medium Severity
minHeight: windowHeight - stickyHeaderY subtracts the y-position of the sticky header (height of scoreboard + chart above it), producing a content area that's too short for the sticky header to ever activate. For example, with windowHeight=800 and stickyHeaderY=300, the total ScrollView content becomes ~880px, allowing only ~80px of scroll — far less than the 300px needed for the header to reach the top and stick. The formula likely needs to use windowHeight alone (or subtract the sticky header's own height, not its y-position) to guarantee enough scrollable area.
Reviewed by Cursor Bugbot for commit 9083f8e. Configure here.
| str | ||
| .split('_') | ||
| .map((word) => word.charAt(0).toUpperCase() + word.slice(1)) | ||
| .join(' '); |
There was a problem hiding this comment.
Duplicated toTitleCase logic across two files
Low Severity
The toTitleCase helper in PredictGameOutcomesTab.tsx is identical to the inline title-casing fallback in outcomeGroupLabel.ts — both split on underscores, capitalize each word, and join with spaces. Extracting a shared utility would reduce duplication and ensure consistent behavior if the logic ever changes.
Reviewed by Cursor Bugbot for commit 9083f8e. Configure here.
|
|
✅ E2E Fixture Validation — Schema is up to date |
MarioAslau
left a comment
There was a problem hiding this comment.
Thank you for addressing the comments. LGTM !





Description
Sports game detail screens had a mock outcomes tab with empty cards. This PR replaces the mocks with real
outcomeGroupsdata, renders functional outcome cards grouped by market type, wires buy flow navigation, and adds a sticky tab bar + chip list header.Provider layer:
lineandshortTitlefields to outcome types so buttons show compact labels (team abbreviations,O/U+ line) while the buy screen preserves full namesYes/No→Over/UnderUI layer:
PredictGameOutcomesTabcomponent renders outcome cards from real data: composite groups show one card per subgroup (with line selector for multi-line markets), standalone groups show one card per outcomeusePredictActionGuard+usePredictNavigationScrollViewchilduseGameDetailsTabshookChangelog
CHANGELOG entry: null
Related issues
Fixes: PRED-810
PRED-811
Manual testing steps
Screenshots/Recordings
Before
N/A
After
Screen.Recording.2026-04-16.at.16.37.42.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
Note
Medium Risk
Touches both UI navigation (buy flow) and provider parsing/types for outcome/token data, so regressions could impact what markets render and which outcome/token gets passed into purchase.
Overview
Replaces the mock sports market Outcomes tab with real
outcomeGroupsrendering via newPredictGameOutcomesTab, including subgroup cards (with optional line selection), volume subtitles, moneyline team-color buttons, and buy buttons that trigger guardednavigateToBuyPreview.Updates game details to show a combined sticky header (tab bar + chip list), moves chip state/visibility into
useGameDetailsTabs, and adds chip auto-scroll behavior (calculateChipScrollX) plus chip-selection scroll-to-top logic for the outcomes list.Extends the Polymarket parsing/types to support
PredictOutcome.lineandPredictOutcomeToken.shortTitle, maps O/UYes/Notitles toOver/Under, adjusts outcome sorting tiebreakers, and standardizes outcome-group keys to underscore format; adds/updates unit tests and English i18n entries for group and market-type labels.Reviewed by Cursor Bugbot for commit 9083f8e. Bugbot is set up for automated code reviews on this repo. Configure here.