feat(subscriptions): scaffold ProHub screen with navigation registration [SUB-995] - #34848
feat(subscriptions): scaffold ProHub screen with navigation registration [SUB-995]#34848smgv wants to merge 1 commit into
Conversation
- Add ProHub screen (ProHub.tsx) — full-screen stack view with HeaderBase, back navigation, title/subtitle, Explore Benefits and Manage Subscription CTAs - Add ProHub.testIds.ts (8 IDs), ProHub.types.ts, and index.ts barrel - Add ProHub.test.tsx — 10 unit tests covering rendering, header, back button, and CTA labels - Register Routes.PRO_HUB.ROOT in Routes.ts and App.tsx NativeStack - Add pro_hub i18n strings (title, subtitle, manage, explore_benefits) to en.json - Bump ProSubscription success screen assertions to toBeOnTheScreen() 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. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Performance Test Selection: |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
❌ 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 66d00f0. Configure here.
| headerShown: false, | ||
| gestureEnabled: true, | ||
| }} | ||
| /> |
There was a problem hiding this comment.
ProHub inherits modal presentation
High Severity
ProHub is registered without overriding presentation or animation, so it inherits AppFlow’s transparentModal and animation: 'none'. That conflicts with the intended card push, swipe-back, and iOS safe-area insets (sibling full-screen routes explicitly set presentation: 'card').
Reviewed by Cursor Bugbot for commit 66d00f0. Configure here.
| navigation.navigate(Routes.PRO_HUB.ROOT, { | ||
| source: 'pro_subscription_success', | ||
| }); | ||
| }, [handleClose, navigation]); |
There was a problem hiding this comment.
Success CTA navigation can drop
Medium Severity
The success CTA calls goBack() and then immediately navigate to ProHub from the same modal screen. Native stack often drops a second action while a dismiss transition is running, so post-purchase navigation to ProHub can silently fail.
Reviewed by Cursor Bugbot for commit 66d00f0. Configure here.
| variant={ButtonVariant.Primary} | ||
| size={ButtonSize.Lg} | ||
| onPress={onClose} | ||
| onPress={onSuccess} |
There was a problem hiding this comment.
Success tests assert old CTA
Medium Severity
The success CTA now fires onSuccess, but Success.test.tsx still renders without that prop and expects onClose on press. Those tests fail, and onClose is unused on Success. The new hub navigation path is also untested.
Triggered by project rule: Unit Testing Guidelines
Reviewed by Cursor Bugbot for commit 66d00f0. Configure here.


Description
ProHubscreen (app/components/Views/ProHub/) — a full-screen stack view (not modal) that serves as the MetaMask Pro hub, navigable from anywhere in the app viaRoutes.PRO_HUB.ROOTRoutes.PRO_HUB.ROOTinRoutes.tsandApp.tsxas a standard push-stack screen withheaderShown: falseand gesture dismissal enabledpro_hubi18n strings (title,subtitle,manage,explore_benefits) toen.jsonJira: SUB-995
Changelog
CHANGELOG entry: null
Related issues
Fixes: SUB-990
Manual testing steps
Screenshots/Recordings
Before
N/A — flag wiring only, no UI changes in this PR.
After
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an examplePre-merge reviewer checklist
Made with Cursor