Skip to content

feat(spend): tell the user a second passkey sheet follows on a mixed spend - #2965

Merged
innolope-dev merged 1 commit into
devfrom
feat/mixed-spend-second-sheet-copy
Sep 3, 2026
Merged

innolope-dev merged 1 commit into
devfrom
feat/mixed-spend-second-sheet-copy

Conversation

@innolope-dev

Copy link
Copy Markdown
Collaborator

Why

Ceremony telemetry shows the mixed spend's second sheet (the UserOp, ~1.5 s after the Rain admin signature) is the one that gets dismissed: Android NotAllowedError and iOS LOGIN_CANCELED both cluster at that gap, and the retry then costs four sheets. The overlay between the two taps said only "Verifying security…", which reads as "done". The data cannot tell whether the user or the OS dismisses it; the copy fix covers the first, the one-tap path (#2959) removes the sheet altogether.

What

  • ModalsContext.setIsSecurityVerificationOpen(open, variant?) — 'next-passkey' swaps the overlay copy to "Verifying security… one more passkey confirmation comes next".
  • useSpendBundle passes it before tap Fetch Chain details from SDK #2.
  • useSignSpendBundle (QR pay, Manteca withdraw, card lock/cancel, return-excess) showed no overlay at all between its two taps; it now shows the same beat, closed in a finally.
  • Copy in en, es-419, pt-BR; es-AR inherits es-419.

No change to signing or ordering. Stopgap until #2959 lands.

Verification

  • pnpm typecheck clean; ModalsContext, useSignSpendBundle, useSendMoney and all i18n suites green; prettier clean.

…spend

Ceremony telemetry shows the mixed spend's second sheet (the UserOp, 1.5 s
after the Rain admin signature) is the one that gets dismissed: Android
NotAllowedError and iOS LOGIN_CANCELED both cluster at that gap, and the
retry then costs four sheets. The overlay between the two taps said only
"Verifying security…", which reads as "done".

- ModalsContext: the overlay takes a variant; 'next-passkey' swaps the copy.
- useSpendBundle passes it before tap #2. useSignSpendBundle showed no
  overlay at all between its two taps; it now shows the same beat.
- en / es-419 / pt-BR copy (es-AR inherits es-419).

Stopgap until the one-tap path (ui#2959) removes the second sheet.
@vercel

vercel Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
peanut-wallet Ready Ready Preview Sep 3, 2026 7:42pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 29fffe18-d680-48c8-b7be-6f0cf6735b22

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Code-analysis diff

Painscore total: 7096.21 → 7097.33 (+1.12)
Findings: 0 net (+11 new, -11 resolved)

🆕 New findings (11)

  • high complexity — src/hooks/wallet/useSpendBundle.ts — CC 25, MI 48.28, SLOC 275
  • high complexity — src/hooks/wallet/useSignSpendBundle.ts — CC 13, MI 47.88, SLOC 193
  • medium high-mdd — src/hooks/wallet/useSignSpendBundle.ts:105 — useSignSpendBundle: MDD 60.0 (uses across many lines from declarations)
  • medium high-mdd — src/context/ModalsContext.tsx:43 — ModalsProvider: MDD 49.0 (uses across many lines from declarations)
  • medium high-mdd — src/hooks/wallet/useSignSpendBundle.ts:115 — : MDD 48.2 (uses across many lines from declarations)
  • medium complexity — src/context/ModalsContext.tsx — CC 10, MI 61.96, SLOC 71
  • low high-dlt — src/hooks/wallet/useSignSpendBundle.ts:105 — useSignSpendBundle: DLT 26 (calls 26 distinct functions — high context load)
  • low high-dlt — src/hooks/wallet/useSignSpendBundle.ts:115 — : DLT 18 (calls 18 distinct functions — high context load)
  • low high-mdd — src/components/Global/SecurityVerificationOverlay/index.tsx:19 — SecurityVerificationOverlay: MDD 12.0 (uses across many lines from declarations)
  • low missing-return-type — src/context/ModalsContext.tsx:43 — ModalsProvider: exported fn missing return type annotation
  • low missing-return-type — src/context/ModalsContext.tsx:144 — useModalsContext: exported fn missing return type annotation

✅ Resolved (11)

  • src/hooks/wallet/useSpendBundle.ts — CC 25, MI 48.27, SLOC 275
  • src/hooks/wallet/useSignSpendBundle.ts — CC 13, MI 48.23, SLOC 189
  • src/hooks/wallet/useSignSpendBundle.ts:105 — useSignSpendBundle: MDD 54.7 (uses across many lines from declarations)
  • src/hooks/wallet/useSignSpendBundle.ts:115 — : MDD 46.7 (uses across many lines from declarations)
  • src/context/ModalsContext.tsx:39 — ModalsProvider: MDD 40.8 (uses across many lines from declarations)
  • src/context/ModalsContext.tsx — CC 9, MI 63.05, SLOC 59
  • src/hooks/wallet/useSignSpendBundle.ts:105 — useSignSpendBundle: DLT 25 (calls 25 distinct functions — high context load)
  • src/hooks/wallet/useSignSpendBundle.ts:115 — : DLT 17 (calls 17 distinct functions — high context load)
  • src/components/Global/SecurityVerificationOverlay/index.tsx:19 — SecurityVerificationOverlay: MDD 10.0 (uses across many lines from declarations)
  • src/context/ModalsContext.tsx:39 — ModalsProvider: exported fn missing return type annotation
  • src/context/ModalsContext.tsx:127 — useModalsContext: exported fn missing return type annotation

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

🧪 UI test report — ✅ all green

Suites

  • ✅ unit: 5635 ran, 0 failed, 0 skipped, 1.8m

📊 Coverage (unit)

metric %
statements 74.1%
branches 59.5%
functions 67.7%
lines 75.0%
⏱ 10 slowest test cases
time test
🐢 9.0s src/app/(mobile-ui)/qr-pay/__tests__/qr-pay-states.test.tsx › Network failure keeps loading while retries remain, then shows the generic error
4.0s src/app/(mobile-ui)/qr-pay/__tests__/qr-pay-states.test.tsx › MANTECA_SOURCE_OVER_MONTHLY_CAP fails fast with copy that names the real cause
4.0s src/app/(mobile-ui)/qr-pay/__tests__/qr-pay-states.test.tsx › User KYC not approved fails fast with copy that names the real cause
4.0s src/app/(mobile-ui)/qr-pay/__tests__/qr-pay-states.test.tsx › MANTECA_MERCHANT_VOLUME_NEAR_CAP fails fast with copy that names the real cause
4.0s src/app/(mobile-ui)/qr-pay/__tests__/qr-pay-states.test.tsx › MANTECA_MERCHANT_RECENT_REFUND fails fast with copy that names the real cause
4.0s src/app/(mobile-ui)/qr-pay/__tests__/qr-pay-states.test.tsx › MANTECA_USER_NOT_PROVISIONED fails fast with copy that names the real cause
4.0s src/app/(mobile-ui)/qr-pay/__tests__/qr-pay-states.test.tsx › a refused idempotency key tells the user to scan again, not to contact support
4.0s src/app/(mobile-ui)/qr-pay/__tests__/qr-pay-states.test.tsx › routes the KYC rejection on its wire code, and does not retry it
3.4s src/components/Card/share-asset/__tests__/shareAssetLayout.test.ts › never places two stickers in heavy overlap (broad seed sweep)
3.0s src/app/(mobile-ui)/qr-pay/__tests__/qr-pay-states.test.tsx › Going offline blames the connection, and reconnecting clears it for the recovered scan
📍 Inline annotations are in the **Unit test report** check above. Coverage artifact: `coverage-unit`. Generated by `.github/workflows/tests.yml`.

@chip-peanut-bot chip-peanut-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chip review — no blocking findings — this is not an approval

The overlay variant is propagated atomically, used only for mixed-spend second-passkey paths, and reset on both success and failure without changing signing or transaction ordering.

Checked clean

  • Confirmed the detached worktree head, supplied base SHA, merge base, trusted author, and dev target.
  • Reviewed the ModalsContext state/API change and all security-verification overlay call sites for stale variants, cleanup failures, and regressions to default copy.
  • Reviewed both mixed-spend signing paths and verified the overlay wraps only the existing second UserOp signature while finally blocks close it on rejection.
  • Verified en, es-419, and pt-BR catalogs parse and that es-AR inherits the es-419 key through the existing resolved-catalog tests.
  • Exact-head typecheck, lint, format, unit, native-export, and policy checks passed; visual snapshots and preview deployment were still running at review time.
  • Focused local tests were unavailable because the detached worktree has no installed dependencies; diff validation and catalog parsing passed locally.

Security review: did not run — this change has no security, privacy or money surface, so it was not asked. This review is one reviewer short.

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.

Exact head: 4ac0b0f13c35 · Context: repo · Took 5m

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

🖼 Visual diff — 2 screens moved

3 of 66 shots changed · 63 identical · baseline f05e3d2 → head 4ac0b0f

worst % screen widths
3.86% avatar-picker 320, 430
2.69% profile 320

job summary · before/after/diff images — artifact

Fixture screenshots, no backend. Advisory — this check never blocks a merge. Posted from the default branch by ds-shots-comment.yml; the report it renders is untrusted data.

@innolope-dev
innolope-dev merged commit 21d02cd into dev Sep 3, 2026
23 of 24 checks passed

This branch was successfully deployed

1 active deployment
Preview — 4ac0b0f1 Deployed Sep 3, 2026 by vercel[bot]
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