Repository navigation
fix(TASK-24702): recover paperwork questions and blocked setup - #4063
innolope-dev wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Code-analysis diffPainscore total: 11169.64 → 11174.41 (+4.77) 🆕 New findings (487)
…and 467 more. ✅ Resolved (484)
…and 464 more. 📈 Painscore deltas (top movers)
|
There was a problem hiding this comment.
Chip review — changes requested
Four confirmed findings: the card page can crash before a user ID is available, and three other changed-code CI gates fail.
Findings
-
BLOCKING · src/features/card/useCardFlow.ts:197 · Card page can crash before the user ID loads
On an initial render with no user ID, supportRequired is null and userId is undefined. The optional-chain comparison evaluates undefined === undefined as true, then dereferences supportRequired.reason and throws before the card page can render. The typecheck gate also fails here with TS18047. Require a non-null supportRequired before comparing its user ID. -
MINOR · src/components/Profile/views/tests/MoneySettings.ars-real-modal.acceptance.test.tsx:17 · New ARS regression test fails ESLint
The eslint check reports three unused imports in this new test: act and within on line 17, and en on line 20. Remove those imports so the changed-code lint gate passes. -
MINOR · src/app/actions/tests/kyc-paperwork-verification.intent-errors.acceptance.test.ts:1 · Changed regression tests fail the formatting gate
The format check fails on four changed tests: kyc-paperwork-verification.intent-errors.acceptance.test.ts, MoneySettings.ars-real-modal.acceptance.test.tsx, MoneySettings.test.tsx, and CardPage.verified-name-support.acceptance.test.tsx. Run the repository formatter on those files and commit its output. -
MINOR · src/i18n/app/messages/en.json:3978 · Address helper exceeds the verification screen copy baseline
The screen-wordiness check reports QuestionStepScreen at 228 words against its 218-word baseline (+10) after this new address helper. Shorten the localized helper while retaining the bank minimum, or deliberately update the baseline with the reason documented in the PR. -
MAJOR · src/features/card/useCardFlow.ts:404 · Copy now wrong: Verified user with unconfirmed name is stopped at card apply and told to contact support, but public and product copy says every verified eligible user can apply
After this change: A card application is refused with a contact-support screen (no apply) when Rain cannot confirm the user's full name (verified-name-missing); otherwise a verified, eligible user can apply.
These places still say otherwise:
mono:content/help/peanut-card/en.md:76— "Any eligible user who completes identity verification and accepts the cardholder terms can apply, and applications are subject to approval." → Any eligible user who completes identity verification and accepts the cardholder terms can apply, and applications are subject to approval. If we cannot confirm your full name for the card, the app stops the application and asks you to contmono:content/help/peanut-card/es-419.md:76— "Cualquier usuario elegible que complete la verificación de identidad y acepte los términos de la tarjeta puede solicitarla, y las solicitudes están sujetas a aprobación." → Cualquier usuario elegible que complete la verificación de identidad y acepte los términos de la tarjeta puede solicitarla, y las solicitudes están sujetas a aprobación. Si no podemos confirmar tu nombre completo para la tarjeta, la app detmono:content/help/peanut-card/es-ar.md:76— "Cualquier usuario elegible que complete la verificación de identidad y acepte los términos de la tarjeta puede solicitarla, y las solicitudes están sujetas a aprobación." → Cualquier usuario elegible que complete la verificación de identidad y acepte los términos de la tarjeta puede solicitarla, y las solicitudes están sujetas a aprobación. Si no podemos confirmar tu nombre completo para la tarjeta, la app detmono:content/help/peanut-card/es-es.md:76— "Cualquier usuario elegible que complete la verificación de identidad y acepte los términos de la tarjeta puede solicitarla, y las solicitudes están sujetas a aprobación." → Cualquier usuario elegible que complete la verificación de identidad y acepte los términos de la tarjeta puede solicitarla, y las solicitudes están sujetas a aprobación. Si no podemos confirmar tu nombre completo para la tarjeta, la app detmono:content/help/peanut-card/pt-br.md:76— "Qualquer usuário elegível que conclua a verificação de identidade e aceite os termos do cartão pode solicitá-lo, e as solicitações estão sujeitas a aprovação." → Qualquer usuário elegível que conclua a verificação de identidade e aceite os termos do cartão pode solicitá-lo, e as solicitações estão sujeitas a aprovação. Se não conseguirmos confirmar seu nome completo para o cartão, o app interrompe amono:content/help/peanut-card/en.md:30— "Once you're verified in the app, you can apply for it" → Once you're verified in the app, you can apply for it, unless we cannot confirm your full name for the card; then the app asks you to contact supportmono:product/card.md:128— "The gates are identity verification, an eligible residence country, and, for a first application, at least $10 spendable balance (Peanut wallet plus card collateral)." → The gates are identity verification, an eligible residence country, a confirmed full name for the card (otherwise the application is stopped and the user is sent to support), and, for a first application, at least $10 spendable balancemono:product/card.md:512— "- Now: Live — every card-eligible verified user can apply; applications are subject to approval." → - Now: Live — every card-eligible verified user can apply, unless their full name cannot be confirmed for the card (then they are sent to support); applications are subject to approval.mono:product/support-answers/card-how-to-get.md:23— "Once you're verified in the app, you can apply for your Peanut Card. The card option appears after" → Once you're verified in the app, you can apply for your Peanut Card, unless we cannot confirm your full name for the card; in that case the app asks you to contact support. The card option appears aftermono:product/support-answers/rewards-points-badges.md:45— "every verified user can apply for the card." → every verified user can apply for the card, except one whose full name cannot be confirmed for the card, who is sent to support.mono:product/app.md:68— "a verified user can apply for the card (see card.md)" → a verified user can apply for the card unless their full name cannot be confirmed for it (see card.md)mono:product/app.md:103— "Once a user is verified in the app they can apply, and applications are subject to approval by Rain." → Once a user is verified in the app they can apply, unless their full name cannot be confirmed for the card (then the app sends them to support); applications are subject to approval by Rain.mono:product/security.md:111— "any verified user in an eligible residence country can apply for the card (see card.md)." → any verified user in an eligible residence country can apply for the card unless their full name cannot be confirmed for it (see card.md).mono:product/countries.md:392— "Once a user is verified in the app they can apply, and applications are subject to approval." → Once a user is verified in the app they can apply, unless their full name cannot be confirmed for the card (then they are sent to support), and applications are subject to approval.mono:product/spending.md:46— "Once a user is verified in the app they can apply, and applications are subject to approval;" → Once a user is verified in the app they can apply, unless their full name cannot be confirmed for the card (then they are sent to support); applications are subject to approval;
Fix them in this pull request, or say where the fix goes. mono: copy ships to mono main as its own content change, never inside a code PR.
Checked clean
- Exact detached head and supplied base SHA match; reviewed changed application paths and targeted regression tests.
- Card support refusal, ARS scoped provisioning, address minimum, and bounded questions-read recovery were checked against surrounding code.
- UI changes checked against mono design.md; no separate design-system violation found.
- CI at this head: typecheck, eslint, format, and screen-wordiness failed; unit, i18n-overflow, and native-export were still running at review time.
Security review by moonshotai/kimi-k3: 0 finding(s), marked with the model name. It reads the diff only and answers only security, privacy and money, so treat its findings as advice.
Third opinion by claude-opus: 0 finding(s), marked with the model name. It answers only product truth, missing tests and the cross-repo contract, so treat its findings as advice.
Copy check by claude-haiku-5-5: 1 finding(s), titled "Copy now wrong". Every quoted passage was checked against the file. 1 quoted passage(s) it named were not found where it said and were left out.
Exact head: fb2d647c8bd5 · Context: repo, mono, ci · Took 4m (queued 1m)
🧪 UI test report — ✅ all greenSuites
📊 Coverage (unit)
⏱ 10 slowest test cases
|
|
/chip review |
There was a problem hiding this comment.
Chip review — no blocking findings — this is not an approval
No findings at this head. P1–P4 are fixed; P5 was an existing API refusal, not a regression from this change.
Findings
- MAJOR · src/features/card/useCardFlow.ts:404 · Copy now wrong: Verified user with unconfirmed name is stopped at card apply, yet copy says verification alone lets them apply
After this change: A verified, card-eligible user whose full name cannot be confirmed cannot apply for the card and is told to contact support, so 'verified means can apply' no longer holds for them.
These places still say otherwise:
mono:product/card.md:512— "- Now: Live — every card-eligible verified user can apply; applications are subject to approval. There is no queue. Marketing must never promise issuance or availability by country." → - Now: Live — every card-eligible verified user whose name can be confirmed can apply; users whose name cannot be confirmed are sent to support. Applications are subject to approval. There is no queue. Marketing must never promise issuamono:product/card.md:19— "Any card-eligible verified user can apply; applications are subject to approval (Rain). No queue." → Any card-eligible verified user whose name can be confirmed can apply; others are sent to support. Applications are subject to approval (Rain). No queue.mono:product/card.md:7— "eligibility + KYC + a $10 spendable balance before the FIRST application" → eligibility + KYC + a confirmed full name + a $10 spendable balance before the FIRST applicationmono:product/card.md:144— "If the card does not appear after these steps, check in order" → If the card does not appear after these steps, check in order: (a) the verified full name is confirmed; if it is not, the card page asks the user to contact support, (b) the Rain card-specific check is complete (tax ID, SMS and email codes,mono:product/quick-ref.md:150— "once you're verified in the app you can apply for the Peanut Card" → once you're verified in the app and your full name is confirmed, you can apply for the Peanut Card; otherwise the app sends you to supportmono:product/support-answers/card-how-to-get.md:23— "Once you're verified in the app, you can apply for your Peanut Card." → Once you're verified in the app and your full name is confirmed, you can apply for your Peanut Card. If the card page asks you to contact support, your full name could not be confirmed.mono:product/security.md:111— "any verified user in an eligible residence country can apply for the card" → any verified user in an eligible residence country whose full name can be confirmed can apply for the cardmono:product/app.md:68— "a verified user can apply for the card (see card.md)" → a verified user whose full name can be confirmed can apply for the card (see card.md)mono:product/countries.md:392— "Once a user is verified in the app they can apply" → Once a user is verified in the app and their full name is confirmed, they can applymono:content/_system/data/spending-methods/virtual-card.md:15— "any card-eligible user who completes identity verification and accepts the cardholder terms can apply" → any card-eligible user who completes identity verification, has a confirmed full name, and accepts the cardholder terms can applymono:content/_system/templates/help.md:89— "any card-eligible user who completes identity verification and accepts the cardholder terms can apply" → any card-eligible user who completes identity verification, has a confirmed full name, and accepts the cardholder terms can apply; a user whose name cannot be confirmed is sent to supportmono:content/help/peanut-card/en.md:30— "Once you're verified in the app, you can apply for it" → Once you're verified in the app and your full name is confirmed, you can apply for itmono:content/help/peanut-card/es-419.md:30— "Una vez que verificas tu identidad en la app, puedes solicitarla" → Una vez que verificas tu identidad en la app y tu nombre completo está confirmado, puedes solicitarlamono:content/help/peanut-card/es-ar.md:30— "Una vez que verificás tu identidad en la app, podés solicitarla" → Una vez que verificás tu identidad en la app y tu nombre completo está confirmado, podés solicitarlamono:content/help/peanut-card/pt-br.md:30— "Depois de verificar sua identidade no app, você pode solicitá-lo" → Depois de verificar sua identidade no app e ter seu nome completo confirmado, você pode solicitá-lomono:content/help/peanut-card/es-419.md:76— "Cualquier usuario elegible que complete la verificación de identidad y acepte los términos de la tarjeta puede solicitarla" → Cualquier usuario elegible que complete la verificación de identidad, tenga su nombre completo confirmado y acepte los términos de la tarjeta puede solicitarlamono:content/help/peanut-card/es-ar.md:76— "Cualquier usuario elegible que complete la verificación de identidad y acepte los términos de la tarjeta puede solicitarla" → Cualquier usuario elegible que complete la verificación de identidad, tenga su nombre completo confirmado y acepte los términos de la tarjeta puede solicitarlamono:content/help/peanut-card/pt-br.md:76— "Qualquer usuário elegível que conclua a verificação de identidade e aceite os termos do cartão pode solicitá-lo" → Qualquer usuário elegível que conclua a verificação de identidade, tenha o nome completo confirmado e aceite os termos do cartão pode solicitá-lomono:content/help/card-payments/en.md:30— "Once you're verified in the app, you can get your Peanut Card" → Once you're verified in the app and your full name is confirmed, you can get your Peanut Cardmono:content/help/card-payments/es-419.md:33— "Una vez que verificas tu identidad en la app, puedes obtener tu Peanut Card" → Una vez que verificas tu identidad en la app y tu nombre completo está confirmado, puedes obtener tu Peanut Cardmono:content/help/card-payments/pt-br.md:33— "Depois de verificar sua identidade no app, você pode obter seu Peanut Card" → Depois de verificar sua identidade no app e ter seu nome completo confirmado, você pode obter seu Peanut Card
Fix them in this pull request, or say where the fix goes. mono: copy ships to mono main as its own content change, never inside a code PR.
Checked clean
- P1 fixed: the nullable support state is guarded before its reason is read; the new auth-loading regression test and typecheck pass.
- P2 fixed: unused imports are removed from the ARS test; eslint passes.
- P3 fixed: the changed tests pass the format check.
- P4 fixed: the English address helper is shorter and screen-wordiness passes.
- Reviewed the new-head diff and surrounding card, ARS, address, and questions recovery paths; no new concrete defect found.
- Exact-head unit, i18n-overflow, capture, SEO, press, and preview checks were still in progress at review time.
Security review by moonshotai/kimi-k3: 0 finding(s), marked with the model name. It reads the diff only and answers only security, privacy and money, so treat its findings as advice.
Third opinion: did not run — it reads only the first review of a pull request; the first reviewer checks later rounds. This review is one reviewer short.
Copy check by claude-haiku-5-5: 1 finding(s), titled "Copy now wrong". Every quoted passage was checked against the file. 1 quoted passage(s) it named were not found where it said and were left out.
Exact head: 64606b438a2d · Context: repo, ci, mono, product, sibling-api · Took 3m (queued 2m)
|
/chip review |
There was a problem hiding this comment.
Chip review — no blocking findings — this is not an approval
No findings at this head. P1–P4 remain fixed; P5 and P6 describe a pre-existing API refusal, not a new eligibility or copy regression.
Checked and not raised again
- MAJOR · src/features/card/useCardFlow.ts:404 · Copy now wrong: Verified users with an unconfirmed name are stopped at card apply, but copy still says verification alone lets them apply — this review checked it and does not believe it.
Checked clean
- P1 remains fixed: card support state is checked for null before reading its reason.
- P2–P4 remain fixed: the unused test imports are gone, changed tests are formatted, and the address helper is shortened.
- The new ARS support row opens CorridorGateDrawer with the scoped report reason and a contact-support action; its existing translations and drawer behavior were checked.
- The exact-head check-run inventory had no failures at review time, but typecheck, lint, format, wordiness, and unit checks had not yet appeared; git diff --check passed.
- The changed UI was checked against mono design.md; no separate design-system defect found.
Security review by moonshotai/kimi-k3: 0 finding(s), marked with the model name. It reads the diff only and answers only security, privacy and money, so treat its findings as advice.
Third opinion: did not run — it reads only the first review of a pull request; the first reviewer checks later rounds. This review is one reviewer short.
Copy check by claude-haiku-5-5: 1 finding(s), titled "Copy now wrong". Every quoted passage was checked against the file. 1 quoted passage(s) it named were not found where it said and were left out.
Exact head: 732da360c6fc · Context: repo, ci, mono, product, sibling-api · Took 4m
|
Replaced by #4083. |
Smart Paperwork users now get the correct next step when setup cannot advance:
Task: TASK-24702 — TASK-24662 follow-ups.
Paired API: dev #2107. API first enables the support code and address hint; older APIs retain the current generic handling/server validation. Only the two verified API additions were carried into the generated client contract, preserving unrelated snapshot differences.
Validation: independent frozen regressions reproduced the defects; focused rendered/service/hook/address/questions suites and affected existing regressions passed on Node 22. The final ARS/card/support set passed 220 tests, including a real processing-modal regression and legacy fallback. Configured tests, lint, screen-publishing tests and format gate passed. Disposable product mutations confirmed the questions two-read cap and API name guard are protected. Full suites/typecheck/build run in CI. Existing React act and hook dependency warnings remain.
Screenshots:⚠️ NONE — the new missing-name and server-owned address-hint states have no screenshot fixtures. Rendered tests cover the states; visual and native-device acceptance remain unverified.
Independent documentation/legal review found no existing evergreen sentence made false. No new architectural smell identified; duplicated acceptance fixtures were consolidated without removing original assertions. The historical malformed response was not retained, so this adds recovery/diagnostics without claiming its original producer is known. No provider data correction or production deployment is included.
Final ARS coverage: 140 focused account/drawer tests and 16 independent rendered cases passed, including all four locales, unknown-reason fallback and live report transitions. Required local gates pass on both branches.
Paired implementation: API/UI counterpart. Equivalent other-base PR: main/dev counterpart.