feat(support): adopt support consent flow in SRPErrorScreen and SocialLoginErrorSheet - #33523
Conversation
Adds the support consent sheet, hook, util, route, and ownerless call sites (Compliance context, ReviewModal, ErrorBoundary, Homepage MoreSection) that team-owned PRs will stack on. Co-authored-by: Cursor <cursoragent@cursor.com>
Adds a real assertion inside the submit-feedback waitFor and restores spies after each test, per flaky-test-detection bot suggestions on PR #33424. Co-authored-by: Cursor <cursoragent@cursor.com>
The prior en.json checkout came from a stale branch and clobbered translation keys added to main since, breaking unrelated unit tests in CI. Re-applies only the support_consent strings on top of main's current en.json. Co-authored-by: Cursor <cursoragent@cursor.com>
…et prop for support contact This update modifies the ErrorBoundary component to eliminate the use of the useSupportConsent hook, which was causing issues when rendering at the root boundary outside of NavigationProvider. Instead, it now utilizes an openTicket prop to handle support contact actions. Additionally, the corresponding tests have been updated to reflect this change, ensuring that the new behavior is correctly validated. The support URL handling in the navigateToSupportConsent function has also been adjusted to open the raw base URL without appending device details, aligning with user consent preferences.
…ions Addresses Copilot review comments on PR #33424: OpenSupportUrl now allows Promise<void> to match async openers like Linking.openURL, and onConfirm/onReject await open() in a try/catch so a rejected opener can't surface as an unhandled promise rejection. Co-authored-by: Cursor <cursoragent@cursor.com>
…lLoginErrorSheet Co-authored-by: Cursor <cursoragent@cursor.com>
|
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. |
…onsent tests to call-site wiring only Mock useSupportConsent instead of re-simulating the consent sheet's navigation/onConfirm/onReject internals, since those mechanics are already exhaustively covered in the core support-consent PR. Co-authored-by: Cursor <cursoragent@cursor.com>
… with the consent sheet flow Co-authored-by: Cursor cursoragent@cursor.com
…t flow Lets call sites record their support opened analytics event when the user actually opens support (on consent confirm/reject), instead of when the consent sheet is merely shown. Co-authored-by: Cursor cursoragent@cursor.com
Add a comment to the single opener-invoke test in SRPErrorScreen and SocialLoginErrorSheet clarifying it covers the call site's Linking.openURL wiring, not consent-sheet internals (already covered by core PR #33424). Co-authored-by: Cursor <cursoragent@cursor.com>
…t-consent-web3auth
…opens Bugbot flagged that onOpenSupport fired synchronously on confirm/reject, before the async open() call resolved, so analytics could record "support opened" even when opening later failed. onOpenSupport is now threaded into confirmSupportConsent/rejectSupportConsent and fired only after open() succeeds. Co-authored-by: Cursor <cursoragent@cursor.com>
…ask/design-system-react-native components
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## MCWP-684-support-consent-core #33523 +/- ##
================================================================
Coverage ? 84.72%
================================================================
Files ? 6206
Lines ? 166577
Branches ? 40717
================================================================
Hits ? 141136
Misses ? 15815
Partials ? 9626 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🧪 Flaky unit test detection✅ All previously detected unit test flakiness issues in this PR have been fixed. This check is informational only and does not block merging. |
- SRPErrorScreen: replace fake-timer waitFor polling with synchronous assertions (J8) - SocialLoginErrorSheet: wrap async press in act() and use jest.mocked (J1) Co-authored-by: Cursor <cursoragent@cursor.com>
Wrap the Copy-button presses in SRPErrorScreen and the retry-tracking press in SocialLoginErrorSheet in await act(async ...) so the async state updates flush inside act, and assert with toBeOnTheScreen. Co-authored-by: Cursor <cursoragent@cursor.com>
Fixes J8: waitFor polls with real timers and conflicts with jest.useFakeTimers(). The act-wrapped Copy press already flushes the copied-state update, so assert directly instead of via waitFor. Co-authored-by: Cursor <cursoragent@cursor.com>
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Why these tags:
Risk assessment:
No performance tests needed: These are error screen UI changes with no impact on app launch, login, onboarding performance metrics, or any measured performance flows. Performance Test Selection: |
|



Description
This PR adopts the support-consent mechanism introduced in #33424 (base branch
MCWP-684-support-consent-core) in the "Contact support" flows ofSRPErrorScreenandSocialLoginErrorSheet. Instead of opening the MetaMask support URL directly, both flows now route through the support consent sheet first, and only open the support URL after the user confirms (or rejects and falls back to the plain URL).This PR is part of a stacked series on top of #33424. Its base will be retargeted to
mainonce the core PR merges.Changelog
CHANGELOG entry: null
(Behavior already described in the core PR, #33424.)
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/MCWP-684
Manual testing steps
Screenshots/Recordings
N/A — logic-only change, no UI beyond the already-reviewed
SupportConsentSheetfrom the core PR.Before
N/A
After
N/A
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an examplePre-merge reviewer checklist
Note
Low Risk
Onboarding error UX only; behavior change is gating support behind an existing consent flow with no auth or data-handling changes.
Overview
Contact support on the SRP and social-login wallet creation error UIs no longer opens the support URL immediately. Both screens now call
openSupportWithConsentfromuseSupportConsent, passing a callback that usesLinking.openURLand the existingAppConstants.REVIEW_PROMPT.SUPPORTbase URL so the shared consent sheet runs first (per the core support-consent work).Tests were updated to mock
useSupportConsent, assertopenSupportWithConsentis invoked with the opener and support URL, and add a small test that invoking the passed opener still callsLinking.openURL. Copy/retry-related tests were tightened withactandtoBeOnTheScreeninstead ofwaitForwhere appropriate.Reviewed by Cursor Bugbot for commit a959038. Bugbot is set up for automated code reviews on this repo. Configure here.