Skip to content

[Due for payment 2026-07-07] Home - Amount cell does not show negative sign when amount is negative #94250

Closed

Description

@applause-bot

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

Action Performed:

Precondition:

  • Create an expense with negative amount.
  1. Go to staging.new.expensify.com
  2. Go to Home.

Expected Result:

Amount cell will show negative sign.

Actual Result:

Amount cell does not show negative sign when amount is negative.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7188081_1782171116336.9.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Mita Rachim
Bug ID: 7188081

Activity

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

  3. melvin-bot commented on Jun 23, 2026

    @melvin-bot

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

  4. melvin-bot commented on Jun 23, 2026

    @melvin-bot

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

  5. github-actions commented on Jun 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.
  6. MelvinBot commented on Jun 23, 2026

    @MelvinBot
    Contributor

    Issue Analysis

    Root Cause: The "Recently added" rows always show amounts as positive because useRecentlyAddedData.ts:172 calls getAmount(transaction) with no flags. With its defaults (isFromExpenseReport=false, isFromTrackedExpense=false, allowNegative=false), getAmount returns Math.abs(amount) and strips the sign for every expense. The row then renders that absolute value via convertToDisplayString at RecentlyAddedRow.tsx:46, so negative expenses never display the minus sign.

    This was introduced by #93451 (the new "Recently added" slot), which is why it reproduces only on staging.

    Recommended Fix: Compute the signed amount the same way the Search transaction table does. The existing TotalCell passes isFromExpenseReport (true when the report is an expense report or the policy is a group policy) plus the unreported flag into getAmount, which preserves the sign. Two options:

    • Preferred (DRY): Replace the manual {formattedAmount} Text in RecentlyAddedRow with the existing TotalCell component, so amount sign, scanning state, and currency spacing all match the Search table for free.
    • Minimal: In useRecentlyAddedData, pass the correct flags to getAmount — derive isFromExpenseReport from the snapshot's report/policy (mirroring TotalCell.tsx:50) and pass isFromTrackedExpense = transaction.reportID === CONST.REPORT.UNREPORTED_REPORT_ID.
    Investigation details
    • getAmount strips the sign whenever none of isFromExpenseReport / isFromTrackedExpense / allowNegative is set (TransactionUtils/index.ts#L907-L915). For expense-report / group-policy expenses the amounts are stored with an opposite sign, so only the isFromExpenseReport branch returns the correctly-signed value.
    • The snapshot data loaded in useRecentlyAddedData already includes the report objects (iterated at useRecentlyAddedData.ts#L126-L133), so isExpenseReport(report) can be evaluated there without extra Onyx reads.
    • Alternative explanation considered: convertToDisplayString dropping the sign. Ruled out — TotalCell uses the same convertToDisplayString and renders negatives correctly; the only difference is the getAmount flags.

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

  7. adamgrzybowski commented on Jun 23, 2026

    @adamgrzybowski
    Contributor

    Working on this one

  8. changed the title [-]Home - Amount cell does not show negative sign when amount is negative[/-] [+][Due for payment 2026-07-07] Home - Amount cell does not show negative sign when amount is negative[/+] on Jun 30, 2026
  9. melvin-bot commented on Jun 30, 2026

    @melvin-bot

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

  10. melvin-bot commented on Jun 30, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.24-0 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-07-07. 🎊

  11. melvin-bot commented on Jun 30, 2026

    @melvin-bot

    @grgia 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]. If no checklist is needed for this issue, you can click: [no checklist button]

  12. grgia commented on Jul 3, 2026

    @grgia
    Contributor

    part of project, closing

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

Metadata

Metadata

Assignees

Labels

BugSomething 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