Skip to content

[Due for payment 2026-05-11] [Due for payment 2026-04-14] Expense - Columns are shown in expense report but not marked as selected in Columns list #86786

Closed

Description

@nlemma

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.3.51-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: #83981
Email or phone of affected tester (no customers): soidnjsojdiosjiosdjo@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.2 / Chrome
App Component: Money Requests

Action Performed:

  1. Go to staging.new.expensify.com
  2. Create a new account.
  3. Create a workspace.
  4. Go to workspace chat.
  5. Create two expenses in foreign currency.
  6. Open the expense report.
    → Exchange rate and Original amount column are shown.
  7. Click Columns.

Expected Result:

Exchange rate and Original amount will be marked as selected since both columns appear on the expense report.

Actual Result:

Exchange rate and Original amount are not marked as selected when both columns appear on the expense report.
The same issue also happens with Tax rate and Tax amount column.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7118358_1774987422730.6.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @QichenZhu

Activity

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

    @melvin-bot

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

  3. melvin-bot commented on Mar 31, 2026

    @melvin-bot

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

  4. github-actions commented on Mar 31, 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.
  5. OSBotify commented on Mar 31, 2026

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: #83981 - Fix report custom columns blockers by @mukhrr (High confidence)
    Related Issues: None

    Recommendation: REVERT

    This is a clear frontend logic bug introduced in PR #83981. The PR attempted to add dynamic column visibility based on data presence, but created a mismatch between what columns are displayed and what columns are marked as selected in the Columns settings UI.

    Labels: No label changes made (issue is reproducible only in staging and was caused by an App PR, so DeployBlockerCash should remain)


    Detailed Analysis

    Evidence

    PR #83981 was specifically called out by melvin-bot in the issue comments as the likely cause. The PR modified the columns functionality for expense reports, which directly relates to the reported bug about Exchange Rate, Original Amount, Tax Rate, and Tax Amount columns not being marked as selected.

    Verification

    The PR modified src/libs/SearchUIUtils.ts, specifically the getColumnsToShow() function (lines 4713-4730). The changes add logic to dynamically show columns when data exists.

    Root Cause

    The bug occurs due to a logic mismatch between column visibility and column selection state:

    1. Column Display Logic (getColumnsToShow() in SearchUIUtils.ts): When transactions have foreign currency, the function dynamically adds EXCHANGE_RATE and ORIGINAL_AMOUNT to the visible columns. When transactions have tax data, it adds TAX_RATE and TAX_AMOUNT columns. This happens even if the user has not explicitly selected these columns in their preferences.

    2. Column Selection State (ColumnsSettingsList.tsx): The Columns settings page determines which columns are selected based on currentColumns from Onyx (NVP_REPORT_DETAILS_COLUMNS). These dynamically-added columns are NOT in the saved preferences, so they appear unselected.

    3. The Mismatch: Columns appear on the report (because getColumnsToShow() returns them based on data presence), but they are not marked as selected in the Columns UI (because they are not in the saved currentColumns array).

    The PR attempted to automatically show relevant columns when data exists, but failed to account for how this would interact with the column selection UI.

  6. MelvinBot commented on Mar 31, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    There are two independent systems controlling column visibility that are out of sync:

    1. Table rendering (getColumnsToShow() in src/libs/SearchUIUtils.ts): When isExpenseReportView=true and no user customization exists (NVP is null), it scans every transaction and auto-enables columns like EXCHANGE_RATE, ORIGINAL_AMOUNT, TAX_RATE, and TAX_AMOUNT based on the presence of data (foreign currency, tax codes, etc.). This is the code at ~line 4713-4730:

      if (customResult || isExpenseReportView) {
          if (transaction.taxCode)       → columns[TAX_RATE] = true
          if (transaction.taxAmount)      → columns[TAX_AMOUNT] = true
          if (hasExchangeRate || originalAmount) → columns[ORIGINAL_AMOUNT] = true, columns[EXCHANGE_RATE] = true
      }
      
    2. Columns selector UI (src/pages/settings/Report/ReportDetailsColumnsPage.tsx): When the NVP (NVP_REPORT_DETAILS_COLUMNS) is null/empty (user has never customized columns), currentColumns is []. ColumnsSettingsList then falls back to REPORT_DETAILS_DEFAULT_COLUMNS which only contains 6 columns: receipt, date, merchant, category, tag, total_amount. It has no awareness of the data-driven auto-detection logic.

    So: the table auto-shows Exchange Rate / Original Amount / Tax Rate / Tax Amount based on transaction data, but the Columns selector only reflects user-saved preferences (or a hardcoded 6-column default), creating the disconnect.

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

    In ReportDetailsColumnsPage, instead of passing an empty currentColumns when the NVP is null, compute the effective visible columns by also considering which data-dependent columns are auto-shown. This can be done by:

    1. Having ReportDetailsColumnsPage read the report's transactions from Onyx (the report ID is available via route params)
    2. Using a shared utility (or a lightweight version of the auto-detection logic from getColumnsToShow) to determine which data-dependent columns (exchange rate, original amount, tax rate, tax amount) should be considered "active" based on the transaction data
    3. Merging these auto-detected columns with REPORT_DETAILS_DEFAULT_COLUMNS to build the effective currentColumns when the NVP is empty

    This way, when a user opens the Columns selector on a report with foreign currency expenses, Exchange Rate and Original Amount will appear as selected — matching what the table actually displays.

    What alternative solutions did you explore? (Optional)

    • Persist auto-detected columns to the NVP: When getColumnsToShow auto-enables columns, also write them to NVP_REPORT_DETAILS_COLUMNS. Rejected because it introduces side effects in a rendering utility and would permanently save auto-detected columns even if the underlying data changes.
    • Remove auto-detection entirely: Only show columns the user has explicitly selected. This would be a behavior regression — the auto-show feature is intentional and useful (users expect to see exchange rate columns when they have foreign currency expenses).
    • Add auto-detected columns to REPORT_DETAILS_DEFAULT_COLUMNS: Always include tax/exchange columns in the default. Rejected because those columns should only appear when relevant data exists.

    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.

  7. mukhrr commented on Apr 1, 2026

    @mukhrr
    Contributor

    @JS00001 could you pls assign me here?! thanks

  8. 7 remaining items

  9. changed the title [-]Expense - Columns are shown in expense report but not marked as selected in Columns list[/-] [+][Due for payment 2026-04-14] Expense - Columns are shown in expense report but not marked as selected in Columns list[/+] on Apr 7, 2026
  10. melvin-bot commented on Apr 7, 2026

    @melvin-bot

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

  11. melvin-bot commented on Apr 7, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.52-9 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-04-14. 🎊

    For reference, here are some details about the assignees on this issue:

    • @QichenZhu requires payment through NewDot Manual Requests
    • @mukhrr requires payment (Needs manual offer from BZ)
  12. melvin-bot commented on Apr 7, 2026

    @melvin-bot

    @QichenZhu 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]

  13. melvin-bot commented on Apr 7, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  14. changed the title [-][Due for payment 2026-04-14] Expense - Columns are shown in expense report but not marked as selected in Columns list[/-] [+][Due for payment 2026-05-11] [Due for payment 2026-04-14] Expense - Columns are shown in expense report but not marked as selected in Columns list[/+] on May 4, 2026
  15. melvin-bot commented on May 4, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.65-6 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-05-11. 🎊

    For reference, here are some details about the assignees on this issue:

    • @QichenZhu requires payment through NewDot Manual Requests
    • @mukhrr requires payment (Needs manual offer from BZ)
  16. melvin-bot commented on May 4, 2026

    @melvin-bot

    @QichenZhu @mallenexpensify 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]

  17. melvin-bot commented on May 4, 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.

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions