feat(predict): use PredictPositionDetail in picks for extended sports markets#28696
feat(predict): use PredictPositionDetail in picks for extended sports markets#28696
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. |
🔍 Smart E2E Test Selection⏭️ Smart E2E selection skipped - draft PR All E2E tests pre-selected. |
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 f8c9faa. Configure here.
app/components/UI/Predict/components/PredictGameDetailsContent/PredictGameDetailsContent.tsx
Show resolved
Hide resolved
|
✅ E2E Fixture Validation — Schema is up to date |
|




Description
The Predict Picks section (used in game details) currently renders
PredictPickItem— a simple row showing "Picked [outcome] at $X" with PnL. For sports markets with extended market types (spreads, totals, player props), we need the richerPredictPositionDetailcomponent that already exists on the regular market details screen, which includes icons, real-time preview values, percentage PnL, privacy mode support, and a full-width cash-out button.This PR conditionally renders
PredictPositionDetailinstead ofPredictPickIteminsidePredictPickswhen the market's league is in theextendedSportsMarketsLeaguesfeature flag — following the same flag pattern used byuseGameDetailsTabs. When the flag is disabled (or the market has no game/league), the existingPredictPickItemrendering is preserved.Also includes a minor cleanup: removes an unnecessary
useEffectinuseGameDetailsTabsthat was resettingactiveTabwhen tabs changed.Changelog
CHANGELOG entry: null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/PRED-803
Manual testing steps
Screenshots/Recordings
Before
tabsafter.mp4
After
positionsafter.mp4
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Changes conditional rendering for the Picks list and adjusts tab state behavior; also removes polling on active positions, which could affect UI freshness and user interaction flows in game details.
Overview
Game details picks rendering is upgraded for extended sports markets.
PredictPicksnow checksselectExtendedSportsMarketsLeaguesand, when the market’sgame.leagueis enabled, rendersPredictPositionDetail(including forcingCLOSEDstatus for claimable positions) instead ofPredictPickItem.Behavioral tweaks and coverage.
useGameDetailsTabsno longer resetsactiveTabwhen the tab set changes, tests were updated/added for the new picks rendering and tab behavior, andPredictGameDetailsContentstops polling active positions by removing therefetchIntervaloption.Reviewed by Cursor Bugbot for commit f8c9faa. Bugbot is set up for automated code reviews on this repo. Configure here.