Skip to content

Scan - Merchant field shows "Scanning..." text when editing inline #88737

Closed

Description

@jponikarchuk

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.62-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: #83127
Email or phone of affected tester (no customers): ijsjdnosijoisnjodsnjo@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. Go to workspace chat.
  3. Create a scan expense.
  4. Go to Spend > All expenses.
  5. Open the expense.
  6. Click Merchant.
    → Merchant field does not show "Scanning..." text.
  7. Close the RHP.
  8. Click inline Merchant field.

Expected Result:

Merchant field will not show "Scanning..." text.

Actual Result:

Merchant field shows "Scanning..." text when editing inline.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Video.mp4

View all open jobs on GitHub

Activity

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

    @melvin-bot

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

  3. melvin-bot commented on Apr 24, 2026

    @melvin-bot

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

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

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: #83127 - "feat: Add inline editing for tables on desktop" by @mohammadjafarinejad (High confidence)
    Related Issues: None

    Recommendation: REVERT

    PR #83127 introduced inline editing for transaction table cells and directly caused this regression by passing the "Scanning..." placeholder text as the initial editable value for the merchant cell when a receipt is still being scanned.

    Assigned: @mohammadjafarinejad (PR author), @ahmedGaber93 (approving reviewer), @puneetlath (approving reviewer)
    Labels: No label changes — DeployBlockerCash is correctly applied since the fix must happen in the App repo. DeployBlocker was not present.

    Detailed Analysis

    Evidence

    • The issue is reproducible only on staging, not production. The issue body explicitly states "N/A - new feature, doesn't exist in prod."
    • PR feat: Add inline editing for tables on desktop #83127 is listed in the StagingDeployCash deploy checklist and was merged on 2026-04-21 — shortly before this bug was reported.
    • The melvin-bot automatically assigned this issue to the PR feat: Add inline editing for tables on desktop #83127 author, indicating it was also flagged by automated tooling as the likely cause.
    • The bug manifests in the inline merchant cell specifically: clicking the inline merchant field on a scanning expense shows "Scanning..." as editable text, which is exactly the new behavior introduced by this PR.

    Verification

    • Affected file: src/components/TransactionItemRow/DataCells/MerchantCell.tsx
    • PR feat: Add inline editing for tables on desktop #83127 directly modifies this file, converting it from a read-only TextWithTooltip display to an EditableCell with useInlineEditState.
    • PR feat: Add inline editing for tables on desktop #83127 also modified src/components/TransactionItemRow/index.tsx, which contains the getMerchantName function that substitutes the merchant value with translate('iou.receiptStatusTitle') (the "Scanning..." string) when isScanning(transactionItem) is true.

    Root Cause

    In src/components/TransactionItemRow/index.tsx, the getMerchantName() function returns the localized string "Scanning..." (via translate('iou.receiptStatusTitle')) when the transaction receipt is still being scanned. This string is passed as merchant to MerchantOrDescriptionCell as the merchantOrDescription prop.

    Before PR #83127, MerchantOrDescriptionCell was read-only and simply rendered the text in a TextWithTooltip. After the PR, the component passes this text as the initial value to useInlineEditState, which stores it in localValue. The TextWithTooltip child now renders text={localValue} instead of the original text={text}. When the user clicks the cell to edit, it enters edit mode with localValue = "Scanning...", making that placeholder string editable and displayed.

    The fix would require either: (a) preventing canEditMerchant from being true while the transaction is scanning, or (b) filtering out the "Scanning..." placeholder in MerchantOrDescriptionCell before passing it to useInlineEditState. Reverting PR #83127 is the safest option given the scope of changes.

  6. MelvinBot commented on Apr 24, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    getMerchantName() replaces the raw merchant value with the translated "Scanning..." string for scanning transactions. This display-only string is then passed as the initial editable value to MerchantOrDescriptionCell, which feeds it into useInlineEditState as the text input's initial value. So when the user clicks to edit inline, the input is pre-filled with "Scanning...".

    The RHP doesn't have this problem because it reads the raw transaction merchant ('(none)'/PARTIAL_TRANSACTION_MERCHANT), detects it as invalid via isInvalidMerchantValue(), and initializes the input with an empty string instead.

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

    In TransactionItemRow, when the transaction isScanning, pass an empty string as the editable merchant value to MerchantOrDescriptionCell while keeping the "Scanning..." display text. This can be done by passing the raw (non-display-formatted) merchant through isInvalidMerchantValue() the same way the RHP does, so the edit input initializes with '' instead of "Scanning...".

    Alternatively, disable inline merchant editing entirely while isScanning is true (set canEditMerchant to false), since SmartScan is actively populating the field — this mirrors how the RHP likely handles it.

    What alternative solutions did you explore?

    • Sanitizing inside useInlineEditState — rejected because it would require locale-aware string comparison and is the wrong abstraction layer for this fix.
    • Checking in MerchantOrDescriptionCell directly — possible but less clean than fixing at the source in TransactionItemRow where the display vs edit value split should happen.

    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. puneetlath commented on Apr 24, 2026

    @puneetlath
    Contributor

    Inline editing reverted.

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.EngineeringHourlyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions