feat: improve affiliate onboarding copy#7637
Conversation
Deploying swap-dev with
|
| Latest commit: |
72ae64b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ce069544.swap-dev-5u6.pages.dev |
| Branch Preview URL: | https://feat-improve-affiliate-copy.swap-dev-5u6.pages.dev |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (5)
WalkthroughThis PR updates the affiliate trader referral onboarding flow with refreshed messaging and wallet-connection-aware subtitle rendering. New localization strings replace "Earn while you trade" phrasing with referral reward confirmations. The subtitle component conditionally renders onboarding copy based on wallet connection state. Auto-verification validation is tightened to reject empty code inputs. ChangesAffiliate Trader Referral Onboarding Flow
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
apps/cowswap-frontend/src/modules/affiliate/containers/AffiliateTraderModalUnsupported.tsx (1)
16-19: 💤 Low valueConsider passing
isWalletConnectedor customizing the subtitle for the unsupported-network case.When
CodeLinkingSubtitleis called without theisWalletConnectedprop (line 19), it defaults to the "Connect your wallet to activate it..." message. In the unsupported-network modal, this could be misleading since the real blocker is network support, not wallet connection. Consider either passingisWalletConnectedbased on the actual wallet state or rendering different copy that clarifies the network limitation.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/cowswap-frontend/src/modules/affiliate/containers/AffiliateTraderModalUnsupported.tsx` around lines 16 - 19, The subtitle shown in AffiliateTraderModalUnsupported is misleading because CodeLinkingSubtitle is rendered without the isWalletConnected prop; update AffiliateTraderModalUnsupported to either pass the actual wallet connection state into CodeLinkingSubtitle (e.g., isWalletConnected={walletConnected} where walletConnected is read from your wallet state/hook) or replace CodeLinkingSubtitle with a variant that displays network-specific copy explaining the unsupported-network blocker so users aren’t prompted to “connect your wallet” when the network is the issue.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In
`@apps/cowswap-frontend/src/modules/affiliate/containers/AffiliateTraderModalUnsupported.tsx`:
- Around line 16-19: The subtitle shown in AffiliateTraderModalUnsupported is
misleading because CodeLinkingSubtitle is rendered without the isWalletConnected
prop; update AffiliateTraderModalUnsupported to either pass the actual wallet
connection state into CodeLinkingSubtitle (e.g.,
isWalletConnected={walletConnected} where walletConnected is read from your
wallet state/hook) or replace CodeLinkingSubtitle with a variant that displays
network-specific copy explaining the unsupported-network blocker so users aren’t
prompted to “connect your wallet” when the network is the issue.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 79bfc11c-50d4-42d4-86e3-22a2643b60ef
📒 Files selected for processing (6)
apps/cowswap-frontend/src/locales/en-US.poapps/cowswap-frontend/src/modules/affiliate/containers/AffiliateTraderModalCodeLinking.tsxapps/cowswap-frontend/src/modules/affiliate/containers/AffiliateTraderModalUnsupported.tsxapps/cowswap-frontend/src/modules/affiliate/hooks/useAffiliateTraderCodeInput.tsapps/cowswap-frontend/src/modules/affiliate/pure/AffiliateTraderModal/AffiliateTradeCodeForm.tsxapps/cowswap-frontend/src/modules/affiliate/pure/AffiliateTraderModal/CodeLinkingSubtitle.tsx
|
Nitpick: "You've been referred" sounds a bit too technical I think. Usually these things are worded more like "Claim your reward", "Claim your discount" or things like that. Also, the big paragraph could probably say the same thing with less words:
Also, "1 days" could handle singular/plural properly. In my mind:
|
50da32f to
72ae64b
Compare
Deploying explorer-dev with
|
| Latest commit: |
72ae64b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c2e77035.explorer-dev-dxz.pages.dev |
| Branch Preview URL: | https://feat-improve-affiliate-copy.explorer-dev-dxz.pages.dev |
Summary
Fixes https://nomevlabs.slack.com/archives/C07BMTK4F19/p1780912787999709
Improves affiliate referral modal copy so referred traders understand they are activating a shared reward code, not creating their own affiliate link.
Also includes fix commit 4b62838, which prevents a race in auto-verifying a URL referral code before the input state is populated.
To Test
/?ref=COWBOYYou've been referred - here's your rewardConnect wallet to activateBackground
Old copy made the referred-trader flow look like affiliate-code creation.
Before & after:

Summary by CodeRabbit
Release Notes
New Features
Bug Fixes