Skip to content

[Due for payment 2026-04-14] Expense - Tapping on expense row does not deselect or select expense #86780

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.51-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: #85818
Email or phone of affected tester (no customers): snodijosdnjoijiosnj@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: iPhone 15 Pro Max / iOS 26.3
App Component: Search

Action Performed:

  1. Launch Expensify app.
  2. Go to workspace chat.
  3. Create an expense.
  4. Delete the expense.
  5. Go to Reports > Expenses.
  6. Click Status, select Deleted and click Apply.
  7. Long tap on the expense > Select.
  8. Tap on the expense row.

Expected Result:

Tapping on the expense row will deselect or select the expense.

Actual Result:

Tapping on the expense row does not deselect or select the expense.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7118367_1774987648921.ScreenRecording_04-01-2026_04-06-14_1.mp4

View all open jobs on GitHub

Activity

  1. added
    DeployBlockerCash
    Daily
    Bug
    DeployBlocker
    on Mar 31, 2026
  2. melvin-bot commented on Mar 31, 2026

    @melvin-bot

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

  3. melvin-bot commented on Mar 31, 2026

    @melvin-bot

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

  4. github-actions commented on Mar 31, 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 Mar 31, 2026

    @OSBotify
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: #85818 - "Deleted transactions on search" by @jnowakow (High confidence)
    Related Issues: None

    Recommendation: REVERT

    PR #85818 introduced logic that disables the onPress handler for deleted transactions. While this prevents opening transaction details (which was likely the intent), it also breaks the ability to select/deselect deleted transactions in multi-select mode. Users can enter selection mode via long-press but then cannot tap rows to toggle selection.

    Labels: Keeping DeployBlockerCash (App deploy is blocked), removing DeployBlocker (not a backend issue)

    📋 Detailed Analysis

    Evidence

    PR #85818 added support for viewing and undeleting transactions that have been deleted. The PR introduced changes to TransactionListItem.tsx that disable row tap functionality for deleted transactions.

    Verification

    The affected file is /home/runner/_work/App/App/src/components/Search/SearchList/ListItem/TransactionListItem.tsx

    PR #85818 modified this file and added the following logic (lines 184 and 236):

    onPress={isDeletedTransaction ? undefined : () => onSelectRow(item, transactionPreviewData)}

    This change disables the onPress handler when isDeletedTransaction is true, which prevents the selection/deselection behavior described in the bug report.

    Root Cause

    The PR added a conditional that sets onPress={undefined} for deleted transactions. The likely intent was to prevent navigation to transaction details for deleted items. However, onSelectRow is responsible for both:

    1. Navigating to transaction details (when not in selection mode)
    2. Toggling selection state (when in selection mode)

    By disabling onPress entirely, both behaviors are broken for deleted transactions. Users can long-press to enter selection mode, but subsequent taps on the row do nothing because the onPress handler is disabled.

    The fix should allow selection/deselection in multi-select mode while preventing navigation in normal mode for deleted transactions.

  6. removed
    DeployBlocker
    on Mar 31, 2026
  7. MelvinBot commented on Mar 31, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    PR #85818 introduced a conditional in TransactionListItem.tsx at line 184 that sets onPress={undefined} when a transaction is deleted:

    onPress={isDeletedTransaction ? undefined : () => onSelectRow(item, transactionPreviewData)}

    The intent was to prevent navigating to transaction details for deleted items. However, onSelectRow (defined in Search/index.tsx:1025-1034) serves a dual purpose:

    1. When isMobileSelectionModeEnabled is true → calls toggleTransaction(item) to toggle selection
    2. When isMobileSelectionModeEnabled is false → navigates to the transaction details

    By setting onPress to undefined, both behaviors are disabled — including selection toggling in multi-select mode. So a user can long-press to enter selection mode, but tapping a deleted transaction row does nothing because no press handler exists.

    Note: the existing bulk action system already supports deleted transaction selection — useSearchBulkActions.ts shows an "Undelete" action when all selected items are deleted, confirming this is an intended use case.

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

    In src/components/Search/SearchList/ListItem/TransactionListItem.tsx at line 184, change the onPress conditional to allow pressing deleted transactions when in multi-select mode:

    // Before:
    onPress={isDeletedTransaction ? undefined : () => onSelectRow(item, transactionPreviewData)}
    
    // After:
    onPress={isDeletedTransaction && !canSelectMultiple ? undefined : () => onSelectRow(item, transactionPreviewData)}

    When canSelectMultiple is true (mobile selection mode is active), the press handler fires, and onSelectRow delegates to toggleTransaction to toggle the selection state. When not in multi-select mode, deleted transactions remain non-pressable, preserving the original intent of preventing navigation to deleted transaction details.

    No changes needed to onSelectRow itself — the pendingAction === DELETE guard at line 1027 is for transactions with a pending delete action (optimistic UI), which is a different state than permanently deleted transactions (reportID === '-1').

    What alternative solutions did you explore? (Optional)

    An alternative would be to check isMobileSelectionModeEnabled instead of canSelectMultiple, but that state isn't available in TransactionListItem — it lives in the Search component. canSelectMultiple is already passed as a prop and serves as the correct proxy for whether selection mode is active.


    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.

  8. 4 remaining items

  9. added
    Weekly
    Awaiting Payment
    and removed
    Hourly
    on Apr 7, 2026
  10. changed the title [-]Expense - Tapping on expense row does not deselect or select expense[/-] [+][Due for payment 2026-04-14] Expense - Tapping on expense row does not deselect or select expense[/+] on Apr 7, 2026
  11. melvin-bot commented on Apr 7, 2026

    @melvin-bot

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

  12. removed
    Reviewing
    on Apr 7, 2026
  13. melvin-bot commented on Apr 7, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.52-9 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-04-14. 🎊

  14. melvin-bot commented on Apr 7, 2026

    @melvin-bot

    @luacmartins 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]

  15. melvin-bot commented on Apr 7, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  16. added
    Reviewing
    Weekly
    and removed
    Weekly
    on Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugEngineeringReviewingWeekly

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions