Skip to content

[$250] RHP reopens confirm page after changing member and clicking back button twice #83484

Closed

Description

@jponikarchuk

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.26-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #82683
Email or phone of affected tester (no customers): sdjsiodjsnodjsonjsio@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.2 / Chrome
App Component: Workspace Settings

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace settings > Members.
  3. Click Invite member.
  4. Enter email > select user > Next.
  5. On confirm page, click Invite member.
  6. Enter email > select user > Next.
  7. Click RHP back button twice.

Expected Result:

RHP will close.

Actual Result:

RHP reopens confirm page after changing member on confirm page and clicking back button twice.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @eVoloshchak
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022026753858625901997
  • Upwork Job ID: 2026753858625901997
  • Last Price Increase: 2026-02-25

Activity

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

    @melvin-bot

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

  3. melvin-bot commented on Feb 25, 2026

    @melvin-bot

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

  4. melvin-bot commented on Feb 25, 2026

    @melvin-bot

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

  5. github-actions commented on Feb 25, 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.
  6. OSBotify commented on Feb 25, 2026

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: #82683 - "feat: [CFI] Add Approver row on the member invite confirmation page" by @TaduJR (High confidence)
    Related Issues: #81594 (similar navigation regression that PR #82683 attempted to fix)

    Recommendation: REVERT

    PR #82683 introduced a navigation bug in the member invite flow. The issue occurs when navigating back through the invite member flow after changing members on the confirmation page.

    Labels: No label changes needed - this is correctly labeled as DeployBlockerCash since it is a Frontend bug that requires fixing/reverting an App PR.

    Detailed Analysis

    Evidence

    In PR #82683, a change was made to line 271 of src/pages/workspace/members/WorkspaceInviteMessageComponent.tsx:

    Before (correct):

    Navigation.goBack(backTo);

    After (buggy):

    Navigation.navigate(ROUTES.WORKSPACE_INVITE.getRoute(policyID, Navigation.getActiveRoute()));

    Root Cause

    When the user clicks the "Members" row on the confirmation page, the code now calls Navigation.navigate() with Navigation.getActiveRoute() as the backTo parameter. This creates a circular navigation chain where:

    1. User is on Confirm page (Route A)
    2. User clicks Members row
    3. Code navigates to Invite page with backTo = Route A (Confirm page)
    4. User selects member and clicks Next, returns to Confirm page (Route A)
    5. Navigation stack now has: Invite page -> Confirm page -> Invite page (with backTo pointing back to Confirm)
    6. When user clicks back button twice, instead of closing the RHP, it navigates back to Confirm page again

    The correct behavior (from the old code) was to use Navigation.goBack(backTo), which would properly traverse the navigation stack without creating circular references.

    Verification

  7. MelvinBot commented on Feb 25, 2026

    @MelvinBot
    Contributor

    Proposal

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

    When a user is on the invite confirmation page (Confirm details) in the RHP and clicks the "Members" row to change the invited member, then selects a new member and clicks Next, pressing the RHP back button twice should close the RHP. Instead, the RHP reopens a stale copy of the confirmation page.

    What is the root cause of that problem?

    PR #82683 changed the "Members" row onPress handler on the confirmation page (WorkspaceInviteMessageComponent.tsx:271) from Navigation.goBack(backTo) to Navigation.navigate(ROUTES.WORKSPACE_INVITE.getRoute(policyID, Navigation.getActiveRoute())).

    The old code popped back to the existing invite page on the navigation stack. The new code pushes a new invite page on top of the stack (because linkTo converts all NAVIGATE actions to PUSH). This creates duplicate entries:

    Step Action RHP Stack
    1 Click "Invite member" on Members page [INVITE]
    2 Select user → Next [INVITE, INVITE_MESSAGE]
    3 Click "Members" row on confirm page [INVITE, INVITE_MESSAGE, INVITE] ← duplicate pushed
    4 Select new user → Next [INVITE, INVITE_MESSAGE, INVITE, INVITE_MESSAGE] ← duplicate pushed
    5 Press Back [INVITE, INVITE_MESSAGE, INVITE]
    6 Press Back [INVITE, INVITE_MESSAGE] ← stale confirm page shown instead of closing

    Here is the specific diff from PR #82683 that introduced the regression (WorkspaceInviteMessageComponent.tsx:271):

    -  Navigation.goBack(backTo);
    +  Navigation.navigate(ROUTES.WORKSPACE_INVITE.getRoute(policyID, Navigation.getActiveRoute()));

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

    Revert the "Members" row onPress handler back to Navigation.goBack(backTo) at src/pages/workspace/members/WorkspaceInviteMessageComponent.tsx:271.

    This correctly pops back to the existing WORKSPACE_INVITE page on the stack rather than pushing a duplicate. The invite draft data is stored in Onyx (WORKSPACE_INVITE_MEMBERS_DRAFT), so the invite page will display the correct state when navigated back to.

    What alternative solutions did you explore? (Optional)

    An alternative would be to pass {forceReplace: true} to the navigate call so it replaces the current screen instead of pushing. However, goBack(backTo) is simpler, matches the original working behavior, and doesn't leave orphaned screens on the stack.


    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, or @MelvinBot <your feedback> to refine this analysis.

  8. 3 remaining items

  9. melvin-bot commented on Feb 25, 2026

    @melvin-bot

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

  10. melvin-bot commented on Feb 25, 2026

    @melvin-bot
  11. changed the title [-]RHP reopens confirm page after changing member and clicking back button twice[/-] [+][$250] RHP reopens confirm page after changing member and clicking back button twice[/+] on Feb 25, 2026
  12. melvin-bot commented on Feb 25, 2026

    @melvin-bot

    📣 @keiru517! 📣
    Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
    Please follow these steps:

    1. Make sure you've read and understood the contributing guidelines.
    2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
    3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
    4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
      Screen Shot 2022-11-16 at 4 42 54 PM
      Format:
    Contributor details
    Your Expensify account email: <REPLACE EMAIL HERE>
    Upwork Profile Link: <REPLACE LINK HERE>
    
  13. keiru517 commented on Feb 25, 2026

    @keiru517

    🚨 Edited by proposal-police: This proposal was edited at 2026-02-26 00:08:30 UTC.

    Proposal

    The reason of this behavior is that the stack becomes something like:

    1. Invite (A)
    2. Confirm (B) <- backTo = A
    3. Invite (A2) <- backTo = B
    4. Confirm (B2) <- backTo = A2

    If I click back button twice on B2 page, it goes to B page which is Confirm (B).

    Solution

    Option 1. Remove duplicated records to the stack.
    Option 2. Need to use Navigation.popToTop() instead of using Navigation.goBack(backTo)
    Option 3. Whichever navigation call transitions to Confirm should use the wrapper's replace option like this. Navigation.navigate(ROUTE.WORKSPACE_INVITE_MESSAGE_CONFIRM.getRoute(policyId, ...), {forceReplace: true})

    Contributor details
    Your Expensify account email: ihorusach@gmail.com
    Upwork Profile Link: https://www.upwork.com/freelancers/~01970f49248499b215?mp_source=share

  14. melvin-bot commented on Feb 25, 2026

    @melvin-bot

    ✅ Contributor details stored successfully. Thank you for contributing to Expensify!

  15. removed
    ExternalAdded to denote the issue can be worked on by a contributor
    Help WantedApply this label when an issue is open to proposals by contributors
    on Feb 26, 2026
  16. inimaga commented on Feb 26, 2026

    @inimaga
    Contributor

    Asked for a retest here.

  17. IuliiaHerets commented on Feb 26, 2026

    @IuliiaHerets

    @inimaga Chrome / v9.3.26-4
    The issue is not reproducible anymore

    Screen.Recording.2026-02-26.at.13.04.36.mp4
  18. inimaga commented on Feb 26, 2026

    @inimaga
    Contributor

    Thanks for confirming. Closing.

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.EngineeringHourlyKSv2ReviewingHas a PR in review

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions