Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.43k stars 2.8k forks source link

[$250] Expenses - Deleting expense, leads user to inbox, but search icon keeps marked in green #44161

Closed izarutskaya closed 2 months ago

izarutskaya commented 3 months ago

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.0.0-0 Reproducible in staging?: Y Reproducible in production?: Y Email or phone of affected tester (no customers): bellicoignacio@gmail.com Logs: https://stackoverflow.com/c/expensify/questions/4856 Issue reported by: Applause-Internal team

Action Performed:

  1. Open the https://staging.new.expensify.com/ website.
  2. Tap on the search icon.
  3. Open any expense.
  4. Tap on the three dots icon.
  5. Tap on "Delete Expense"
  6. Tap on "Delete"
  7. Tap on the arrow on the top left corner.
  8. Check which category is the user redirected and which icon is marked at the bottom of the screen.
  9. Tap on the search icon.
  10. Check if any action is triggered.
  11. Tap on the inbox icon.
  12. Tap on the search icon again.

Expected Result:

After deleting an expense, the user should be redirected to the search section again, and in case of being redirected to inbox section, the inbox icon should be marked in green.

Actual Result:

After deleting an expense, the user is redirected to the inbox section, but it's the search icon the one that is marked in green, despite the user not being in that section. To go back to the search section, the user has to tap on the inbox icon and after that, tap on the search icon again.

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

Screenshots/Videos

https://github.com/Expensify/App/assets/115492554/fe756af1-396b-41ec-8c3a-5a38f349e136

View all open jobs on GitHub Bug6519124_1718865047455!71b10c03-44ce-4d65-96c6-0c11ce500927

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01b5ad166859e0b136
  • Upwork Job ID: 1805196266971123586
  • Last Price Increase: 2024-07-15
Issue OwnerCurrent Issue Owner: @suneox
melvin-bot[bot] commented 3 months ago

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

izarutskaya commented 3 months ago

We think this issue might be related to the #collect project.

melvin-bot[bot] commented 3 months ago

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

melvin-bot[bot] commented 3 months ago

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

huult commented 3 months ago

Proposal

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

Deleting expense, leads user to inbox, but search icon keeps marked in green

What is the root cause of that problem?

The issue arises due to the persistence of navigation state within React Navigation, particularly in scenarios involving nested navigators such as BottomTabNavigator and StackNavigator. Specifically, when navigating from the 'Tab Search' to the 'Report' screen, the state of the 'Tab Search's navigation stack (StackNavigator) remains intact.

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

We need reset the navigation stack or ensure a consistent starting point after certain actions.

// App/src/pages/home/ReportScreen.tsx
const onBackButtonPress = useCallback(() => {
    if (isReportOpenInRHP) {
        Navigation.dismissModal();
        return;
    }
+   Navigation.setShouldPopAllStateOnUP();
    Navigation.goBack(undefined, false, true);
}, [isReportOpenInRHP]);
POC https://github.com/Expensify/App/assets/20178761/695536eb-8dbe-4ff3-9f5a-610fa939b027 ### What alternative solutions did you explore? (Optional)
suneox commented 3 months ago

Thanks, @huult proposal

Your RCA is not detailed enough, so doesn't identify the root cause of the error. Additionally, your solution is not reasonable because it causes regression when going to the report thread or report detail after press the back button leads to the home screen instead of the parent report.

suneox commented 3 months ago

We're still looking proposal, I've posted to slack to get more eyes on this

melvin-bot[bot] commented 3 months ago

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

suneox commented 3 months ago

Still open for proposals.

mvtglobally commented 3 months ago

Issue not reproducible during KI retests. (First week)

melvin-bot[bot] commented 3 months ago

@suneox, @bfitzexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

suneox commented 3 months ago

Confirmed, this issue doesn’t happen on the latest staging, but the deleted expense still displays, so the user can access it and see an error page.

https://github.com/Expensify/App/assets/11959869/783412a1-3e00-4de4-bdb3-834d085160df

melvin-bot[bot] commented 3 months ago

@suneox @bfitzexpensify this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

melvin-bot[bot] commented 2 months ago

📣 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] commented 2 months ago

@suneox, @bfitzexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

suneox commented 2 months ago

@bfitzexpensify have we got any ticket to handle the issue where the deleted expense still displays, so the user can access it and see an error page based on this comment?

melvin-bot[bot] commented 2 months ago

@suneox, @bfitzexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

suneox commented 2 months ago

Issue not reproducible on latest staging

melvin-bot[bot] commented 2 months ago

📣 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] commented 2 months ago

@suneox, @bfitzexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

suneox commented 2 months ago

Issue not reproducible waiting KI retests

bfitzexpensify commented 2 months ago

Asking QA to re-test

mvtglobally commented 2 months ago

Issue not reproducible during KI retests. (Second week)

https://github.com/user-attachments/assets/e8ab0a1b-e5da-4148-b6d5-47d0cf3ac99f

bfitzexpensify commented 2 months ago

Nice, closing