fix(kyc): surface per-label reject copy in action-required drawer (dev)#2300
fix(kyc): surface per-label reject copy in action-required drawer (dev)#2300jjramirezn wants to merge 2 commits into
Conversation
The action-required drawer checked actionMessage first, but the backend always sends a generic "resubmit your documents" actionMessage for every action_required state — so the specific reject-label copy (e.g. DUPLICATE_EMAIL → "Email already in use, sign in to that account or contact support") was never reachable. Users hitting an email collision saw a misleading "verify your ID" prompt with no actionable next step. Prefer RejectLabelsList when reject labels are present; fall back to the generic actionMessage only when there are none.
Address /code-review findings: collapse the three-branch ternary to two (RejectLabelsList already renders its own empty-state fallback, so the duplicated branch was dead weight), and add an integration test that renders the real RejectLabelsList so the DUPLICATE_EMAIL → 'Email already in use' copy mapping is actually exercised, not mocked away.
|
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: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
Walkthrough
KycActionRequired reject-label rendering precedence
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Comment |
Code-analysis diffPainscore total: 5845.66 → 5846.08 (+0.42) 🆕 New findings (1)
✅ Resolved (1)
|
🧪 UI test report — ✅ all greenSuites
📊 Coverage (unit)
⏱ 10 slowest test cases
|
Summary
Dev-targeting twin of #2293 (which lands the same fix on
main). Opening directly intodevso the fix is present here without waiting on the main→dev back-merge.The KYC action-required drawer (
KycActionRequired.tsx) checkedactionMessagefirst; the backend always sends a genericaction_requiredmessage, so the specific per-label copy (notablyDUPLICATE_EMAIL→ "Email already in use → sign in to that account or contact support") was never reachable. Users hitting an email collision saw a misleading generic "verify your ID" prompt. Fix: preferRejectLabelsListwhen reject labels are present; fall back toactionMessageonly when there are none.Risk
Low — single presentational component, no logic/data/contract change. Identical diff to #2293.
QA
action_required+rejectLabels:['DUPLICATE_EMAIL']→ shows the email-collision copy, not the generic resubmit message.action_requiredwith no labels → genericactionMessagefallback.RejectLabelsList.Related
main(hotfix). Merge order doesn't matter; whichever lands second is a no-op against the other. Avoid double-applying via back-merge — if fix(kyc): surface per-label reject copy in action-required drawer #2293→main is back-merged to dev, this PR becomes redundant (close it).