Let partners update their country from profile settings #4632
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 496 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.371
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #4632"
general
weight: 0.35
pepeladeira
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
New Features
US-based partners can change their country in profile settings after confirming the change. Partners outside the US are directed to contact support.
Support chat provides country-specific guidance on changing a partner’s country.
Important Changes
Changing a country clears payout details, which may need to be entered again, and is unavailable while a payout is processing.
Partners with identity verification may be asked to complete country-change verification.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---
How to test
1. Sign in to http://partners.localhost:8888 as a partner of the Acme program whose country is United States. Open Profile. If Country is locked, set it to United States from Network Partners in admin first (step 6), then come back here.
2. Open http://localhost:8888/embed/support-chat?variant=embedded while signed in on http://localhost:8888 as that same user. Choose Partner (partners.dub.co). If it asks which program this is about, choose Acme. Ask to change your partner profile country.
- The reply tells you to update it at https://partners.dub.co/profile.
- No ticket form appears.
- Asking which countries support payouts still answers from the docs.
- Choosing Workspace (app.dub.co) and the
acmeworkspace does not send you to the partner country control.3. On Profile, under Basic information, open Country, choose Canada, and click Save changes. Click Cancel.
- The Updating your country dialog closes.
- Country stays United States.
- There is no "Your profile has been updated." toast.
4. Choose Canada again, click Save changes, then I acknowledge. Reload Profile.
- A toast says "Your profile has been updated."
- Country shows Canada and does not open.
- Hovering it shows "Your profile country is based on your current location and cannot be changed. If you need to update your country, please contact support." and Contact support.
- A connected payout method is cleared, and the sidebar shows Connect payout method.
- Click Save changes again without changing Country. The country dialog stays closed, the profile still saves, and Country stays Canada.
5. Ask the support chat to change your partner profile country again.
- The reply says you cannot change it yourself and names Canada.
- A ticket form is on screen, with Submit ticket.
- The ticket is not created until Submit ticket is clicked. Leave it unsent.
6. Sign in to http://admin.localhost:8888, open Partners, then Network Partners, and open that partner. The address bar includes
partnerId. Under Country, choose United States, click Update, then Update country.- The dialog is titled Update partner country and says this will reset the connected Stripe account and payout settings.
- Reload http://partners.localhost:8888/profile. Country shows United States and opens again.
7. This step applies only when that partner has already verified their identity. Saving the country queues a QStash job. Without ngrok, QStash cannot reach your local app, so call the cron route yourself. In local dev, the route does not check the QStash signature. Use the
partnerIdfrom the admin address bar.- If the new country does not match the verified document, identity verification is cleared and MailHog at http://localhost:8025 shows "Identity re-verification required".
- A partner who has not verified their identity can skip this step. Their country change in step 4 does not depend on it.