App icon indicating copy to clipboard operation
App copied to clipboard

[$250] Hold - Expense details missing and red dot appears when partially approve expense on hold

Open nlemma opened this issue 2 months ago โ€ข 13 comments

If you havenโ€™t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: v9.2.43-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/test-runs/TR-1739/folder/13176872/41237333/991933688 Email or phone of affected tester (no customers): [email protected] Issue reported by: Applause Internal Team Device used: Lenovo 80ES / Windows 10 Pro App Component: Chat Report View

Action Performed:

Precondition: Owner of the workspace invite employee and approver

  1. Employee submit 2 expenses in workspace chat
  2. Approver put one of the expenses on Hold
  3. Approver partially approve the report
  4. Take a look at Employees side

Expected Result:

Approved expense should be visible with all details and there should no be a red dot on expense

Actual Result:

Approved expense details are not visible for employee. Red dot occurs on approved expense

Workaround:

Unknown

Platforms:

  • [ ] Android: App
  • [x] Android: mWeb Chrome
  • [ ] iOS: App
  • [ ] iOS: mWeb Safari
  • [ ] iOS: mWeb Chrome
  • [x] Windows: Chrome
  • [x] MacOS: Chrome / Safari
  • [ ] MacOS: Desktop

Screenshots/Videos

https://github.com/user-attachments/assets/6c003783-f75c-4499-b8cb-5f5df0269043

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021986432955222499621
  • Upwork Job ID: 1986432955222499621
  • Last Price Increase: 2025-12-25
Issue OwnerCurrent Issue Owner: @thesahindia

nlemma avatar Nov 04 '25 11:11 nlemma

Triggered auto assignment to @dylanexpensify (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.

melvin-bot[bot] avatar Nov 04 '25 11:11 melvin-bot[bot]

Job added to Upwork: https://www.upwork.com/jobs/~021986432955222499621

melvin-bot[bot] avatar Nov 06 '25 13:11 melvin-bot[bot]

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

melvin-bot[bot] avatar Nov 06 '25 13:11 melvin-bot[bot]

๐Ÿšจ Edited by proposal-police: This proposal was edited at 2025-11-09 09:03:49 UTC.

Proposal

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

Employees cannot view the details of an approved expense after the approver partially approved a report (holding another expense).

What is the root cause of that problem?

We show the money-request table only when a report has multiple visible expenses. After a partial approval, if only one expense is left, the view switches to the chat layout, so the expense row disappears and the unread indicator stays.

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

Show the expense-table view for all money-request or invoice reports unless theyโ€™re individual transaction threads. This ensures that after a partial approval, when only one expense remains, the employee still sees the expense row instead of the chat summary. Specifically:

  1. Update shouldDisplayReportTableView so it only checks whether the report is a transaction thread, no longer tying the table view to the number of transactions. From this: https://github.com/Expensify/App/blob/5dc4f0c162e818fb5b1bdb701055c38bf6c9c359/src/libs/MoneyRequestReportUtils.ts#L113-L115 To this:
function shouldDisplayReportTableView(report: OnyxEntry<Report>) {
    return !isReportTransactionThread(report);
}
  1. Update MoneyRequestReportView now always renders the table view for those reports (or their empty state) regardless of transaction count. https://github.com/Expensify/App/blob/5dc4f0c162e818fb5b1bdb701055c38bf6c9c359/src/components/MoneyRequestReportView/MoneyRequestReportView.tsx#L130

To this:

    const shouldDisplayMoneyRequestActionsList = !!isEmptyTransactionReport || shouldDisplayReportTableView(report);
  1. Update ReportScreen always opts into the table view for IOU/expense reports, while a new isSingleVisibleTransactionReport flag preserves the wide-RHP receipt layout when applicable. https://github.com/Expensify/App/blob/5dc4f0c162e818fb5b1bdb701055c38bf6c9c359/src/pages/home/ReportScreen.tsx#L859

To this:

-     const shouldDisplayMoneyRequestActionsList = isMoneyRequestOrInvoiceReport && shouldDisplayReportTableView(report, visibleTransactions ?? []);
+    const shouldDisplayMoneyRequestActionsList = isMoneyRequestOrInvoiceReport && shouldDisplayReportTableView(report);
+    const isSingleVisibleTransactionReport = isMoneyRequestOrInvoiceReport && isSingleTransactionReport(report, visibleTransactions ?? []);

    // WideRHP should be visible only on wide layout when report is opened in RHP and contains only one expense.
    // This view is only available for reports of type CONST.REPORT.TYPE.EXPENSE or CONST.REPORT.TYPE.IOU.
    const shouldShowWideRHP =
        route.name === SCREENS.SEARCH.REPORT_RHP &&
        !isSmallScreenWidth &&
-        !shouldDisplayMoneyRequestActionsList &&
+        isSingleVisibleTransactionReport &&


This keeps the approved expense detail row visible for the employee even after partial approval and prevents the stray red unread dot.

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

  • Money-request report with one transaction still renders the table view (both inbox and search contexts).
  • Money-request report with zero visible transactions (e.g., pending delete) shows the empty state instead of the chat view.
  • Unread indicators clear when the approved expense remains visible.

What alternative solutions did you explore? (Optional)

none

Video shows the solution works:

https://github.com/user-attachments/assets/c2175f8b-ffd4-4815-ab44-0ab73b758778

marufsharifi avatar Nov 09 '25 08:11 marufsharifi

๐Ÿ“ฃ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? ๐Ÿ’ธ

melvin-bot[bot] avatar Nov 13 '25 16:11 melvin-bot[bot]

๐Ÿ“ฃ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? ๐Ÿ’ธ

melvin-bot[bot] avatar Nov 20 '25 16:11 melvin-bot[bot]

๐Ÿ“ฃ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? ๐Ÿ’ธ

melvin-bot[bot] avatar Nov 27 '25 16:11 melvin-bot[bot]

This issue has not been updated in over 14 days. @dylanexpensify, @thesahindia eroding to Weekly issue.

melvin-bot[bot] avatar Nov 28 '25 00:11 melvin-bot[bot]

๐Ÿ“ฃ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? ๐Ÿ’ธ

melvin-bot[bot] avatar Dec 04 '25 16:12 melvin-bot[bot]

๐Ÿ“ฃ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? ๐Ÿ’ธ

melvin-bot[bot] avatar Dec 11 '25 16:12 melvin-bot[bot]

๐Ÿ“ฃ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? ๐Ÿ’ธ

melvin-bot[bot] avatar Dec 18 '25 16:12 melvin-bot[bot]

This issue has not been updated in over 15 days. @dylanexpensify, @thesahindia eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

melvin-bot[bot] avatar Dec 23 '25 00:12 melvin-bot[bot]

๐Ÿ“ฃ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? ๐Ÿ’ธ

melvin-bot[bot] avatar Dec 25 '25 16:12 melvin-bot[bot]

๐Ÿ“ฃ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? ๐Ÿ’ธ

melvin-bot[bot] avatar Jan 01 '26 16:01 melvin-bot[bot]