Repository navigation
fix(TASK-24847): signup passkey sheet, login and setup recovery, KYC start deadline, US-state card copy - #4077
innolope-dev wants to merge 10 commits into
Conversation
A KYC start could leave the drawer locked on "Loading" for minutes: the transport timeout stopped when headers arrived, so a stalled body, auth readiness or the native module import could wait forever. - The transport budget now covers the response body and error telemetry. - The whole KYC start has one 30 s deadline; late results are fenced so they cannot reopen the SDK. - Manteca Add Money and Withdraw pass the start error to the drawer and keep it open instead of closing silently. - After the Sumsub SDK closes without a submit, refresh identity once so the backend can heal a missing applicant link (TASK-24858). TASK-24163, TASK-24858
A US resident in a state Rain does not cover (Georgia) was told the card "isn't available for residents of your country". Rain issues cards across the US, so for a US resident a geo-blocked card is always a state block: name the state instead.
…save - TASK-24847: the automatic iOS passkey sign-in ran on every Landing mount and could outlive Landing, so its sheet kept popping up over Claim username. It now runs once per app launch, never after Sign up or Log in, and leaving Landing retires it and frees the native slot. A ceremony retired while its result settles commits no session. - TASK-24856: a failed profile fetch on /setup is "unknown", with a retry, not "signed out" (no more signup for a logged-in user). The signup email step tells a protected email replacement (step-up, verification code, replacement disabled) from a retryable failure, keeps the confirmed email and lets signup continue instead of failing the same request again. - TASK-24857: login verify 429/5xx are typed and retryable, keep the existing session and honour Retry-After; the login hydration budget now covers the per-request timeout; setup initialization retries once before the generic error screen. TASK-24847, TASK-24856, TASK-24857
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Transport: once response headers arrive, a body-read failure or budget expiry never resends a mutating request (no native/WebView fallback, no retry); a POST that got 201 is sent once. Statement downloads skip the body drain so a large export is not cut off and regenerated. - /setup: a profile-fetch error is "unknown" only when no profile is loaded, so a failed focus refetch no longer replaces the current step; a successful recovery resumes the post-login routing. - Email step: keep the current email only when the account has one; otherwise the save failure shows as before. - Login: once the passkey login has committed its token, retiring the automatic attempt no longer cancels it half way; it finishes hydration and key setup. - KYC: the refresh after the SDK closes sends the same scope as the poll and skips document, action and residence-change sessions; the Manteca drawers close when the SDK opens or demo succeeds. - Retry-After is capped at 60 s. TASK-24847, TASK-24856, TASK-24857, TASK-24163, TASK-24858
Round 2 skipped the identity refresh for action sessions, which also skipped clearing the user-initiated flag, so a delayed APPROVED after closing an unsubmitted action (supplement:bridge) called onKycSuccess and moved FeatureAction to feature-ready without the upload. Clear the flag on every close without a submit; the refresh stays skipped. TASK-24858
There was a problem hiding this comment.
Chip review — no blocking findings — this is not an approval
One major finding: successful Manteca verification starts leave the entry gate open in Add Money and Withdraw.
Findings
-
MAJOR · src/components/AddMoney/components/MantecaAddMoneyFlow.tsx:466 · Close the Manteca gate when verification starts successfully
For a Mantecarestart-identityorfixablerejection, the start handler can setshowWrapperand open Sumsub, but only the ordinary initiate branch closes the entry gate. The same branch structure exists insrc/features/withdraw/views/MantecaBankWithdrawFlow.tsx. The gate therefore remains open during the SDK and reappears when it closes; on Add Money the fixable case also keeps rendering the document-request page instead of the amount step. Close the gate when either handler actually opens the SDK, while retaining it on a start error. Cover successful restart and fixable starts in both flows; the new tests cover failures only. -
MINOR · src/features/deposit-accounts/components/ClosedRowDrawer.tsx:106 · [claude-opus] US-state card refusal copy promises the card will come later
The new stringcardNotAvailableStateNotesays "The Peanut card isn't available in your state yet." The es-419 ('todavía') and pt-BR ('ainda') versions say the same. product/card.md lists the 19 states, DC and the territories as refused under Rain's Platform Standards (§ Refused US states). It gives no plan to open them, and countries.md:516 says card copy must not promise issuance. card.md:254 also separates a hard block from a 'not yet'. The product truth is right and the copy is wrong. Fix: drop 'yet' in all three locales, e.g. "The Peanut card isn't available in your state." The new code comment at line 59 ('Rain issues cards across the US') also contradicts card.md:199, which says only 31 states are allowed. Reword it to say that for a US residence the only geo rule is rain.us-state. A narrower edge case:livesInUsreads verified ?? declared residence only. A verified US user with an open residence-change request to a refused country gets 'geo-blocked' from that request, because card.md:223 applies the strictest residence. That user would wrongly be told it is their state.
Checked clean
- Exact detached head and merge-base diff; trusted PR metadata matched supplied refs.
- CI checks at this head were green; inspected transport, passkey, setup, email, KYC, and Manteca behavior beyond those gates.
- Manteca error tests cover failed starts; successful restart and fixable starts do not assert gate dismissal.
- Card eligibility checked against the API sibling and product source; UI changes checked against design.md and the Notion Lexicon.
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: 1 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: 0 finding(s), titled "Copy now wrong". Every quoted passage was checked against the file.
Exact head: 93d217635f64 · Context: repo, product, design, sibling, lexicon · Took 6m
…ailed login The "Need to recover a Peanut account?" link sat on the first screen for everyone, new users included. Show it only after a Log in attempt fails: any login error, or a second dismissal of the passkey sheet (the drawer's existing "can't log in" signal). One dismissal or the silent automatic iOS attempt does not count.
…y residence Chip review: "isn't available in your state yet" promised issuance that product/card.md does not plan (Rain refuses 19 states, DC and the territories). Drop "yet" in en, es-419 and pt-BR. A verified US user with a pending residence change elsewhere can be refused by that change (strictest residence), so name the state only when every residence on file is US.
…ens the SDK Chip review: only the ordinary initiate branch closed the entry drawer, so for a restart-identity or fixable rejection the drawer stayed open under the Sumsub SDK and came back after it, and Add Money kept showing the document-request page instead of the amount step. The restart and fixable handlers now report whether they opened the SDK; both Manteca flows close the drawer on success and keep it, with the error, on a failed start. TASK-24163
There was a problem hiding this comment.
Chip review — no blocking findings — this is not an approval
One major finding remains: a Manteca progress handoff can leave its entry gate over the status modal.
Answered by a human, not raised again
These are still present as far as this review can tell. You resolved the thread or deferred the fix, so Chip does not repeat them. If one needs a follow-up, file the task yourself.
- MAJOR · src/components/AddMoney/components/MantecaAddMoneyFlow.tsx:468 · Close the Manteca gate when verification is already in progress
Checked clean
- Exact detached head, base merge diff, trusted PR metadata, and check runs at this SHA; some CodeQL analysis jobs were still in progress.
- P1 SDK-token restart and fixable paths now close the gate; new caller tests cover those paths.
- P2 is fixed: the state copy no longer promises future availability, and the state-specific branch requires every recorded residence to be US.
- Verified the no-token Manteca session response in the API sibling and the drawer/modal stacking in the UI and design rulebook.
- Reviewed Landing recovery-link change and its cancellation/error tests; no additional finding.
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: 0 finding(s), titled "Copy now wrong". Every quoted passage was checked against the file.
Exact head: 5d2bf070f79c · Context: repo, product, design, sibling, lexicon · Took 4m
…ogress Chip review: a start that finds verification already in progress opens the progress modal without the SDK, and the Manteca entry drawer stayed over it. Both Manteca flows now close the drawer whenever the status modal opens, whichever start handed off; a failed start keeps it with its error. TASK-24163
|
/chip review |
There was a problem hiding this comment.
Chip review — no blocking findings — this is not an approval
No PR-scoped findings at this head. The Manteca verification handoffs and US-state card copy address the supplied prior findings.
Checked clean
- Exact detached HEAD and trusted PR metadata match the requested head and base; reviewed the merge-base diff and the new four-file change.
- Manteca Add Money and Withdraw: successful SDK starts close the entry gate; in-progress no-token starts close it when the status modal opens; failed starts retain the gate and error.
- US-state card refusal copy in en, es-419, and pt-BR has no future-issuance promise; the state-specific copy requires only US residences on file.
- Design-system guidance checked for the changed UI; no new visual primitive or token drift in this commit.
- Exact-head CI check-runs, including guard, review, CodeQL, and JavaScript/TypeScript analysis, are successful.
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: 0 finding(s), titled "Copy now wrong". Every quoted passage was checked against the file.
Exact head: 7031dea827e3 · Context: repo, design, sibling, product, lexicon · Took 4m
…hose profile read failed c968603 (#4077, TASK-24856) treats any failed /users/me on /setup as "account unknown" and shows Something went wrong + Try again instead of the entry step. On web the readable jwt-token cookie is the only credential the API sees (apiFetch sends no cookies), so a visitor with no token is signed out whatever the request did. With the API down, offline, or absent (the press-contract harness) they never reached Welcome: press-contract timed out waiting for Sign up. profileFetchFailed now also requires mayHoldSession(): a web token, or any native app, where a legacy session can live in the OS cookie jar that JS cannot read (see api-fetch). Signed-in web sessions and every native case keep the TASK-24856 recovery screen.
|
Replaced by #4083. |
Why
Hotfix for the 12 Nov bad-session review and a support case.
/setuptreated a failed profile fetch as signed out. The signup email step repeated a request the API refuses without the protected replacement flow.geo-blockedcard is a state block. The drawer now says "your state".What changed
sentry.utils.ts,native-http.ts): one budget covers headers, the body and error telemetry. It drains a clone of the body, so callers still get an unread response. The native module import runs inside the deadline.useSumsubKycFlow.ts):/setup: a profile-fetch error is an unknown state with a retry, never the signup entry. Initialization retries once before the generic error screen.Retry-Afteris honoured, with no stacked immediate retries.ClosedRowDrawer.tsx): new keycardNotAvailableStateNotein en, es-419 and pt-BR. es-AR inherits es-419.Risks
code.Screenshots
Tests
Retry-After, hydration budget, stalled body, the KYC start deadline and late-result fence, Manteca errors, close refresh, and the US-state card copy.Deploy and follow-up
main→devafter merge (hotfix path).Pre-review rounds
Two independent adversarial reviews (Claude and Codex) ran before this PR went up for review, then a re-review of the fixes:
/setuprecovery applies only when no profile is loaded, and a successful recovery resumes the post-login routing.Retry-Afteris capped at 60 s.