Skip to content

Navigation - Repeating navigation after submitting expense and returning via device gesture #57497

Closed

Description

@vincdargento

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.6-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): applausetester+sj9032@applause.expensifail.com
Issue reported by: Applause Internal Team
Device used: iPhone 15 Pro Max / iOS 18.3
App Component: Money Requests

Action Performed:

  1. Launch ND or hybrid app.
  2. Go to workspace chat that has no unsettled expense.
  3. Submit an expense to the workspace chat.
  4. Tap on the expense preview to go to expense report.
  5. Tap + > Create expense.
  6. Submit another expense in the expense report.
  7. Swipe to right to go back (iOS gesture) - Result 1.
  8. Swipe to right to go back (iOS gesture) - Result 2.
  9. Swipe to right to go back (iOS gesture) - Result 3.
  10. Swipe to right to go back (iOS gesture) - Result 4.
  11. Swipe to right to go back (iOS gesture) - Result 5.
  12. Swipe to right to go back (iOS gesture) - Result 6.
  13. Swipe to right to go back (iOS gesture) - Result 7.
  14. Swipe to right to go back (iOS gesture) - Result 8.

Expected Result:

In Step 7, app will return to main workspace chat.
In Step 8, app will return to LHN.

Actual Result:

Result 1 (Step 7) - App returns to LHN.
Result 2 (Step 8) - App returns to expense report.
Result 3 (Step 9) - App returns to LHN.
Result 4 (Step 10) - App returns to expense report.
Result 5 (Step 11) - App returns to Create expense page.
Result 6 (Step 12) - App returns to expense report.
Result 7 (Step 13) - App returns to main workspace chat.
Result 8 (Step 14) - App returns to LHN.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

bug.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @WojtekBoman

Activity

  1. added
    Bug
    Daily
    on Feb 26, 2025
  2. melvin-bot commented on Feb 26, 2025

    @melvin-bot

    Triggered auto assignment to @trjExpensify (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. trjExpensify commented on Feb 27, 2025

    @trjExpensify
    Contributor

    @mountiny who would be good to look at this, and also is it worth it if we're making changes? 🤔

  4. self-assigned this
    on Mar 2, 2025
  5. mountiny commented on Mar 2, 2025

    @mountiny
    Contributor

    @WojtekBoman @adamgrzybowski would you be able to look into this one?

  6. mountiny commented on Mar 2, 2025

    @mountiny
    Contributor

    I think it is worth checking this one out

  7. WojtekBoman commented on Mar 3, 2025

    @WojtekBoman
    Contributor

    Hi, I've already looked into this and I think I've found the root cause of this problem.

    It's caused by the race condition that appears when we're requesting money second time from the expense report.
    In this case the app tries to navigate to the report twice from:

    1. the scrollToBottomForCurrentUserAction method from src/pages/home/report/ReportActionsList.tsx it's triggered and Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(report.reportID)); is called.
    2. the requestMoney function from src/libs/actions/IOU.ts tries to dismiss the rhp and then navigate, but scrollToBottomForCurrentUserAction is called earlier. As a result, the RHP is not dismissed and we navigate to the same report second time.

    I'm wondering if Navigation.navigate should be called in this case from scrollToBottomForCurrentUserAction. This issue appears only on native platforms as this method is not called on web.

    @rinej Could you take a look at it? I see that you worked on scrollToBottomForCurrentUserAction and know how it should work. Should this method be called in this case? I'd like to fix it properly without causing new bugs :D

  8. moved this to Bugs and Follow Up Issues in #expensify-bugson Mar 3, 2025
  9. trjExpensify commented on Mar 3, 2025

    @trjExpensify
    Contributor

    Excellent. @WojtekBoman, I've assigned you for now. 👍

  10. mountiny commented on Mar 3, 2025

    @mountiny
    Contributor

    Raised in here as well for a faster resolution

  11. 14 remaining items

  12. WojtekBoman commented on Mar 14, 2025

    @WojtekBoman
    Contributor

    I will work on that :)

  13. mountiny commented on Mar 14, 2025

    @mountiny
    Contributor

    🎉

  14. melvin-bot commented on Mar 18, 2025

    @melvin-bot

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

  15. mountiny commented on Mar 18, 2025

    @mountiny
    Contributor

    @WojtekBoman what is your eta for a pr?

  16. WojtekBoman commented on Mar 18, 2025

    @WojtekBoman
    Contributor

    It should be ready by the end of the week

  17. WojtekBoman commented on Mar 20, 2025

    @WojtekBoman
    Contributor

    I believe I know how to fix this, but I would wait for that PR that is waiting to be merged as its logic is closely related to the code I need to touch to fix this issue

    cc @mountiny

  18. mountiny commented on Mar 20, 2025

    @mountiny
    Contributor

    Merging, lets also hope its not going to be reverted due to some blockers

  19. added
    Reviewing
    Weekly
    and removed
    Daily
    on Mar 21, 2025
  20. mountiny commented on Mar 24, 2025

    @mountiny
    Contributor

    I think we might be good to go here, nobody external to pay on this issue

  21. moved this from Bugs and Follow Up Issues to Done in #expensify-bugson Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugReviewingWeekly

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions