fix(predict): prevent buy/sell sheet from being cropped in HomepageDiscoveryTabs cp-7.78.0#30219
fix(predict): prevent buy/sell sheet from being cropped in HomepageDiscoveryTabs cp-7.78.0#30219vinnyhoward wants to merge 3 commits into
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. |
| */ | ||
| const clearErrorTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null); | ||
| const dismissedWithErrorRef = useRef(false); | ||
|
|
There was a problem hiding this comment.
Navigate via ROOT so the screen resolves correctly
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 4585d39. Configure here.
…mcu-752-predict-sheet-homepage-discovery-tabs
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Tag selection rationale:
No other tags are impacted - changes are isolated to Predictions UI/navigation logic with no effects on accounts, networks, swaps, browser, snaps, or other features. Performance Test Selection: |
|




Description
When
PredictFeedis rendered insideHomepageDiscoveryTabs(behind thecoreMCU589AbtestHubPageDiscoveryTabsA/B test), thePredictPreviewSheetProviderbottom sheet is cropped by the tab layout and unusable.Changes:
disableBottomSheetprop toPredictPreviewSheetProvider— when true,openBuySheet/openSellSheetnavigate to the full-screen bet slip instead of opening the sheetisPredictSheetProviderMountedto returnfalsein navigate mode, preventing silent order failures (toast was suppressed but sheet never reopened)beforeRemovelistener toPredictBuyPreviewfor swipe/hardware-back dismiss tracking in screen mode — previously only back-button dismissals were tracked on the non-AnyToken pathChangelog
CHANGELOG entry:null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/TMCU-752
Manual testing steps
Screenshots/Recordings
fixed.mov
Before
broken.mov
After
fixed.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
Changes Predict bet slip presentation and navigation (sheet vs full-screen) plus dismissal/toast tracking logic, which could affect order-failure UX and analytics in core Predict flows.
Overview
Prevents the Predict buy/sell bottom sheet from being unusable inside
HomepageDiscoveryTabsby adding adisableBottomSheetmode toPredictPreviewSheetProviderthat always navigates to the full-screen buy/sell previews.Updates
isPredictSheetProviderMounted()to only report mounted when the provider is actually in sheet mode (avoiding suppression of legacy failure toasts when navigating instead), and adjusts navigation calls to use nestedRoutes.PREDICT.ROOT+screenparams.Adds screen-mode betslip dismissal analytics by registering a
beforeRemovelistener inPredictBuyPreviewto classify swipe vs back-button dismissals, with accompanying test coverage and wiringHomepageDiscoveryTabsto passdisableBottomSheetfor the Predictions tab.Reviewed by Cursor Bugbot for commit 3ee59d2. Bugbot is set up for automated code reviews on this repo. Configure here.