[CP Staging] Fix bank account label not showing in search bar after reopen - #94987
Conversation
…g and buildSubstitutionsMap so reopen renders bank label not raw ID
|
@Eskalifer1 Please 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] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari2026-06-30.18.23.42.mov |
Eskalifer1
left a comment
There was a problem hiding this comment.
It seems like this is more of an edge case than a regression caused by the original PR (I'd even say it's hard to classify it as a regression specific to that PR).
This happened because a separate PR updated the SearchRouter logic by introducing an initial state for search. That PR was merged two days after the original PR with the bank account filter had already been approved. As part of that change, a new function call was added where bankAccountList wasn't passed, which introduced this issue.
Approved!
[CP Staging] Fix bank account label not showing in search bar after reopen (cherry picked from commit 32a22f9) (cherry-picked to staging by Beamanator)
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 JS00001 has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Cherry-picked to staging by https://github.com/Beamanator in version: 9.4.25-1 🚀
|
|
🚀 Deployed to production by https://github.com/cristipaval in version: 9.4.25-2 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Cherry-picked to staging by https://github.com/Beamanator in version: 9.4.26-0 🚀
|
|
🤖 Help site review: no changes required. This PR is a targeted bug fix, not a behavior or feature change. It adds a missing It restores the already-intended display behavior — it doesn't introduce, remove, or alter any documented feature, operator, or UI copy. Why no docs update
Since no help site changes are required, I did not create a draft PR. If you believe a documentation change is warranted, reply with the specific behavior you'd like documented and I'll draft it. @allgandalf, please confirm you agree no help site changes are needed here. |
|
🚀 Deployed to production by https://github.com/grgia in version: 9.4.27-2 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
on staging, after typing
bank-account:"Bank xx1111"and pressing Enter, reopening the search bar shows the raw bank-account ID (bank-account:9789681) instead of the label.root cause:
src/components/Search/SearchRouter/SearchRouter.tsxseeds the input on open by callingbuildUserReadableQueryStringandbuildSubstitutionsMapwithout passingbankAccountList. insideSearchQueryUtils.getDisplayValue, theBANK_ACCOUNTbranch looks upbankAccountList?.[filterValue]and falls back to the raw ID whenbankAccountListis undefined. adduseOnyx(ONYXKEYS.BANK_ACCOUNT_LIST)and pass it to both calls so the resolver finds the account and rendersBank xx<last4>.every other
buildUserReadableQueryStringcaller (SearchAutocompleteList, useSavedSearchTitles, SearchSavePage, etc) already passesbankAccountList. this site was missed.Fixed Issues
$ #94967
PROPOSAL: N/A (deploy blocker, no proposal required)
Tests
bank-account:.bank-account:"Bank xx<last4>"from the autocomplete suggestion.bank-account:"Bank xx<last4>"and does NOT change to the raw ID.Offline tests
Same as Tests. The fix uses an existing Onyx subscription that already runs offline.
QA Steps
Same as Tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)Avatar, 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