Skip to content

[$250] Expense - RHP back button reopens confirm page after creating workspace via Rate field #83265

Closed

Description

@mitarachim

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.25-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: #82987
Email or phone of affected tester (no customers): sdoisjndoisdjnosjdioj@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.2 / Chrome
App Component: Money Requests

Action Performed:

Precondition:

  • Disable Submissions in Workflows settings in default workspace.
  1. Go to staging.new.expensify.com
  2. Open FAB > Track distance > Manual.
  3. Enter amount > Next.
  4. On confirm page, click Rate.
  5. Click Upgrade > Got it, thanks.
  6. Enter a rate and save it.
  7. On confirm page, click RHP back button.

Expected Result:

RHP back button will return to the initial page.

Actual Result:

RHP back button reopens confirm page after creating workspace via Rate field.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7086442_1771885611044.9.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @shubham1206agra
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022026081709911014845
  • Upwork Job ID: 2026081709911014845
  • Last Price Increase: 2026-02-23

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    DeployBlockerIndicates it should block deploying the API
    on Feb 23, 2026
  2. melvin-bot commented on Feb 23, 2026

    @melvin-bot

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

  3. melvin-bot commented on Feb 23, 2026

    @melvin-bot

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

  4. melvin-bot commented on Feb 23, 2026

    @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.

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

    @OSBotify
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: #82987 - "IOU - Rate field disabled if destination is self DM and no workspace during manual track distance" by @lorretheboy (High confidence)
    Related Issues: #82594 (original issue that PR #82987 fixed)

    Recommendation: REVERT

    PR #82987 fixed an issue where the Rate field was not clickable during manual distance tracking when no workspace exists. However, the fix exposed a pre-existing navigation bug in the upgrade flow that causes the RHP back button to malfunction after creating a workspace via the Rate field.

    Reverting PR #82987 will restore the previous behavior where the Rate field is disabled when no workspace exists, preventing users from encountering this navigation issue.

    Labels: This is a Frontend bug. Both DeployBlockerCash and DeployBlocker labels should remain until the issue is resolved, as this affects the track distance flow which is a core feature.

    📋 Detailed Analysis

    Evidence

    PR #82987 modified src/components/MoneyRequestConfirmationListFooter.tsx to change the isRateInteractive condition from:

    !!rate && !isReadOnly && iouType !== CONST.IOU.TYPE.SPLIT && !isUnreported

    to:

    !!rate && !isReadOnly && iouType !== CONST.IOU.TYPE.SPLIT && (!isUnreported || isTrackExpense)

    This change allows the Rate field to be clickable when isTrackExpense is true, even when isUnreported is true (meaning no workspace exists). This enables users to click Rate > Upgrade > create a workspace > set a rate.

    Verification

    The bug reproduction steps exactly match the new functionality introduced by PR #82987:

    1. User has no workspace (isUnreported = true)
    2. User creates track distance expense (isTrackExpense = true)
    3. Rate field is now clickable (due to PR IOU - Rate field disabled if destination is self DM and no workspace during manual track distance #82987)
    4. User goes through upgrade flow and creates workspace
    5. Navigation breaks when trying to go back

    I verified that:

    Root Cause

    The bug is caused by a navigation issue in src/pages/iou/request/step/IOURequestStepUpgrade.tsx in the afterUpgradeAcknowledged function. When the user completes the distance rate upgrade flow, the code:

    1. Calls Navigation.goBack(backToRoute) where backToRoute is the confirmation page
    2. Then immediately calls navigateWithMicrotask(ROUTES.WORKSPACE_CREATE_DISTANCE_RATE_UPGRADE.getRoute(...)) to navigate to the rate selection page

    This navigation sequence creates a malformed navigation stack where the back button behavior is broken. The issue existed in the codebase before PR #82987, but was not exposed because the Rate field was previously disabled when no workspace existed, preventing users from entering the upgrade flow in this scenario.

  7. 12 remaining items

  8. suneox commented on Feb 24, 2026

    @suneox
    Contributor

    @lorretheboy Could you take another look at this issue with the current change set?

    We can reproduce this issue when there's at least one workspace.

  9. lorretheboy commented on Feb 24, 2026

    @lorretheboy
    Contributor

    Sure, I will take a look asap

  10. removed
    Help WantedApply this label when an issue is open to proposals by contributors
    on Feb 24, 2026
  11. melvin-bot commented on Feb 24, 2026

    @melvin-bot

    📣 @lorretheboy You have been assigned to this job!
    Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
    Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs!
    Keep in mind: Code of Conduct | Contributing 📖

  12. dangrous commented on Feb 24, 2026

    @dangrous
    Contributor

    @MelvinBot will your suggestion of adding {compareParams: false} cause any new regressions in other flows that go through the upgrade distance rates path?

  13. MelvinBot commented on Feb 24, 2026

    @MelvinBot
    Contributor

    Good question. I investigated all callers and the fix is safe — here's why:

    There is exactly one caller that triggers the DISTANCE_RATES upgrade path: MoneyRequestConfirmationListFooter.tsx:608-621 (the Rate field onPress). It always passes shouldSubmitExpense: true. No other code in the codebase uses UPGRADE_PATHS.DISTANCE_RATES.

    compareParams: false is already used downstream in the same flow. CreateDistanceRatePage.tsx:71 — after the user sets a rate, it navigates back to STEP_CONFIRMATION with CONST.IOU.TYPE.SUBMIT and compareParams: false:

    Navigation.goBack(ROUTES.MONEY_REQUEST_STEP_CONFIRMATION.getRoute(
        CONST.IOU.ACTION.CREATE, CONST.IOU.TYPE.SUBMIT, transactionID, reportID
    ), {compareParams: false});

    This is the exact same pattern proposed for the fix, and it already works correctly in production.

    The shouldSubmitExpense: false path is unaffected. When backToRoute is undefined, goBack() does a regular pop without calling goUp at all. The fix only affects the truthy backToRoute path.

    What compareParams: false does here: Instead of REPLACE (which creates a duplicate), goUp dispatches POP_TO — this pops the upgrade screen and replaces the existing confirmation's params in-place (updating iouType from track to submit). The transactionID and reportID remain the same, so no data loss.

    It's a well-established pattern — compareParams: false is used in 20+ other call sites across the IOU flow, including IOURequestStepParticipants.tsx:206, IOURequestStepReport.tsx:139, IOURequestStepConfirmation.tsx:445, and IOUUtils.ts:24-45.

    So no, it should not cause regressions.

  14. m-natarajan commented on Feb 25, 2026

    @m-natarajan

    Issue repro if Track distance clicked from Global +, Not repro if clicked from self DM, Win 11, Chrome, 9.3.25-13

    Recording.2426.mp4
  15. dangrous commented on Feb 25, 2026

    @dangrous
    Contributor

    I just tried this on staging and prod and am not getting this behavior on either. I think we can close this, and we'll just be sure to double check these repro steps when we re-raise the solution to #82594

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.EngineeringExternalAdded to denote the issue can be worked on by a contributorHourlyKSv2ReviewingHas a PR in review

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions