Skip to content

[Due for payment 2026-04-14] Reports - Non functional View button is shown instead of Undelete button #86796

Closed

Description

@lanitochka17

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):
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.2 / Chrome
App Component: Search

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create an expense.
  4. Delete the expense.
  5. Go to Reports > Expenses.
  6. On the search field, enter group-by:from status:undelete and search.
  7. Click Columns.
  8. Select Action and click Apply.
  9. Expand the table.
  10. Click View button.

Expected Result:

Undelete button should be displayed instead of View button because deleted expense cannot be viewed.

Actual Result:

View button is shown and it is not functional.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7118354_1774987419560.2.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @mhawryluk

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    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: ROLL FORWARD

    A revert would remove the entire deleted transactions feature, which is working correctly in most contexts. The fix is simple and surgical - just need to exclude UNDELETE from the isChildListItem override in ActionCell.

    Labels: Keeping DeployBlockerCash (Frontend bug - App deploy is blocked)

    Detailed Analysis

    Evidence

    • PR [Payment due @rojiphil] Deleted transactions on search #85818 added support for deleted transactions in search, including a new UNDELETE action type
    • The issue occurs specifically when viewing deleted transactions in the expanded table view with the "Action" column displayed
    • The bug is reproducible only on staging (new feature doesnt exist in prod)

    Verification

    The PR modifies these key files related to the affected functionality:

    • src/components/Search/SearchList/ListItem/ActionCell/index.tsx - Renders the action button
    • src/libs/SearchUIUtils.ts - Determines which action to show (getActions() function)
    • src/libs/TransactionUtils/index.ts - Added isDeletedTransaction() helper
    • src/components/TransactionItemRow/index.tsx - Renders the table row with ActionCell

    Root Cause

    The bug is in /home/runner/_work/App/App/src/components/Search/SearchList/ListItem/ActionCell/index.tsx at line 44:

    if (shouldUseViewAction || isChildListItem) {
        const text = translate(actionTranslationsMap[CONST.SEARCH.ACTION_TYPES.VIEW]);
        // ... renders "View" button
    }

    When isChildListItem is true (which happens when viewing transactions in the expanded table), the ActionCell component ignores the actual action and always shows "View" instead of respecting the UNDELETE action.

    The flow:

    1. getActions() in SearchUIUtils correctly returns [CONST.SEARCH.ACTION_TYPES.UNDELETE] for deleted transactions
    2. The action is passed to ActionCell via TransactionItemRow
    3. However, ActionCell has a hardcoded override: if isChildListItem is true, it always shows "View"
    4. This causes deleted transactions to show a non-functional "View" button instead of "Undelete"

    The PR added UNDELETE to shouldUseViewAction check would be wrong (line 42), but the real issue is that UNDELETE should be excluded from the isChildListItem override logic entirely, similar to how PAY is handled separately.

    Fix Strategy

    The fix should add special handling for UNDELETE action in ActionCell to prevent it from being overridden by the isChildListItem check. This is a small, targeted change that wont affect other functionality.

  6. MelvinBot commented on Mar 31, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    There are two related bugs that cause the non-functional "View" button to appear instead of "Undelete" when using group-by:from status:undelete:

    1. ActionCell always renders "View" for child list items, ignoring the actual action.

    In ActionCell/index.tsx:44, the condition:

    if (shouldUseViewAction || isChildListItem) {
    

    …short-circuits to always render a "View" button when isChildListItem is true. When transactions are displayed inside an expanded group (group-by:from), TransactionGroupListExpanded passes isReportItemChild which flows as isChildListItem={true} to ActionCell. This overrides the actual action value — even though getActions() in SearchUIUtils.ts correctly returns UNDELETE for deleted transactions (line ~1948-1950), the isChildListItem check ignores it.

    2. onUndelete callback is not wired through grouped item components.

    TransactionGroupListExpanded hardcodes onButtonPress to openReportInRHP(transaction) (line ~232-234), bypassing handleActionButtonPress which contains the UNDELETE case handler. Neither TransactionGroupListItem nor TransactionGroupListExpanded accept or pass an onUndelete callback.

    In contrast, the non-grouped view works correctly: TransactionListItem renders TransactionItemRow without isReportItemChild, and properly threads onUndelete through handleActionButtonPress.

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

    1. Fix ActionCell/index.tsx: Modify the condition at line 44 so that isChildListItem does not override action types that require a specific button (like UNDELETE). The UNDELETE action should be checked before the isChildListItem short-circuit, so it renders the "Undelete" button even for child items.

    2. Thread onUndelete through the grouped item components: Pass the onUndelete callback from SearchList/index.tsx through TransactionGroupListItem → TransactionGroupListExpanded → TransactionItemRow, so that when the "Undelete" button is pressed for a child item in a group, it calls handleActionButtonPress with the UNDELETE action (which triggers onUndelete), rather than calling openReportInRHP.

    What alternative solutions did you explore? (Optional)

    An alternative would be to modify TransactionGroupListExpanded to not pass isReportItemChild for deleted transactions. However, this would be a less clean approach because isReportItemChild affects other styling/behavior beyond just the action button, and conditionally removing it could cause visual inconsistencies.


    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.

  7. 3 remaining items

  8. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Apr 7, 2026
  9. changed the title [-]Reports - Non functional View button is shown instead of Undelete button[/-] [+][Due for payment 2026-04-14] Reports - Non functional View button is shown instead of Undelete button[/+] on Apr 7, 2026
  10. melvin-bot commented on Apr 7, 2026

    @melvin-bot

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

  11. 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. 🎊

    For reference, here are some details about the assignees on this issue:

    • @mhawryluk does not require payment (Contractor)
  12. melvin-bot commented on Apr 7, 2026

    @melvin-bot

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

  13. melvin-bot commented on Apr 7, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.EngineeringReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions