You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-07-07] Home - Amount cell does not show negative sign when amount is negative #94250
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.
Go to staging.new.expensify.com
Go to Home.
Expected Result:
Amount cell will show negative sign.
Actual Result:
Amount cell does not show negative sign when amount is negative.
👋 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:
Identify the pull request that introduced this issue and revert it.
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.
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
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:
@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]
Activity
applause-bot commentedon Jun 23, 2026
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
melvin-bot commentedon Jun 23, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #93451
melvin-bot commentedon Jun 23, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jun 23, 2026
👋 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:
MelvinBot commentedon Jun 23, 2026
Issue Analysis
Root Cause: The "Recently added" rows always show amounts as positive because
useRecentlyAddedData.ts:172callsgetAmount(transaction)with no flags. With its defaults (isFromExpenseReport=false,isFromTrackedExpense=false,allowNegative=false),getAmountreturnsMath.abs(amount)and strips the sign for every expense. The row then renders that absolute value viaconvertToDisplayStringatRecentlyAddedRow.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
TotalCellpassesisFromExpenseReport(true when the report is an expense report or the policy is a group policy) plus the unreported flag intogetAmount, which preserves the sign. Two options:{formattedAmount}TextinRecentlyAddedRowwith the existingTotalCellcomponent, so amount sign, scanning state, and currency spacing all match the Search table for free.useRecentlyAddedData, pass the correct flags togetAmount— deriveisFromExpenseReportfrom the snapshot's report/policy (mirroringTotalCell.tsx:50) and passisFromTrackedExpense = transaction.reportID === CONST.REPORT.UNREPORTED_REPORT_ID.Investigation details
getAmountstrips the sign whenever none ofisFromExpenseReport/isFromTrackedExpense/allowNegativeis set (TransactionUtils/index.ts#L907-L915). For expense-report / group-policy expenses the amounts are stored with an opposite sign, so only theisFromExpenseReportbranch returns the correctly-signed value.useRecentlyAddedDataalready includes the report objects (iterated at useRecentlyAddedData.ts#L126-L133), soisExpenseReport(report)can be evaluated there without extra Onyx reads.convertToDisplayStringdropping the sign. Ruled out —TotalCelluses the sameconvertToDisplayStringand renders negatives correctly; the only difference is thegetAmountflags.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.
adamgrzybowski commentedon Jun 23, 2026
Working on this one
[-]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[/+]melvin-bot commentedon Jun 30, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jun 30, 2026
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. 🎊
melvin-bot commentedon Jun 30, 2026
@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]
grgia commentedon Jul 3, 2026
part of project, closing