Skip to content

fix: release 168 smoke-test fixes (TASK-24947) - #4116

Merged
abalinda merged 3 commits into
devfrom
fix/TASK-24947-release-168-smoke
Nov 16, 2026
Merged

abalinda merged 3 commits into
devfrom
fix/TASK-24947-release-168-smoke

Conversation

@abalinda

@abalinda abalinda commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes found on staging during the release 168 smoke test of BRL on Avenia (real money, 16 Nov). One commit per finding; later findings join this PR. Pairs with the API PR of the same branch name.

  1. A Pix deposit Avenia gave back reads "Returned", with the reason. A deposit paid from an account Avenia does not accept ended as "Adding by Pix / Failed" with no reason, while the deposit screen said "Pix returned. Pay again from an account under your CPF." The Activity row, the receipt drawer, the receipt page and the PDF now read "Returned", and the receipt carries the deposit screen's own sentence (same copy key) when the API states a third-party reason, or "The bank sent this payment back." for any other reason. The state comes from the API's public extraData.pixReturned flag, so the shared receipt and the anonymous PDF read "Returned" too; the CPF sentence shows only to the owner (returnReason is owner only) and anyone else reads the general line. An entry without the flag reads "Failed" as before, and a lapsed code stays "Cancelled".

The dollar amount on that receipt ("$22" for a R$22 deposit) is an API defect and is fixed in the API PR; the app needs no change for it.

Screens (fixtures, 375×667, English)

Returned Pix deposit: receipt Returned Pix deposit: Activity row

The dollar figure in the fixture is the quoted USD (the API PR's fix), not the reais.

Task

TASK-24947 "BRL on Avenia: Pix for residents and non-residents, Manteca BRL off": https://www.notion.so/418838117579816c870fc7b38beddc5b

Risks

  • Display only. No money path, no request to the API changes.
  • Needs the API PR for the new reading to appear: until the API sends pixReturned on a returned Avenia deposit, the receipt reads "Failed" as today. Either order of release is safe.
  • The PDF's status row prints "Returned" for every returned deposit (it printed "Refunded" for a returned bank deposit), as the screen already does.

QA

  • Local gate on 3a4b06997: typecheck, eslint, prettier, ds-lint, the word budget and the screen tests pass; the touched suites pass. pix-deposit-returned.test.tsx has 11 tests over the owner and the anonymous paths (drawer, Activity row, shared receipt, PDF). The full unit suite was not re-run locally after the second commit: CI is the proof.
  • api.openapi.json is refreshed from the API branch's head b6cb9e67d (one field: pixReturned).
  • Two new Screen Library states: pix-deposit-receipt-returned, pix-deposit-returned-row. No copy key is added; the reused sentence adds 8 words to the receipt screens' budget.
  • Not checked against the real API yet: fixtures only. To check on staging after both PRs deploy: open the returned R$22 deposit in Activity.

…the deposit screen's reason

Smoke test, release 168: a R$22 Pix paid from an account not under the
user's CPF was sent back by Avenia. The deposit screen said why ("Pay again
from an account under your CPF."); the Activity receipt read "Failed" with no
reason.

The API marks such a deposit with the existing extraData.returnReason (owner
only) and keeps the wire status FAILED. A Pix deposit that is FAILED and
carries returnReason now reads as a returned deposit, as returned bank
deposits do: "Returned" on the badge, the date row and the PDF status,
"Returned to sender" on the Activity row, and the reason line. For
third_party it is the deposit screen's own sentence (one string for both),
for other the general line. Nothing was converted, so the receipt keeps the
"≈ BRL 22" estimate and no rate or fee rows. An entry without returnReason
reads as before, and a lapsed code stays Cancelled.

The PDF status row now prints "Returned" for every returned deposit, as the
screen does; it printed "Refunded" for a returned bank deposit too. Two
Screen Library states show the returned receipt and its Activity row. The
receipt screens' word budget grows by the reused sentence (+8); no screen
shows more words than before.
@vercel

vercel Bot commented Nov 16, 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 Nov 16, 2026 2:31pm UTC

Request Review

@notion-workspace

Copy link
Copy Markdown

@abalinda

Copy link
Copy Markdown
Contributor Author

/chip review

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Code-analysis diff

Painscore total: 11100.96 → 11092.56 (-8.4)
Findings: 0 net (+661 new, -661 resolved)

🆕 New findings (661)

  • critical complexity — src/components/TransactionDetails/transactionTransformer.ts — CC 166, MI 41.64, SLOC 389
  • critical complexity — src/dev/fixtures/registry.ts — CC 90, MI 31.63, SLOC 5643
  • critical method-complexity — src/components/TransactionDetails/transactionTransformer.ts:586 — mapTransactionDataForDrawer CC 83 SLOC 209
  • critical complexity — src/utils/history.utils.ts — CC 65, MI 50.54, SLOC 212
  • critical complexity — src/components/TransactionDetails/TransactionDetailsReceipt.tsx — CC 53, MI 43.72, SLOC 102
  • high hotspot — src/dev/fixtures/registry.ts — 230 commits, +8114/-2050 lines since 6 months ago
  • high structural-dup — types/api.generated.ts:9293 — 190 duplicate lines / 581 tokens with types/api.generated.ts:10630
  • high hotspot — src/types/api.generated.ts — 185 commits, +33481/-19407 lines since 6 months ago
  • high structural-dup — types/api.generated.ts:8678 — 171 duplicate lines / 542 tokens with types/api.generated.ts:9765
  • high structural-dup — types/api.generated.ts:9120 — 171 duplicate lines / 558 tokens with types/api.generated.ts:10457
  • high structural-dup — types/api.generated.ts:16167 — 170 duplicate lines / 831 tokens with types/api.generated.ts:19823
  • high structural-dup — types/api.generated.ts:8919 — 156 duplicate lines / 487 tokens with types/api.generated.ts:10011
  • high structural-dup — types/api.generated.ts:8106 — 150 duplicate lines / 482 tokens with types/api.generated.ts:9141
  • high structural-dup — types/api.generated.ts:7913 — 148 duplicate lines / 470 tokens with types/api.generated.ts:8701
  • high structural-dup — types/api.generated.ts:9139 — 144 duplicate lines / 447 tokens with types/api.generated.ts:10259
  • high structural-dup — types/api.generated.ts:7913 — 142 duplicate lines / 443 tokens with types/api.generated.ts:8106
  • high structural-dup — types/api.generated.ts:8106 — 142 duplicate lines / 445 tokens with types/api.generated.ts:8414
  • high structural-dup — types/api.generated.ts:8106 — 142 duplicate lines / 445 tokens with types/api.generated.ts:8927
  • high structural-dup — types/api.generated.ts:9141 — 142 duplicate lines / 446 tokens with types/api.generated.ts:9335
  • high structural-dup — types/api.generated.ts:13067 — 134 duplicate lines / 447 tokens with types/api.generated.ts:13438

…and 641 more.

✅ Resolved (661)

  • src/components/TransactionDetails/transactionTransformer.ts — CC 162, MI 41.73, SLOC 387
  • src/dev/fixtures/registry.ts — CC 90, MI 31.7, SLOC 5610
  • src/components/TransactionDetails/transactionTransformer.ts:582 — mapTransactionDataForDrawer CC 79 SLOC 207
  • src/utils/history.utils.ts — CC 65, MI 50.55, SLOC 212
  • src/components/TransactionDetails/TransactionDetailsReceipt.tsx — CC 51, MI 44.19, SLOC 98
  • src/dev/fixtures/registry.ts — 228 commits, +8074/-2049 lines since 6 months ago
  • types/api.generated.ts:9288 — 190 duplicate lines / 581 tokens with types/api.generated.ts:10625
  • src/types/api.generated.ts — 184 commits, +33476/-19407 lines since 6 months ago
  • types/api.generated.ts:8673 — 171 duplicate lines / 542 tokens with types/api.generated.ts:9760
  • types/api.generated.ts:9115 — 171 duplicate lines / 558 tokens with types/api.generated.ts:10452
  • types/api.generated.ts:16162 — 170 duplicate lines / 831 tokens with types/api.generated.ts:19818
  • types/api.generated.ts:8914 — 156 duplicate lines / 487 tokens with types/api.generated.ts:10006
  • types/api.generated.ts:8101 — 150 duplicate lines / 482 tokens with types/api.generated.ts:9136
  • types/api.generated.ts:7908 — 148 duplicate lines / 470 tokens with types/api.generated.ts:8696
  • types/api.generated.ts:9134 — 144 duplicate lines / 447 tokens with types/api.generated.ts:10254
  • types/api.generated.ts:7908 — 142 duplicate lines / 443 tokens with types/api.generated.ts:8101
  • types/api.generated.ts:8101 — 142 duplicate lines / 445 tokens with types/api.generated.ts:8409
  • types/api.generated.ts:8101 — 142 duplicate lines / 445 tokens with types/api.generated.ts:8922
  • types/api.generated.ts:9136 — 142 duplicate lines / 446 tokens with types/api.generated.ts:9330
  • types/api.generated.ts:13062 — 134 duplicate lines / 447 tokens with types/api.generated.ts:13433

…and 641 more.

@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

Returned Pix deposits are shown correctly to the owner, but a shared receipt still reports Failed.

Findings

  • MAJOR · src/components/TransactionDetails/transactionTransformer.ts:693 · Shared returned Pix receipts still say Failed
    For a FAILED Avenia ONRAMP with a failed ticket, the paired API change sends returnReason only to the owner. An anonymous viewer of its shareable receipt receives the public projection, which retains status=FAILED but strips returnReason. This new branch therefore leaves the shared receipt page and anonymous PDF at Failed while the owner’s Activity and receipt say Returned. Preserve the private reason, but expose a public-safe returned-state marker (or equivalent status) in the paired API projection and use it here; cover both owner and anonymous receipt/PDF paths.

Checked clean

  • Exact head and merge base verified; trusted PR metadata matched the supplied author and dev base.
  • Traced returned status, reason copy, conversion estimate, Activity row, owner receipt and PDF through the changed code and tests.
  • Checked the paired API PR projection: owner-only returnReason is added for failed Avenia tickets, while public receipts retain FAILED and omit that field.
  • Design status-words rule requires Returned for money sent back; the Notion Lexicon has no more specific returned-deposit term.
  • Head CI had no observed failures; unit, i18n-overflow, press-contract, seo-contract, native-export and preview checks were still running when checked.

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: 0 finding(s), titled "Copy now wrong". Every quoted passage was checked against the file.

Exact head: 47eb4f43de0f · Context: repo, design, product, paired-api-pr · Took 4m

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

🧪 UI test report — ✅ all green

Suites

  • ✅ unit: 21960 ran, 0 failed, 0 skipped, 11.4m

📊 Coverage (unit)

metric %
statements 88.6%
branches 81.9%
functions 82.8%
lines 90.1%
⏱ 10 slowest test cases
time test
🐢 31.6s scripts/__tests__/screens-adapter.test.js › runs the existing synthetic screen adapter Node acceptance suite
🐢 20.2s src/features/deposit-accounts/__tests__/AddMoneyArgentinaCountry.acceptance.test.tsx › keeps unavailable Argentina searchable and opens its residence explanation with pointer
🐢 19.8s src/features/deposit-accounts/__tests__/AddMoneyArgentinaCountry.acceptance.test.tsx › keeps unavailable Argentina searchable and opens its residence explanation with Enter
🐢 17.6s src/features/deposit-accounts/__tests__/AddMoneyArgentinaCountry.acceptance.test.tsx › keeps unavailable Argentina searchable and opens its residence explanation with Space
🐢 10.5s src/features/deposit-accounts/__tests__/AddMoneyArgentinaCountry.acceptance.test.tsx › preserves ordinary Argentina selection for residence null
🐢 10.0s src/features/deposit-accounts/__tests__/AddMoneyArgentinaCountry.acceptance.test.tsx › preserves ordinary Argentina selection for residence AR
🐢 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
🐢 7.8s scripts/__tests__/signup-attribution-paths.test.ts › includes newly published articles and locale fallbacks without editing the manifest
🐢 6.7s scripts/__tests__/indexable-urls.test.ts › excludes missing locale files, drafts, redirects, and retired pages from crawl and submission lists
4.3s src/components/Card/share-asset/__tests__/shareAssetLayout.test.ts › never places two stickers in heavy overlap (broad seed sweep)
📍 Inline annotations are in the **Unit test report** check above. Coverage artifact: `coverage-unit`. Generated by `.github/workflows/tests.yml`.

…receipt too

Chip on ui#4116: the returned state came from returnReason, which the API
sends to the owner only, so the shared receipt and the anonymous PDF of the
same deposit still read "Failed" while the owner read "Returned".

The state is public now and the reason stays private: a FAILED Pix deposit
reads as returned when extraData.pixReturned is true, for every viewer.
The reason line is the deposit screen's CPF sentence only for the owner's
third_party reason, and the general line otherwise. The shared receipt
layout never prints the CPF sentence, even if a reason reached it, because
it speaks to the payer. An entry without the flag reads "Failed" as before,
whatever returnReason says.
…b6cb9e67d

GET /history/:entryId extraData gains pixReturned (true only on a Pix
deposit the provider gave back, to every viewer). Nothing else differs from
b0d06b9af, the snapshot's previous source.
@abalinda
abalinda marked this pull request as ready for review November 16, 2026 15:36
Copilot AI balanced review requested due to automatic review settings November 16, 2026 15:36
@abalinda
abalinda merged commit 82314be into dev Nov 16, 2026
49 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@github-actions

Copy link
Copy Markdown
Contributor

English

Open screen library dashboard

After merge: 664fc11 → 82314be. Reviewable capture in English; newly registered states are marked in the report.

Before was captured with the base branch's own synthetic API because this PR changes it; differences can include synthetic-data changes.

This branch was successfully deployed

1 active deployment
Preview — 3a4b0699 Deployed Nov 16, 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.

2 participants