Skip to content

Reports - App returns to Inbox instead of Reports after deleting expense on Reports #69043

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.1.98-0
Reproducible in staging?: Y
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from TestRail: #67999
Email or phone of affected tester (no customers): sdjoinsdjdosjdos1@gmail.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat
  3. Submit an expense to the workspace chat
  4. Go to Reports > Reports
  5. Open the expense report from Step 3
  6. Click More > Delete

Expected Result:

App will return to Reports after deleting expense on Reports

Actual Result:

App returns to Inbox instead of Reports after deleting expense on Reports

Workaround:

Unknown

Platforms:

Select the officially supported platforms where the issue was reproduced:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop
Platforms Tested: On which of our officially supported platforms was this issue tested:
  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
Bug6924124_1755884310680.delete_expense.mp4

View all open jobs on GitHub

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 22, 2025
  2. melvin-bot commented on Aug 22, 2025

    @melvin-bot

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

  3. melvin-bot commented on Aug 22, 2025

    @melvin-bot

    Triggered auto assignment to @thienlnam (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  4. github-actions commented on Aug 22, 2025

    @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. melvin-bot commented on Aug 22, 2025

    @melvin-bot

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

  6. lanitochka17 commented on Aug 22, 2025

    @lanitochka17
    Author

    Production:

    Recording.3657.mp4
  7. samranahm commented on Aug 22, 2025

    @samranahm
    Contributor

    Proposal

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

    Reports - App returns to Inbox instead of Reports after deleting expense on Reports

    What is the root cause of that problem?

    When deleting a money request from the Search > Money Request Report screen, we always relay on getNavigationUrlOnMoneyRequestDelete to decide which report to navigate next.
    However, in the Search flow, there's no logic to navigate back from MONEY_REQUEST_REPORT after deleting expense.

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

    we should explicitly check the route and canGoBack and go back to previous page safely

    like we did here

    const handleGoBackAfterDeleteExpenses = useCallback(() => {
    if (route.name === SCREENS.SEARCH.MONEY_REQUEST_REPORT) {
    if (navigationRef.canGoBack()) {
    Navigation.goBack();

    we can add this logic

    if (route.name === SCREENS.SEARCH.MONEY_REQUEST_REPORT && navigationRef.canGoBack()) {
        Navigation.goBack();
        return;
    }

    above the goBackRoute check

    if (goBackRoute) {
    Navigation.setNavigationActionToMicrotaskQueue(() => navigateOnDeleteExpense(goBackRoute));
    }

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

    N/A

    What alternative solutions did you explore? (Optional)

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  8. thienlnam commented on Aug 25, 2025

    @thienlnam
    Contributor

    Guessing this will be fixed by this revert #69183

  9. aldo-expensify commented on Aug 25, 2025

    @aldo-expensify
    Contributor

    Yep, this is working now

    Screen.Recording.2025-08-25.at.2.31.17.PM.mov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2Engineering

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions