fix(social-ai): make back from notification-driven trader position behave naturally#30052
fix(social-ai): make back from notification-driven trader position behave naturally#30052xavier-brochard 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. |
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 d10b246. Configure here.
dd5a494 to
5d47160
Compare
…have naturally When a TraderPositionView was opened from a notification, pressing back used to slide TraderProfileView in from the right (a forward animation), because handleBack fell back to navigation.replace. Replace that fallback with a plain navigation.goBack() and stop trying to synthesize a Profile underneath in the deeplink handler. Back now returns to wherever the user was before opening the position: - cold-start push: Wallet Home - in-app notification panel tap: Notifications panel - in-app row tap from Profile: Profile (unchanged) The trader's name in the position header remains the affordance for navigating onward to the trader's Profile. Also: assign the two social deeplink handlers to @MetaMask/social-ai in CODEOWNERS. Co-authored-by: Cursor <cursoragent@cursor.com>
5d47160 to
6abfeee
Compare
Pull request was converted to draft
…cialTraderPositionUrl This commit reorganizes the import statements in `handleSocialTraderPositionUrl.ts` for better clarity and consistency. It also removes outdated comments regarding navigation behavior, streamlining the code for future maintenance.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
The Social Leaderboard (TraderPositionView, TraderProfileView) is part of the Trending/discovery feature set. No dedicated E2E smoke tests exist for Social Leaderboard specifically. The closest applicable tag is SmokeWalletPlatform, which covers the Trending tab and its subsections (including navigation integration). The changes are low-risk as they only affect back navigation behavior within a feature-specific screen, with no impact on shared components, core infrastructure, or other user flows. Performance Test Selection: |
|




Description
Watch this =======> https://www.loom.com/share/c981e1ec4ca245b48d68759e5fbfe34e
When a user opened
TraderPositionViewfrom a notification (in-app or push), pressing back used to slideTraderProfileViewin from the right — reading as a forward navigation. The cause washandleBackfalling back tonavigation.replace(PROFILE)when the deeplink stack didn't already contain a Profile underneath.This PR removes that fallback and the assumption that "back from a notification-driven position should land on Profile". Back now does the natural and conventional thing —
navigation.goBack()— and returns the user to wherever they were before opening the position:The trader's name in the position header will receive a link on a follow up PR to ensure navigation from position > profile is available in every case.
handleSocialTraderPositionUrlis correspondingly simplified back to a singlenavigate(POSITION)call (noWalletHome/Profilepre-population).Also: assign the two social deeplink handlers (
handleSocialLeaderboardUrl.ts,handleSocialTraderPositionUrl.ts) to@MetaMask/social-aiin.github/CODEOWNERS.Changelog
CHANGELOG entry: Fixed a confusing forward-style animation when pressing back from a trader position opened via a notification.
Related issues
Refs: notification-driven deeplink UX
Manual testing steps
You can simulate the deeplink on the iOS simulator with
xcrun simctl openurl(substitute realpositionId/traderId):Screenshots/Recordings
Before
N/A
After
https://www.loom.com/share/c981e1ec4ca245b48d68759e5fbfe34e
Pre-merge author checklist
Performance checks (if applicable)
Pre-merge reviewer checklist
Note
Medium Risk
Adjusts navigation behavior for
TraderPositionViewand social deeplinks, which can affect user flow and back-stack correctness across cold-start and in-app notification entry points.Overview
Pressing back from
TraderPositionViewnow always usesnavigation.goBack()(removing the prior deeplink-specificreplace(PROFILE)fallback) to avoid a forward-style transition and return users to their actual prior screen.Social deeplink handling for trader positions is simplified to a single
navigate(POSITION)flow (tests updated to match), and.github/CODEOWNERSassigns the legacy social deeplink handlers to@MetaMask/social-ai.Reviewed by Cursor Bugbot for commit 26d7ab3. Bugbot is set up for automated code reviews on this repo. Configure here.