Skip to content

Spend - Filters selected in total spend footer are not displayed while saving a search. #104026

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.5.9-0
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: #100674
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Motorola MotoG60 / Android 12 (Hybrid app) - Windows 11 / Chrome
App Component: Search

Action Performed:

Prerequisite: SpendFooterSelectors beta enabled in troubleshoot.
Prerequisite 2: At least one expense created.

  1. Open the staging.new.expensify.com website.
  2. Navigate to "Spend" > "Expenses"
  3. Select an expense.
  4. Click "Total Spend" on footer.
  5. Select "Count" > "Reports"
  6. Select "Total" > "Reimbursable"
  7. Click on "Save" button next to search input.
  8. Note that the just selected filters are not visible on the saved search.

Expected Result:

Filters selected on total spend footer should be displayed while saving a search.

Actual Result:

Filters selected on total spend footer are not displayed on applied filters while saving a search.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7286511_1791998089622.Foot.2.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7286511

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 14, 2026
  2. applause-bot commented on Oct 14, 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/9444432f1cc1e05149dc452ef17ef95d26ff102bcd196e6bfd6edfcee49aef79

  3. melvin-bot commented on Oct 14, 2026

    @melvin-bot

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

  4. melvin-bot commented on Oct 14, 2026

    @melvin-bot

    @JS00001 @mkhutornyi you have been assigned to this deploy blocker because you reviewed the offending PR: #100674

  5. github-actions commented on Oct 14, 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. melvin-bot commented on Oct 14, 2026

    @melvin-bot

    @truph01 you have been assigned to this deploy blocker because you authored the offending PR: #100674

  7. melvin-bot commented on Oct 14, 2026

    @melvin-bot

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

  8. MelvinBot commented on Oct 14, 2026

    @MelvinBot
    Contributor

    Deploy Blocker Analysis

    Causing PR: feat: Add count and spend total selectors to the Spend footer (high confidence).

    Root cause: The PR adds footerCount, footerTotal and footerCurrency to the search query, but never adds them to the Save search page's summary. The filters are saved; the Save page just doesn't list them. In SearchSavePage.tsx:120-159, getAppliedDisplays ignores the footer keys. In SearchUIUtils.ts:6256-6259, mapFiltersFormToLabelValueList skips them because they aren't in FILTER_VIEW_MAP.

    Recommendation: Fix forward. Don't revert. Add the three footer selections to getAppliedDisplays, next to groupCurrency, limit and view. This is a display-only gap in a beta-gated feature (SpendFooterSelectors) that isn't in production, so consider removing the blocker label.

    Investigation details
    1. The footer writes each choice into the query (SearchSelectionFooter.tsx:649-662). The PR's comment says they are "saved with a saved search".
    2. saveSearch stores queryJSON.inputQuery, which includes the footer keys, so the saved search should reopen with the same footer settings. I confirmed this from the code, not by testing.
    3. buildFilterFormValuesFromQuery copies the keys into the filters form, but neither summary list on the Save page reads them. The PR doesn't touch SearchSavePage.tsx.

    The footer settings change how results are displayed, not which results appear, so the "Display" section is the right place for them. The labels can reuse getFooterTotalItems in SearchUIUtils.ts and the common.expenses / common.reports strings.

    Caveat: I didn't watch the attached video. If it shows a reopened saved search losing its footer settings, recheck step 2 before removing the blocker label.

  9. JS00001 commented on Oct 14, 2026

    @JS00001
    Contributor

    Lets fix this in the follow up @mkhutornyi @truph01 , this is behind a beta

  10. truph01 commented on Oct 15, 2026

    @truph01
    Contributor

    @MelvinBot Post proposal

  11. MelvinBot commented on Oct 15, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    The Spend footer saves its Count, Total and Currency choices into the search query as footerCount, footerTotal and footerCurrency. These values are saved with the search. The Save search page just never lists them:

    • The "Display" section comes from getAppliedDisplays, which only handles group by, group currency, limit, view, sort and columns (SearchSavePage.tsx:120-159).
    • The "Filters" section comes from mapFiltersFormToLabelValueList, which skips any key missing from FILTER_VIEW_MAP (SearchUIUtils.ts:6256-6259). The footer keys aren't in that map.

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

    Show the footer choices in the "Display" section of the Save search page. They change how results are summarized, not which results appear, so they belong with group by and view rather than with filters.

    In getAppliedDisplays, after the view row:

    1. If footerCount is set, add a "Count" row whose value is "Expenses" or "Reports".
    2. If footerTotal is set, add a "Total" row. Get its label from getFooterTotalItems (SearchUIUtils.ts:5407-5416) so the Save page uses the footer's wording, for example "Reimbursable".
    3. If footerCurrency is set, add a "Currency" row with the currency code.

    The query already drops default values, so only non-default choices will appear. Add a unit test that builds the form with footerCount: reports and footerTotal: reimbursable and checks that both rows are returned.

    What alternative solutions did you explore? (Optional)

    Add the footer keys to FILTER_VIEW_MAP so they appear under "Filters". I don't recommend this. The footer keys don't narrow results, and the code already groups them with display settings like groupBy and view in SKIPPED_SEARCH_FILTERS (SearchUIUtils.ts:653-665).


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

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

Metadata

Metadata

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