Repository navigation
Let users edit bank account nicknames in Wallet - #102366
Conversation
Co-authored-by: Shubham Agrawal <shubham1206agra@users.noreply.github.com>
|
I created this PR from an upstream branch since I don't have push access to your fork. To take ownership of this branch and be able to push updates, run: Then you can close this PR and open a new one from your fork. |
🦜 Polyglot Parrot! 🦜Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues: View the translation diffdiff --git a/src/languages/el.ts b/src/languages/el.ts
index 469c8f7e..a1715d8c 100644
--- a/src/languages/el.ts
+++ b/src/languages/el.ts
@@ -2752,7 +2752,7 @@ const translations: TranslationDeepObject<typeof en> = {
deleteConfirmation: 'Είστε βέβαιοι ότι θέλετε να διαγράψετε αυτόν τον λογαριασμό;',
editNickname: 'Επεξεργασία ψευδωνύμου',
nickname: 'Ψευδώνυμο',
- editNicknameInstruction: 'Δώστε στον τραπεζικό λογαριασμό ένα ψευδώνυμο που τον ξεχωρίζει από τους άλλους.',
+ editNicknameInstruction: 'Δώστε στον τραπεζικό λογαριασμό ένα ψευδώνυμο που να τον ξεχωρίζει από τους άλλους.',
deleteCard: 'Διαγραφή κάρτας',
deleteCardConfirmation:
'Όλες οι μη υποβληθείσες συναλλαγές κάρτας, συμπεριλαμβανομένων αυτών σε ανοικτές αναφορές, θα αφαιρεθούν. Είστε βέβαιοι ότι θέλετε να διαγράψετε αυτήν την κάρτα; Δεν μπορείτε να αναιρέσετε αυτήν την ενέργεια.',
diff --git a/src/languages/es.ts b/src/languages/es.ts
index 5b7320fc..19778fe6 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -2613,9 +2613,9 @@ const translations: TranslationDeepObject<typeof en> = {
setDefaultSuccess: 'Método de pago configurado',
deleteAccount: 'Eliminar cuenta',
deleteConfirmation: '¿Estás seguro de que quieres eliminar esta cuenta?',
- editNickname: 'Editar apodo',
- nickname: 'Apodo',
- editNicknameInstruction: 'Dale a la cuenta bancaria un apodo que la distinga de las demás.',
+ editNickname: 'Editar alias',
+ nickname: 'Alias',
+ editNicknameInstruction: 'Ponle a la cuenta bancaria un nombre que la distinga de las demás.',
deleteCard: 'Eliminar tarjeta',
deleteCardConfirmation:
'Todas las transacciones no enviadas, incluidas las de informes abiertos, serán eliminadas. ¿Estás seguro de que quieres eliminar esta tarjeta? Esta acción no se puede deshacer.',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 0bda4f41..7aba35b7 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -2703,9 +2703,9 @@ const translations: TranslationDeepObject<typeof en> = {
setDefaultSuccess: 'Mode de paiement par défaut défini !',
deleteAccount: 'Supprimer le compte',
deleteConfirmation: 'Voulez-vous vraiment supprimer ce compte ?',
- editNickname: 'Modifier le surnom',
- nickname: 'Surnom',
- editNicknameInstruction: 'Donnez au compte bancaire un surnom qui le distingue des autres.',
+ editNickname: 'Modifier le pseudo',
+ nickname: 'Pseudo',
+ editNicknameInstruction: 'Donnez à ce compte bancaire un surnom qui le distingue des autres.',
deleteCard: 'Supprimer la carte',
deleteCardConfirmation:
'Toutes les transactions de carte non soumises, y compris celles figurant sur les notes de frais ouvertes, seront supprimées. Êtes-vous sûr de vouloir supprimer cette carte ? Cette action est irréversible.',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index efd726e7..eaa62fd4 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -2688,8 +2688,8 @@ const translations: TranslationDeepObject<typeof en> = {
deleteAccount: 'Elimina account',
deleteConfirmation: 'Sei sicuro di voler eliminare questo account?',
editNickname: 'Modifica soprannome',
- nickname: 'Soprannome',
- editNicknameInstruction: 'Assegna al conto bancario un soprannome che lo distingua dagli altri.',
+ nickname: 'Nickname',
+ editNicknameInstruction: 'Dai al conto bancario un nome descrittivo che lo distingua dagli altri.',
deleteCard: 'Elimina carta',
deleteCardConfirmation:
'Tutte le transazioni con carta non inviate, incluse quelle nei report aperti, verranno rimosse. Sei sicuro di voler eliminare questa carta? Non puoi annullare questa azione.',
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 2d1b04ef..176a8d00 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -2672,7 +2672,7 @@ const translations: TranslationDeepObject<typeof en> = {
deleteConfirmation: 'このアカウントを本当に削除しますか?',
editNickname: 'ニックネームを編集',
nickname: 'ニックネーム',
- editNicknameInstruction: 'ほかの口座と区別できるニックネームを銀行口座に付けてください。',
+ editNicknameInstruction: 'ほかの口座と区別できるニックネームをこの銀行口座に付けてください。',
deleteCard: 'カードを削除',
deleteCardConfirmation: '未提出のカード取引(未提出レポート上の取引を含む)はすべて削除されます。このカードを本当に削除してもよろしいですか?この操作は元に戻せません。',
error: {
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 78209378..feeb6578 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -2691,7 +2691,7 @@ const translations: TranslationDeepObject<typeof en> = {
deleteConfirmation: 'Weet je zeker dat je deze account wilt verwijderen?',
editNickname: 'Bijnaam bewerken',
nickname: 'Bijnaam',
- editNicknameInstruction: 'Geef de bankrekening een bijnaam die hem onderscheidt van andere.',
+ editNicknameInstruction: 'Geef de bankrekening een bijnaam waardoor die zich onderscheidt van de andere.',
deleteCard: 'Kaart verwijderen',
deleteCardConfirmation:
'Alle niet-ingediende kaarttransacties, inclusief die op open rapporten, worden verwijderd. Weet je zeker dat je deze kaart wilt verwijderen? Je kunt deze actie niet ongedaan maken.',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 17b94d63..5ca731c3 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -2730,7 +2730,7 @@ const translations: TranslationDeepObject<typeof en> = {
deleteConfirmation: 'Czy na pewno chcesz usunąć to konto?',
editNickname: 'Edytuj pseudonim',
nickname: 'Pseudonim',
- editNicknameInstruction: 'Nadaj kontu bankowemu pseudonim, który odróżni je od innych.',
+ editNicknameInstruction: 'Nadaj temu rachunkowi bankowemu pseudonim, który odróżni go od innych.',
deleteCard: 'Usuń kartę',
deleteCardConfirmation:
'Wszystkie niewysłane transakcje z karty, w tym te na otwartych raportach, zostaną usunięte. Na pewno chcesz usunąć tę kartę? Tej czynności nie można cofnąć.',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index c56a1048..36d05414 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -2684,7 +2684,7 @@ const translations: TranslationDeepObject<typeof en> = {
deleteConfirmation: 'Tem certeza de que deseja excluir esta conta?',
editNickname: 'Editar apelido',
nickname: 'Apelido',
- editNicknameInstruction: 'Dê à conta bancária um apelido que a diferencie das outras.',
+ editNicknameInstruction: 'Dê um apelido para a conta bancária que a diferencie das outras.',
deleteCard: 'Excluir cartão',
deleteCardConfirmation:
'Todas as transações de cartão não enviadas, incluindo as de relatórios em aberto, serão removidas. Tem certeza de que deseja excluir este cartão? Essa ação não pode ser desfeita.',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 2c72b4cd..17a0d21e 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -2603,7 +2603,7 @@ const translations: TranslationDeepObject<typeof en> = {
deleteConfirmation: '确定要删除此账户吗?',
editNickname: '编辑昵称',
nickname: '昵称',
- editNicknameInstruction: '为银行账户设置一个昵称,以便与其他账户区分开来。',
+ editNicknameInstruction: '为此银行账户起一个昵称,以便与其他账户区分开来。',
deleteCard: '删除卡片',
deleteCardConfirmation: '所有未提交的银行卡交易(包括在未关闭报表中的交易)都将被移除。确定要删除此银行卡吗?此操作无法撤销。',
error: {
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
🤖 Web test steps verification results: The PR's Tests section is still a TODO, so these steps come from the PR description. The Wallet page loads and shows the Bank accounts section. But the test account has no bank account, and adding one requires an emailed security code before Plaid opens, so steps 2–7 (which need an OPEN bank account) could not be tested.
|
|
@shubham1206agra what's your ETA to put this in review? |
|
@MelvinBot Use #102366 (comment) for translations |
Co-authored-by: Shubham Agrawal <shubham1206agra@users.noreply.github.com>
|
I applied the Polyglot Parrot translations in c7d0f47. The commit updates the nickname strings in |
Bump again on this question, @shubham1206agra. |
|
@shubham1206agra let's work on this asap. |
|
@MelvinBot Merge main and fix conflicts |
…tNickname Co-authored-by: Shubham Agrawal <shubham1206agra@users.noreply.github.com> # Conflicts: # tests/actions/BankAccountsTest.ts
|
I merged The only conflict was in
All 12 tests in that file pass, and ESLint passes on it. |
|
The two failing Jest jobs are unrelated to this PR, so I didn't push a fix. Both are flaky tests that also fail on other PRs. Please rerun the failed jobs. ( Details
This PR only changes Wallet bank account files, navigation, language strings, and |
|
The failures haven't changed since my earlier analysis, so there's still nothing to push. The checks are still from the same CI run, and that run has the same two flaky Jest failures. Neither failure is in code this PR changes.
I can't rerun jobs from here. To clear them, open the failed run and click Re-run failed jobs. |
…Lint Co-authored-by: Shubham Agrawal <shubham1206agra@users.noreply.github.com>
|
I fixed the ESLint failure in 8bba738. The new page imported I couldn't run ESLint locally, so CI on the new commit is the first lint check. The Jest failures in |
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-10-08.at.1.56.32.PM.movScreen.Recording.2026-10-08.at.2.14.55.PM.movScreen.Recording.2026-10-08.at.2.31.45.PM.mov |
|
@MelvinBot Ready this PR for review |
|
@NicolasBonet All yours |
| if (newName !== bankAccount?.title) { | ||
| updateBankAccountName(bankAccountID, newName, bankAccount?.title); |
There was a problem hiding this comment.
When title is a masked account number, the input is prefilled with bankName (see defaultValue above), but this compares against title. So opening the page and pressing Save without changing anything sends UpdateBankAccount and permanently replaces the original name with the bank name.
We should compare against what the user actually saw:
| if (newName !== bankAccount?.title) { | |
| updateBankAccountName(bankAccountID, newName, bankAccount?.title); | |
| if (newName !== defaultValue) { | |
| updateBankAccountName(bankAccountID, newName, bankAccount?.title); |
A test for "submit without changes doesn't call the API" would be good to cover this.
There was a problem hiding this comment.
Fixed in 5e10f70. submit now compares against defaultValue, so pressing Save without changes doesn't call UpdateBankAccount. I added tests/ui/EditBankAccountNicknamePageTest.tsx, which covers that case for a masked-title account. It fails on the old comparison and passes with the fix.
| title: oldName, | ||
| accountData: {addressName: oldName}, |
There was a problem hiding this comment.
If oldName is undefined (e.g. title was never set), Onyx merge ignores undefined values, so this failure data won't roll anything back and the optimistic name stays even though the request failed.
Can we fall back to null so the optimistic value is always cleared?
| title: oldName, | |
| accountData: {addressName: oldName}, | |
| title: oldName ?? null, | |
| accountData: {addressName: oldName ?? null}, |
There was a problem hiding this comment.
Fixed in 5e10f70. failureData now uses oldName ?? null for both title and accountData.addressName, so a failed rename always clears the optimistic name. I added an action test for the case where there's no previous name.
|
@MelvinBot Address #102366 (comment) and #102366 (comment) |
Compare the submitted nickname with the prefilled value so saving without edits no longer replaces a masked-title account's name with the bank name. Fall back to null in failureData so Onyx clears the optimistic name when there was no previous one. Co-authored-by: Shubham Agrawal <shubham1206agra@users.noreply.github.com>
|
@shubham1206agra @NicolasBonet One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
I fixed both review comments and pushed the changes in 5e10f70:
I added tests for both cases, including a new |
|
MelvinBot has made 5 consecutive commits trying to fix CI failures. Automatic CI fix dispatches are now paused for this PR. Next steps: A human should review the recent commits and resolve the conflicting CI errors manually. |
When suggesting code please apply the suggestions so the commits are properly attributed. |
|
🚧 NicolasBonet has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
Both comments were already addressed in 5e10f70, and that commit merged with this PR. I made no new changes.
Your suggestions were applied as typed code, not as GitHub suggestions, so that commit doesn't credit you. Changing that would mean rewriting merged history, so I left it as is. |
|
🚀 Deployed to staging by https://github.com/NicolasBonet in version: 9.5.6-0 🚀
|
|
A help site update is needed, so I opened a draft PR: Docs updates for E/A#102366 Explain how to edit a bank account nickname. Why: This PR adds a new user-facing feature. All users now see Edit nickname in the three dots (⋮) menu on open bank accounts in Account > Wallet > Bank accounts. No beta gates it. Change: In Connect a Personal Bank Account, I added one sentence to the existing FAQ "Can I add more than one personal bank account?". The sentence explains how to give an account a nickname. I also added two keywords. There are no new sections or FAQs. @shubham1206agra, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
|
Any QA steps here? |
|
Deploy Blocker #103538 was identified to be related to this PR. |
|
@IuliiaHerets here are QA steps: QA StepsPrereqs: An account with a personal bank account and an open business bank account in Wallet.
|
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.5.6-6 🚀
Bundle Size Analysis (Sentry): |






Explanation of Change
Lets users rename (nickname) an open bank account from Wallet, so they can tell apart accounts with similar last digits. Classic already supports this by editing
addressName, and NewDot already shows that value as the bank account row title — it just had no way to edit it.OPEN(same rule as Classic) and covers personal and business accounts. Locked accounts get the existing locked-account modal.EditBankAccountNicknamePagemirrorsPersonalCardEditNamePage. The field is prefilled with the name shown on the Wallet row, can't be empty, and usesCONST.STANDARD_LENGTH_LIMIT. It works offline. Opening the route for a missing or non-open account shows the not-found page.UpdateBankAccountwrite command with{bankAccountID, addressName}, as confirmed on the issue. No new backend work.updateBankAccountNameoptimistically sets bothtitle(what the Wallet row renders) andaccountData.addressName(what other screens read), marks the row pending, and on failure restores the old name with a dismissible error on the row.walletPage.editNickname,walletPage.nickname, andwalletPage.editNicknameInstructionstrings in all locales.AI tests run locally:
npm test -- tests/actions/BankAccountsTest.ts(new optimistic/success/failure tests pass),npm run typecheck,npm run lint-changed,npm run spell-changed,npm run fmt, and the React Compiler check on the two changed components all pass. An automated web test could not run because the test session showed a blank page before sign-in finished, so the UI flow is not yet verified in a browser.Note: some workspace screens use
addressNameas the bank name for the icon and as the label for the settlement account. After a rename they show the nickname and a generic bank icon. This already happens today when someone renames in Classic.Fixed Issues
$ #101251
PROPOSAL: #101251 (comment)
Tests
// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review"
// Please describe what tests you performed that validates your changed worked.
Offline tests
QA Steps
// TODO: The human co-author must fill out the QA tests you ran before marking this PR as "ready for review".
// Please describe what QA needs to do to validate your changes and what areas do they need to test for regressions.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari