Skip to content

[Due for payment 2026-07-03] [Due for payment 2026-07-02] After selecting group, total spend currency resets to default, currency button disappears #94512

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.4.19-1
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #90777
Email or phone of affected tester (no customers): sdjnoisdjdosijsonssjo@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Search

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create an expense.
  4. Go to Spend > Cash accruals.
  5. Click on the currency on the footer.
  6. Select AUD and apply.
  7. Select the expense group via checkbox.

Expected Result:

After selecting expense group, total spend currency will not change.
Currency dropdown button will not disappear.

Actual Result:

After selecting expense group, total spend currency changes to default currency.
Currency dropdown button disappears.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome Safari

Screenshots/Videos

Bug7190157_1782331563365.6.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Mita Rachim
Bug ID: 7190157

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jun 24, 2026
  2. applause-bot commented on Jun 24, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/96a12116ccd911f81f752048644262a6862c75115ff67dc92bbd1f3c7b627eec

  3. melvin-bot commented on Jun 24, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #90777

  4. melvin-bot commented on Jun 24, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  5. github-actions commented on Jun 24, 2026

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  6. MelvinBot commented on Jun 24, 2026

    @MelvinBot
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    After picking a custom "Total spend" currency (e.g. AUD) in the Search footer and then selecting an expense group via checkbox, the total reverts to the default currency and the currency dropdown button disappears.

    What is the root cause of that problem?

    The footer currency is held only in local component state in SearchSelectionFooter (not Onyx, not the search query). Selecting a group flips hasSelectedGroup to true, which triggers two intentional code paths added in #90777:

    1. The currency is wiped during render. shouldResetCustomCurrencyForGroupSelection = hasSelectedGroup && !!selectedCurrency is true, so the render-phase setFooterCurrencyState(...) resets selectedCurrency to undefined. The total then falls back to the default currency.

    2. The dropdown is hidden. shouldAllowFooterCurrencyChange returns false immediately when a group is selected. With shouldAllowCurrencyChange=false, SearchPageFooter renders a plain <Text> total instead of the FilterPopupButton — so the button vanishes.

    The underlying technical reason: currency-converted totals come from an auxiliary "flat" snapshot built without group-by (buildFlatQueryWithoutGroupBy), so group rows have no converted amount and can't be shown in the selected currency client-side. The current code handles that by silently zeroing the selection and removing the control.

    What changes do you think we should make in order to solve the problem?

    The behavior is by design, but the UX is poor: the user's choice is silently dropped and the control disappears with no explanation. Minimal fix to match the expected result:

    • Stop discarding the user's currency. Remove the group branch from the reset so selectedCurrency is preserved in state while a group is selected (drop shouldResetCustomCurrencyForGroupSelection from SearchSelectionFooter.tsx:147/157-164). The total can still display in the default currency for group selections via the footerData logic, but deselecting the group then restores the chosen currency instead of losing it.
    • Decide the dropdown's fate (product call). The reported "expected result" is that the dropdown does not disappear. Either keep the button visible but disabled (clearer than removing it), or leave it hidden — but this needs a Contributor+/design decision since group totals genuinely can't be converted client-side from the current snapshot.

    What alternative solutions did you explore?

    • Persisting the selected currency in the search query / Onyx so it survives unmount — heavier than needed; the regression is purely the render-phase reset.
    • Building a group-aware converted snapshot so group totals can be shown in the target currency — larger feature work, not a deploy-blocker-scoped fix.
    Confidence & evidence

    High confidence — verified against the checked-out source (HEAD c0ea139). The reset and dropdown-suppression are explicit, named conditions keyed on hasSelectedGroup. The repro path (select group → group_-prefixed key → hasSelectedGroup=true) is confirmed at SearchSelectionFooter.tsx:113. Introduced by #90777.


    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/94512) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.

  7. melvin-bot commented on Jun 25, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  8. m-natarajan commented on Jun 25, 2026

    @m-natarajan

    Chrome / v9.4.19-3, Xiaomi Redmi Note 10 / Android 12
    app 9.4.19-3
    No currency selector in footer
    Currency in the footer unclickable

    Screenrecorder-2026-06-25-18-15-18-559.mp4
    REC-20260625172450.mp4
  9. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Jun 25, 2026
  10. changed the title [-]After selecting group, total spend currency resets to default, currency button disappears[/-] [+][Due for payment 2026-07-02] After selecting group, total spend currency resets to default, currency button disappears[/+] on Jun 25, 2026
  11. melvin-bot commented on Jun 25, 2026

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  12. melvin-bot commented on Jun 25, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.19-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-07-02. 🎊

  13. melvin-bot commented on Jun 25, 2026

    @melvin-bot

    @mountiny The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]

  14. changed the title [-][Due for payment 2026-07-02] After selecting group, total spend currency resets to default, currency button disappears[/-] [+][Due for payment 2026-07-03] [Due for payment 2026-07-02] After selecting group, total spend currency resets to default, currency button disappears[/+] on Jun 26, 2026
  15. melvin-bot commented on Jun 26, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.20-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-07-03. 🎊

  16. melvin-bot commented on Jun 26, 2026

    @melvin-bot

    @mountiny The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BugSomething is broken. Auto assigns a BugZero manager.EngineeringReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions