Skip to content

Expense - Multi line description changes to single line description after inline editing #88651

Closed

Description

@mitarachim

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-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: #83127
Email or phone of affected tester (no customers): sdsodijnosdjoij@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 an expense with multi line description.
  4. Go to Spend > All expenses.
  5. Click Description field.
  6. Type anything and hit Enter.
  7. Open the expense.

Expected Result:

Multi line description will be preserved after inline editing.

Actual Result:

Multi line description changes to single line description after inline editing.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7136981_1776979019348.13.mp4

View all open jobs on GitHub

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    DeployBlockerIndicates it should block deploying the API
    on Apr 23, 2026
  2. melvin-bot commented on Apr 23, 2026

    @melvin-bot

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

  3. melvin-bot commented on Apr 23, 2026

    @melvin-bot

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

  4. github-actions commented on Apr 23, 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 23, 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: #82534

    Recommendation: REVERT

    PR #83127 introduced the inline editing feature for transaction table cells and contains a bug in the description field handling that destroys multiline content on save. Reverting this PR will resolve the issue since it is a new feature that does not yet exist in production.

    Assigned: @mohammadjafarinejad (PR author), @ahmedGaber93, @puneetlath (approving reviewers) from highest-confidence causing PR only
    Labels: DeployBlockerCash kept (frontend App PR caused the issue). DeployBlocker removed (no backend fix required).

    Detailed Analysis

    Evidence

    • The melvin-bot already linked PR feat: Add inline editing for tables on desktop #83127 in its auto-assignment comment, pointing to this as the causing PR.
    • PR feat: Add inline editing for tables on desktop #83127 adds inline editing to transaction table cells (date, merchant, description, category, amount) in the search/expenses view — exactly the code path described in the reproduction steps.
    • The bug appears only on staging and is marked as a "new feature, doesn't exist in prod", which is consistent with this feature being introduced in the current staging batch.

    Verification

    • The affected file is src/components/TransactionItemRow/DataCells/MerchantCell.tsx, which was added/modified by PR feat: Add inline editing for tables on desktop #83127.
    • The file also handles the description cell (via isDescription prop) and is where the multiline-to-single-line conversion occurs.

    Root Cause

    In MerchantCell.tsx, the display-mode text variable is computed as:

    return StringUtils.lineBreaksToSpaces(Parser.htmlToText(merchantOrDescription));

    This strips newlines from the description for display purposes. However, this same text value is passed directly into useInlineEditState as the initial value, meaning localValue — the value that gets saved on blur/submit — is initialized from the already-flattened (single-line) string rather than the raw multiline description.

    When the user opens the inline editor for a multiline description, types anything, and hits Enter (triggering save), the hook calls onSave(localValue). Because localValue was seeded from the display-formatted (newlines-stripped) text, the multiline content is overwritten with a single-line version. The fix requires separating the display-formatted text from the value passed to useInlineEditState — the latter should use the raw (unstripped) description.

  6. ahmedGaber93 commented on Apr 23, 2026

    @ahmedGaber93
    Contributor

    We’ve decided to address this issue in a follow-up for deep investigation #83127 (comment)

  7. trjExpensify commented on Apr 24, 2026

    @trjExpensify
    Contributor

    Agreed, going to close this.

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