Skip to content

fix(kyc): route email-blocked gates to the self-serve email sheet consistently (final /code-review)#2344

Merged
Hugo0 merged 1 commit into
devfrom
fix/provide-email-gate-consistency
Jul 3, 2026
Merged

fix(kyc): route email-blocked gates to the self-serve email sheet consistently (final /code-review)#2344
Hugo0 merged 1 commit into
devfrom
fix/provide-email-gate-consistency

Conversation

@Hugo0

@Hugo0 Hugo0 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Final pre-prod /code-review of the #2342 provide-email surfaces found two consumer sites diverging from the canonical deriveGate order (email-blocked > fixable-rejection):

  • ActivationCTAs (Home): the copy memo ranked hasFixableRejection above isEmailBlocked while the button onClick ranked isEmailBlocked first — so with both rail states the card read 'Upload document' but opened the email sheet, and hid the document path. Reordered the memo (+ primaryRejectionMessage) to email-blocked → fixable → terminal, matching the onClick and canonical deriveGate.
  • AddWithdrawCountriesList.handleFormSubmit: missing the provide-email branch that checkBridgeGate has, so a rail flipping to email-blocked between form-open and submit opened the contact-support KYC modal instead of the email sheet — the exact self-serve→support-ticket regression feat(kyc): provide-email sheet for the no-email verification dead-end #2342 exists to fix. Added the branch; regression test pins provide-email → sheet, not modal.

The 3rd review finding (poll 5s→60s recovery latency) is the documented, intentional tradeoff the review itself ranked last as not-a-bug — accepted.

Follow-up (not blocking)

ActivationCTAs re-implements the gate ordering inline; it should consume deriveGate directly so consumers can't drift again.

QA

Full jest suite 1675 green; typecheck clean; new regression test for the bank-submit provide-email routing.

…sistently (final /code-review)

Final pre-prod review of the #2342 provide-email surfaces found two consumer
sites diverging from the canonical deriveGate order (email-blocked > fixable):

- ActivationCTAs: the copy memo ranked hasFixableRejection above isEmailBlocked
  while the button onClick ranked isEmailBlocked first — so with both rail
  states the card said 'Upload document' but opened the email sheet, and hid
  the document path. Reordered the memo (+ primaryRejectionMessage) to
  email-blocked → fixable → terminal, matching onClick and deriveGate.
- AddWithdrawCountriesList.handleFormSubmit: missing the provide-email branch
  that checkBridgeGate has, so a rail flipping to email-blocked between
  form-open and submit opened the contact-support KYC modal instead of the
  email sheet — the exact self-serve→support-ticket regression #2342 fixes.
  Added the branch; regression test pins provide-email → sheet, not modal.

Follow-up (not blocking): ActivationCTAs re-implements gate ordering inline;
it should consume deriveGate directly so consumers can't drift again.

Full suite 1675 green; typecheck clean.
@vercel

vercel Bot commented Jul 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
peanut-wallet Ready Ready Preview, Comment Jul 3, 2026 2:25am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 59 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 11a65d0e-eebc-42cd-a01b-5c0571285a89

📥 Commits

Reviewing files that changed from the base of the PR and between 35cae78 and 5ee21c1.

📒 Files selected for processing (3)
  • src/components/AddWithdraw/AddWithdrawCountriesList.tsx
  • src/components/AddWithdraw/__tests__/AddWithdrawCountriesList.test.tsx
  • src/components/Home/ActivationCTAs.tsx

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Code-analysis diff

Painscore total: 5872.35 → 5872.71 (+0.36)
Findings: 0 net (+10 new, -10 resolved)

🆕 New findings (10)

  • critical complexity — src/components/AddWithdraw/AddWithdrawCountriesList.tsx — CC 123, MI 56.93, SLOC 350
  • high hotspot — src/components/AddWithdraw/AddWithdrawCountriesList.tsx — 42 commits, +702/-480 lines since 6 months ago
  • high complexity — src/components/Home/ActivationCTAs.tsx — CC 42, MI 59.11, SLOC 160
  • medium high-mdd — src/components/AddWithdraw/AddWithdrawCountriesList.tsx:45 — AddWithdrawCountriesList: MDD 143.4 (uses across many lines from declarations)
  • medium high-mdd — src/components/Home/ActivationCTAs.tsx:77 — ActivationCTAs: MDD 45.8 (uses across many lines from declarations)
  • medium high-mdd — src/components/AddWithdraw/AddWithdrawCountriesList.tsx:452 — : MDD 28.5 (uses across many lines from declarations)
  • medium high-mdd — src/components/AddWithdraw/AddWithdrawCountriesList.tsx:443 — renderPaymentMethods: MDD 27.3 (uses across many lines from declarations)
  • medium method-complexity — src/components/AddWithdraw/AddWithdrawCountriesList.tsx:166 — CC 16 SLOC 56
  • low high-mdd — src/components/AddWithdraw/AddWithdrawCountriesList.tsx:166 — handleFormSubmit: MDD 19.8 (uses across many lines from declarations)
  • low high-mdd — src/components/AddWithdraw/AddWithdrawCountriesList.tsx:261 — handleWithdrawMethodClick: MDD 14.7 (uses across many lines from declarations)

✅ Resolved (10)

  • src/components/AddWithdraw/AddWithdrawCountriesList.tsx — CC 122, MI 57.05, SLOC 347
  • src/components/Home/ActivationCTAs.tsx — CC 42, MI 59.12, SLOC 160
  • src/components/AddWithdraw/AddWithdrawCountriesList.tsx — 41 commits, +697/-480 lines since 6 months ago
  • src/components/AddWithdraw/AddWithdrawCountriesList.tsx:45 — AddWithdrawCountriesList: MDD 141.7 (uses across many lines from declarations)
  • src/components/Home/ActivationCTAs.tsx:77 — ActivationCTAs: MDD 45.1 (uses across many lines from declarations)
  • src/components/AddWithdraw/AddWithdrawCountriesList.tsx:447 — : MDD 28.5 (uses across many lines from declarations)
  • src/components/AddWithdraw/AddWithdrawCountriesList.tsx:438 — renderPaymentMethods: MDD 27.3 (uses across many lines from declarations)
  • src/components/AddWithdraw/AddWithdrawCountriesList.tsx:166 — CC 15 SLOC 53
  • src/components/AddWithdraw/AddWithdrawCountriesList.tsx:166 — handleFormSubmit: MDD 18.6 (uses across many lines from declarations)
  • src/components/AddWithdraw/AddWithdrawCountriesList.tsx:256 — handleWithdrawMethodClick: MDD 14.7 (uses across many lines from declarations)

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

🧪 UI test report — ✅ all green

Suites

  • unit: 1678 ran, 0 failed, 0 skipped, 23.6s

📊 Coverage (unit)

metric %
statements 55.0%
branches 38.1%
functions 42.9%
lines 55.0%
⏱ 10 slowest test cases
time test
3.5s src/components/Card/share-asset/__tests__/shareAssetLayout.test.ts › never places two stickers in heavy overlap (broad seed sweep)
0.4s src/components/Card/share-asset/__tests__/shareAssetLayout.test.ts › every sticker stays within canvas at any count
0.3s src/app/actions/__tests__/api-headers.test.ts › should include Content-Type in updateUserById
0.2s src/app/actions/__tests__/api-headers-extended.test.ts › should not include apiKey in updateUserById body
0.1s src/app/(mobile-ui)/qr-pay/__tests__/qr-pay-states.test.tsx › Perk claim in progress shows disabled button + progress
0.1s src/services/__tests__/resolveClaimLink.test.ts › restores the pristine password after a redirect mangles the fragment
0.1s src/components/Global/GeneralRecipientInput/__tests__/GeneralRecipientInput.test.tsx › should handle valid 9-digit US account
0.1s src/components/Global/GeneralRecipientInput/__tests__/GeneralRecipientInput.test.tsx › should handle maximum length (17 digits) US account
0.1s src/components/Global/GeneralRecipientInput/__tests__/GeneralRecipientInput.test.tsx › should handle invalid ETH address (missing 0x prefix)
0.1s src/components/Global/GeneralRecipientInput/__tests__/GeneralRecipientInput.test.tsx › should handle valid US account with spaces
📍 Inline annotations are in the **Unit test report** check above. Coverage artifact: `coverage-unit`. Generated by `.github/workflows/tests.yml`.

@Hugo0 Hugo0 merged commit bbd8b6d into dev Jul 3, 2026
18 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant