Skip to content

[Due for Payment March 9th] Reports - "Merchant" cell in the expenses table doesn't show the word Scanning... #82402

Closed

Description

@izarutskaya

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.18-5
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @shawnborton
Slack conversation (hyperlinked to channel name): expensify_bugs

Action Performed:

  1. Sign up on https://staging.new.expensify.com/
  2. Choose "Something else" > enter name and complete the flow
  3. Go to Reports page > click Create expense > Scan > choose file > choose personal space
  4. While the scanning process, click "View" button

Expected Result:

User should see Scanning... in the "Merchant" cell in the expenses table

Actual Result:

When user to scan a receipt to your personal space, the "Merchant" cell in the expenses table doesn't show the word Scanning...

Workaround:

Unknown

Platforms:

Select the officially supported platforms where the issue was reproduced:

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

Screenshots/Videos

Image
Recording.3636.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @trjExpensify

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Feb 13, 2026
  2. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Feb 13, 2026
  3. melvin-bot commented on Feb 13, 2026

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @DylanDylann (External)

  4. melvin-bot commented on Feb 13, 2026

    @melvin-bot

    Triggered auto assignment to @trjExpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  5. melvin-bot commented on Feb 13, 2026

    @melvin-bot

    Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.

  6. daledah commented on Feb 13, 2026

    @daledah
    Contributor

    Proposal

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

    When user scans a receipt to their personal space, the "Merchant" cell in the expenses table doesn't show the word "Scanning..."

    What is the root cause of that problem?

    The getShouldShowMerchant function in SearchUIUtils.ts determines whether the merchant column should be displayed based on whether any transaction has a valid merchant value. However, it doesn't account for scanning transactions.

    App/src/libs/SearchUIUtils.ts

    Lines 1042 to 1051 in 4e0897a

    function getShouldShowMerchant(data: OnyxTypes.SearchResults['data']): boolean {
    return Object.keys(data).some((key) => {
    if (isTransactionEntry(key)) {
    const item = data[key];
    const merchant = item.modifiedMerchant ? item.modifiedMerchant : (item.merchant ?? '');
    return !isInvalidMerchantValue(merchant);
    }
    return false;
    });
    }

    When a receipt is being scanned, the merchant value is "(none)" (PARTIAL_TRANSACTION_MERCHANT), which is considered invalid by isInvalidMerchantValue(). As a result, shouldShowMerchant is set to false for the transaction item.

    In getMerchantName(), the scanning text is only shown when both isScanning(transactionItem) AND shouldShowMerchant are true:

    if (isScanning(transactionItem) && shouldShowMerchant) {
    merchant = translate('iou.receiptStatusTitle');
    }

    Since shouldShowMerchant is false, the "Scanning..." text is never displayed.

    Interestingly, there's already similar logic in the updateColumns function that correctly handles scanning transactions:

    App/src/libs/SearchUIUtils.ts

    Lines 4382 to 4385 in 4e0897a

    const merchant = transaction.modifiedMerchant ? transaction.modifiedMerchant : (transaction.merchant ?? '');
    if (!isInvalidMerchantValue(merchant) || isScanning(transaction)) {
    columns[CONST.SEARCH.TABLE_COLUMNS.MERCHANT] = true;
    }

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

    Update the getShouldShowMerchant function to also return true when a transaction is scanning:

    function getShouldShowMerchant(data: OnyxTypes.SearchResults['data']): boolean {
        return Object.keys(data).some((key) => {
            if (isTransactionEntry(key)) {
                const item = data[key];
                const merchant = item.modifiedMerchant ? item.modifiedMerchant : (item.merchant ?? '');
    -           return !isInvalidMerchantValue(merchant);
    +           return !isInvalidMerchantValue(merchant) || isScanning(item);
            }
            return false;
        });
    }
    Image

    What alternative solutions did you explore? (Optional)

    An alternative would be to modify the getMerchantName function to not require shouldShowMerchant to be true when showing the scanning text. However, the proposed solution is more consistent with the existing pattern used in updateColumns function and ensures the merchant column is visible when there are scanning transactions.

  7. lorretheboy commented on Feb 16, 2026

    @lorretheboy
    Contributor

    Proposal

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

    Reports - "Merchant" cell in the expenses table doesn't show the word Scanning...

    What is the root cause of that problem?

    When scanning a receipt to personal space, the transaction's merchant is set to "(none)" (PARTIAL_TRANSACTION_MERCHANT). The flow was:

    First, getShouldShowMerchant() checks all transactions and returns false because isInvalidMerchantValue("(none)") is true

    App/src/libs/SearchUIUtils.ts

    Lines 1042 to 1051 in 79d8a98

    function getShouldShowMerchant(data: OnyxTypes.SearchResults['data']): boolean {
    return Object.keys(data).some((key) => {
    if (isTransactionEntry(key)) {
    const item = data[key];
    const merchant = item.modifiedMerchant ? item.modifiedMerchant : (item.merchant ?? '');
    return !isInvalidMerchantValue(merchant);
    }
    return false;
    });
    }

    --> This sets shouldShowMerchant = false on the transaction item

    So that in getMerchantName() (TransactionItemRow), the scanning check was gated on that flag:

    const shouldShowMerchant = transactionItem.shouldShowMerchant ?? true;
    let merchant = transactionItem?.formattedMerchant ?? getMerchant(transactionItem);
    if (isScanning(transactionItem) && shouldShowMerchant) {

    Since shouldShowMerchant was false, the "Scanning…" text was never shown — even though the transaction was actively scanning

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

    We should remove the && shouldShowMerchant guard from the scanning check in getMerchantName() since Scanning is a transient UI state that should always be displayed regardless of column visibility. Also, column visibility is already properly handled by getColumnsToShow()

    function getMerchantName(transactionItem: TransactionWithOptionalSearchFields, translate: (key: TranslationPaths) => string) {
        let merchant = transactionItem?.formattedMerchant ?? getMerchant(transactionItem);
    
        if (isScanning(transactionItem)) {
            merchant = translate('iou.receiptStatusTitle');
        }
    
        const merchantName = StringUtils.getFirstLine(merchant);
        return merchantName !== CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT && merchantName !== CONST.TRANSACTION.DEFAULT_MERCHANT ? merchantName : '';
    }

    function getMerchantName(transactionItem: TransactionWithOptionalSearchFields, translate: (key: TranslationPaths) => string) {
    const shouldShowMerchant = transactionItem.shouldShowMerchant ?? true;
    let merchant = transactionItem?.formattedMerchant ?? getMerchant(transactionItem);
    if (isScanning(transactionItem) && shouldShowMerchant) {
    merchant = translate('iou.receiptStatusTitle');
    }
    const merchantName = StringUtils.getFirstLine(merchant);
    return merchantName !== CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT && merchantName !== CONST.TRANSACTION.DEFAULT_MERCHANT ? merchantName : '';
    }

    What alternative solutions did you explore? (Optional)

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  8. yatin-italy commented on Feb 16, 2026

    @yatin-italy

    Proposal

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

    When a user creates an expense via “Scan” in a personal space (Reports > Expenses), the Expenses table does not show “Scanning...” in the Merchant cell for that transaction while the receipt scan is in progress, and the Merchant cell stays blank even though “Scanning...” appears elsewhere on the row.

    What is the root cause of that problem?

    In this implementation, getShouldShowMerchant in src/libs/SearchUIUtils.ts makes the earliest incorrect assumption that the Merchant column should only be shown when at least one transaction has a non-invalid merchant value, but scanning transactions keep an invalid placeholder merchant until SmartScan finishes, so a list that contains only scanning transactions produces shouldShowMerchant === false, and getMerchantName in src/components/TransactionItemRow/index.tsx depends on that flag to show the scanning label, which prevents the Merchant cell from ever rendering “Scanning...” for those rows.

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

    Update getShouldShowMerchant in src/libs/SearchUIUtils.ts so scanning transactions are treated as “should show merchant,” while keeping the existing row rendering logic unchanged.

    // File: src/libs/SearchUIUtils.ts
    return !isInvalidMerchantValue(merchant);
    // File: src/libs/SearchUIUtils.ts
    return !isInvalidMerchantValue(merchant) || isScanning(item);

    What alternative solutions did you explore? (Optional)

    None

  9. github-actions commented on Feb 16, 2026

    @github-actions
    Contributor

    ⚠️ @yatin-italy Your proposal is a duplicate of an already existing proposal and has been automatically withdrawn to prevent spam. Please review the existing proposals before submitting a new one.

  10. 35 remaining items

  11. MelvinBot commented on Mar 12, 2026

    @MelvinBot
    Contributor

    Sorry, I'm not able to manage payment labels or process payment workflows. That functionality is handled by a different system.

    You may need to manually update the label or ask someone with the appropriate permissions to do so.

  12. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Mar 12, 2026
  13. melvin-bot commented on Mar 12, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  14. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed
    Awaiting PaymentAuto-added when associated PR is deployed to production
    on Mar 12, 2026
  15. melvin-bot commented on Mar 12, 2026

    @melvin-bot

    Current assignee @mallenexpensify is eligible for the Awaiting Payment assigner, not assigning anyone new.

  16. trjExpensify commented on Mar 12, 2026

    @trjExpensify
    Contributor

    Payment summary as follows:

    Closing!

  17. JmillsExpensify commented on Mar 18, 2026

    @JmillsExpensify
    Contributor

    $250 approved for @DylanDylann

  18. garrettmknight commented on Mar 25, 2026

    @garrettmknight
    Contributor

    $250 approved for @daledah

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 productionDailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions