Repository navigation
Fix Amount filter being multiplied by 100x when using the global search box - #99313
Conversation
Co-authored-by: Yauheni Horbach <ZhenjaHorbach@users.noreply.github.com>
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
🤖 I couldn't complete the testing steps on Web — the run was blocked by an environmental issue, not by the fix itself. What happened: The fresh test account landed in Expensify's Test Drive onboarding overlay while navigating to Spend > Expenses. That overlay is full-screen and its only actions are "Get started" and "Go to Expensify" — there's no safe dismiss control, and both actions risk navigating the session off the app unrecoverably. Per the tester's safety rules I stopped rather than click either, so I never reached the Filters UI to set the Amount filter and exercise the global search box. What was confirmed:
The Amount-filter behavior (stays $500 vs. multiplied to $50,000) and the JS-console check could not be verified. Recommendation: This needs a re-run on a session that doesn't hit the Test Drive onboarding (e.g. an account with an existing workspace/expenses, or one where the onboarding is already dismissed). The promo card and Test Drive empty-state sit close to the Filters controls on fresh accounts, which is what blocked this attempt. ScreenshotsUploaded as evidence in a separate comment: the Expenses view with the Filters button, the Test Drive overlay that blocked the session, and confirmation the overlay had no safe dismiss control. |
|
🤖 Android test: ✅ PASS — the Amount filter is no longer multiplied by 100x when using the global search box. Ran the testing steps on standalone Android NewDot against branch
No console errors observed during the flow.
Screenshots are attached in a separate comment. |
|
@MelvinBot |
|
🤖 Conflicts resolved and merged One conflicting file: const updatedQuery = getQueryWithUpdatedValues(queryWithContext, true, policies);
|
|
@MelvinBot |
|
@ZhenjaHorbach 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] |
|
🤖 Done — this PR is now marked Ready for review (draft status removed). |
|
Nothing to fix in code — all CI checks pass. The only red check is Check independent approval, and that isn't a code failure. It fails because the PR has no reviews yet ( Check status
Note: |
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp2026-08-28.14.07.02.movAndroid: mWeb Chrome2026-08-28.14.07.02.moviOS: HybridApp2026-08-28.14.04.06.moviOS: mWeb Safari2026-08-28.14.05.21.movMacOS: Chrome / Safari2026-08-28.14.03.34.mov |
|
@MelvinBot Explanation of ChangeThe Amount filter on the Spend > Expenses page was being multiplied by 100 every time a keyword was added to or cleared from the global Search box. Amount filters are stored in the query in backend cents (e.g. This PR passes Fixed Issues$ #99071 Tests
Offline testsSame as tests. QA Steps
PR Author Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / Safari |
|
🤖 Done — I've updated the PR description with the content you provided. |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #99071 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
|
LGTM! |
|
🚧 mjasikowski 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! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/mjasikowski in version: 9.4.64-0 🚀
|
|
🤖 No help site changes required. I did not create a draft PR. This PR is a one-line bug fix: it stops the Amount filter on Spend > Expenses from being multiplied by 100 when a keyword is added to or cleared from the global search box. It restores the filter to show the value the user actually entered. Because it only corrects buggy behavior — adding no feature and changing no UI label, tab, or documented workflow — there is nothing in
|
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.4.64-3 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
The Amount filter on the Spend > Expenses page was being multiplied by 100 every time a keyword was added to or cleared from the global Search box.
Amount filters are stored in the query in backend cents (e.g.
$500→amount>50000). When the global search box submits,SearchPageInput.submitSearchrebuilds the query viagetKeywordQueryWithCurrentSearchContext— which preserves those amounts in cents — and then calledgetQueryWithUpdatedValues(queryWithContext)without theshouldSkipAmountConversionflag. That flag defaults tofalse, sogetUpdatedFilterValueranconvertToBackendAmount(× 100) on a value that was already in cents (50000 → 5,000,000), which displays as$50,000. Every keyword add/clear multiplied it by 100 again.This PR passes
trueas the second argument togetQueryWithUpdatedValues, sincequeryWithContextis derived from the currentqueryJSONwhose amounts are already in backend cents. This matches how the siblingSearchRoutercomponent already threadsshouldSkipAmountConversionthrough for the same reason.Fixed Issues
$ #99071
PROPOSAL: #99071 (comment)
Tests
Offline tests
Same as tests.
QA Steps
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