fix(perps): remove loading delay from tutorial screen#20918
Merged
Conversation
Contributor
|
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. |
7 tasks
gambinish
previously approved these changes
Oct 9, 2025
aba5e36 to
0c579b7
Compare
jbblanc
approved these changes
Oct 9, 2025
tommasini
approved these changes
Oct 9, 2025
nickewansmith
approved these changes
Oct 9, 2025
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description
Perps tutorial was taking >5 seconds to load due to being wrapped in
PerpsConnectionProvider, which blocks rendering until WebSocket connection completes.Solution: Moved Tutorial to app-level navigation (outside provider) while keeping all connected screens inside. Connection now initializes in background during tutorial, eliminating the loading delay.
Changelog
CHANGELOG entry: Fixed Perps tutorial taking over 5 seconds to load
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/TAT-1840
Manual testing steps
Screenshots/Recordings
Before
After
Screen.Recording.2025-10-08.at.1.28.05.PM.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Technical Details
Files changed:
MainNavigator.js: Added Tutorial as sibling to PERPS.ROOTroutes/index.tsx: Removed Tutorial from PerpsScreenStackPerpsTutorialCarousel.tsx: Added background connection initializationhandlePerpsUrl.ts,WalletActions.tsx,TradeWalletActions.tsx,PerpsGTMModal.tsx,WaysToEarn.tsx,PerpsTabView.tsxNavigation patterns:
navigate(Routes.PERPS.TUTORIAL)(app level)navigate(Routes.PERPS.ROOT, { screen: Routes.PERPS.MARKETS })(inside provider)Note
Moves Perps tutorial to app-level navigation and initializes the perps connection in the background; updates all navigation calls and related tests.
Routes.PERPS.TUTORIALout ofPerpsScreenStackintoMainNavigatorand remove it fromUI/Perps/routes.Routes.PERPS.TUTORIAL(first-time users) and keep nestedRoutes.PERPS.ROOTfor markets/others:PerpsTabView,WalletActions,TradeWalletActions,Rewards/WaysToEarn,PerpsGTMModal,handlePerpsUrl.PerpsTutorialCarousel: start background connection viaPerpsConnectionManager.connect()with debug logging; minor view cleanup.PerpsTutorialCarouselfromUI/Perps/indexfor app-level use.navigate(Routes.PERPS.TUTORIAL)across updated specs (PerpsTabView, GTM modal, Rewards WaysToEarn, WalletActions, deeplink handler).Written by Cursor Bugbot for commit 6aade3b. This will update automatically on new commits. Configure here.