Skip to content

[Due for payment 2026-09-01] Expense -Back button on confirm page leads to report again while sending expense to someone #99145

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.4.58-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: #97883
Email or phone of affected tester (no customers): ibellicotest+2766@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Motorola MotoG60 / Android 12 (Hybrid app) - Windows 11 / Chrome
App Component: Money Requests

Action Performed:

Prerequisite: Account has Self DM.

  1. Open the staging.new.expensify.com website.
  2. Navigate to Self DM.
  3. Create a manual expense.
  4. Open the just created expense.
  5. Click on "More" > "Send to someone"
  6. Select any recipient.
  7. On confirm page, click on back button on the top left corner.
  8. Note that you are redirected to report instead of landing on recipient list again.

Expected Result:

Clicking on back button on confirm page during "Send to someone" process, should return to recipients list instead of navigating to report again.

Actual Result:

Clicking on back button on confirm page while sending expense to someone, leads to report again instead of navigating to recipients list.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7238922_1787287400032.Send_to.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7238922

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

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

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/1b58fcb15f5f87ec12f7dbb0187d518cb3abf6aa9cc77d3f12046f08d918625c

  3. melvin-bot commented on Aug 21, 2026

    @melvin-bot

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

  4. melvin-bot commented on Aug 21, 2026

    @melvin-bot

    @tgolen @luacmartins @ikevin127 you have been assigned to this deploy blocker because you reviewed the offending PR: #97883

  5. melvin-bot commented on Aug 21, 2026

    @melvin-bot

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

  6. github-actions commented on Aug 21, 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.
  7. MelvinBot commented on Aug 21, 2026

    @MelvinBot
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: #97883 - "Land Looking-Around users in Spend > Expenses and add "Send to someone" to a tracked expense's More menu" by @MelvinBot (High confidence)
    Related Issues: #97881 (the feature request this PR implemented)

    Recommendation: ROLL FORWARD

    The defect is a small back-navigation edge case in shared IOU navigation code that this PR newly exposed through the added "Send to someone" More-menu entry point; a targeted fix is safer than a full revert, which would also drop the valuable "Looking-Around users land in Spend > Expenses" fix (Bug 1) bundled in the same PR.

    Assigned: @MelvinBot (PR author), @ikevin127, @luacmartins, @tgolen (approving reviewers) from the causing PR
    Labels: No changes. DeployBlockerCash is correctly retained (App-side fix required, and the issue is not reproducible in production — new feature). No DeployBlocker present to remove.

    📋 Detailed Analysis

    Evidence

    • PR Land Looking-Around users in Spend > Expenses and add "Send to someone" to a tracked expense's More menu #97883 added the "Send to someone" row to the tracked-expense More menu — it is the only entry point to this exact flow, and it did not exist before this PR. The bug is reproducible on staging only (new feature, not in production), which matches this PR shipping on the 2026-08-21 staging deploy (v9.4.58-0, checklist Deploy Checklist: New Expensify 2026-08-21 #99121).
    • The new row calls createDraftTransactionAndNavigateToParticipantSelector({ actionName: CONST.IOU.ACTION.SUBMIT, ... }), opening the "Choose a recipient" picker. See the added handler at src/components/MoneyRequestHeaderSecondaryActions.tsx L624-655:
      [CONST.REPORT.TRANSACTION_SECONDARY_ACTIONS.SEND_TO_SOMEONE]: {
      text: translate('iou.sendToSomeone'),
      icon: expensifyIcons.Send,
      value: CONST.REPORT.TRANSACTION_SECONDARY_ACTIONS.SEND_TO_SOMEONE,
      onSelected: () => {
      if (isDelegateAccessRestricted) {
      showDelegateNoAccessModal();
      return;
      }
      createDraftTransactionAndNavigateToParticipantSelector({
      reportID: parentReport?.reportID,
      actionName: CONST.IOU.ACTION.SUBMIT,
      reportActionID: getTrackExpenseActionableWhisper(transaction?.transactionID, parentReport?.reportID, parentReportActions)?.reportActionID,
      reportActions: parentReportActions,
      introSelected,
      draftTransactionIDs,
      activePolicy,
      userBillingGracePeriodEnds,
      amountOwed,
      ownerBillingGracePeriodEnd,
      isRestrictedToPreferredPolicy,
      preferredPolicyID,
      transaction,
      currentUserAccountID: accountID,
      currentUserEmail: currentUserLogin ?? '',
      currentUserLocalCurrency: localCurrencyCode ?? CONST.CURRENCY.USD,
      filteredPoliciesCount: filteredPoliciesInfo?.filteredPoliciesCount ?? 0,
      firstPolicyID: filteredPoliciesInfo?.firstPolicyID,
      });
      },
      },
    • PR Land Looking-Around users in Spend > Expenses and add "Send to someone" to a tracked expense's More menu #97883 did not modify the confirmation-page back-button logic (navigateBack) or navigateToStartMoneyRequestStep; those are pre-existing shared code. The regression is that the PR routed a converted-track SUBMIT draft into that shared code, which does not return to the recipient list for this case.

    Verification

    Affected files / code path (all in Expensify/App, confirmed on current HEAD 1465a42):

    1. Entry point (added by the PR): src/components/MoneyRequestHeaderSecondaryActions.tsx L624-655 — creates a draft track→submit transaction and navigates to the participant selector.
    2. Participant → confirmation nav: src/hooks/useParticipantSubmission.ts L407-428 — goToNextStep builds the confirmation route with backTo left undefined for non-SHARE actions, then Navigation.goBack(route, {compareParams: false}) replaces the participants page in the RHP stack.
      const iouConfirmationPageRoute = ROUTES.MONEY_REQUEST_STEP_CONFIRMATION.getRoute(
      action,
      iouType === CONST.IOU.TYPE.CREATE || iouType === CONST.IOU.TYPE.TRACK ? CONST.IOU.TYPE.SUBMIT : iouType,
      initialTransactionID,
      newReportID,
      undefined,
      undefined,
      action === CONST.IOU.ACTION.SHARE ? Navigation.getActiveRoute() : undefined,
      );
      const route = isCategorizing
      ? createDynamicRoute(
      DYNAMIC_ROUTES.MONEY_REQUEST_STEP_CATEGORY.getRoute({action, iouType, transactionID: initialTransactionID, reportID: selectedReportID.current || reportID}),
      iouConfirmationPageRoute,
      )
      : iouConfirmationPageRoute;
      KeyboardUtils.dismissKeyboardAndExecute(() => {
      // We wrap navigation in setNavigationActionToMicrotaskQueue so that data loading in Onyx and navigation do not occur simultaneously, which resets the amount to 0.
      // More information can be found here: https://github.com/Expensify/App/issues/73728
      Navigation.setNavigationActionToMicrotaskQueue(() => {
      Navigation.goBack(route, {compareParams: false});
    3. Confirmation back button: src/pages/iou/request/step/IOURequestStepConfirmation.tsx L732-783 — navigateBack only returns to the participants step when transaction?.isFromGlobalCreate is truthy; otherwise it falls through to navigateToStartMoneyRequestStep.
      if (backTo) {
      Navigation.goBack(backTo);
      return;
      }
      // If the action is categorize and there's no policies other than personal one, we simply call goBack(), i.e: dismiss the whole flow together
      // We don't need to subscribe to policy_ collection as we only need to check on the latest collection value
      if (action === CONST.IOU.ACTION.CATEGORIZE) {
      Navigation.goBack();
      return;
      }
      if (isPerDiemRequest) {
      if (isMovingTransactionFromTrackExpense || isCreatingTrackExpense) {
      Navigation.goBack();
      return;
      }
      Navigation.goBack(
      createDynamicRoute(
      DYNAMIC_ROUTES.MONEY_REQUEST_STEP_SUBRATE.getRoute(),
      createDynamicRoute(
      DYNAMIC_ROUTES.MONEY_REQUEST_STEP_TIME.path,
      createDynamicRoute(
      DYNAMIC_ROUTES.MONEY_REQUEST_STEP_DESTINATION.path,
      ROUTES.MONEY_REQUEST_CREATE.getRoute(action, iouType, initialTransactionID, reportID, backToReport),
      ),
      ),
      ),
      );
      return;
      }
      if (transaction?.isFromGlobalCreate && !transaction.receipt?.isTestReceipt) {
      // If the participants weren't automatically added to the transaction, then we should go back to the participants step.
      if (!transaction?.participantsAutoAssigned && participantsAutoAssignedFromRoute !== 'true') {
      Navigation.goBack(
      createDynamicRoute(
      // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
      DYNAMIC_ROUTES.MONEY_REQUEST_STEP_PARTICIPANTS.getRoute({action, iouType, transactionID: initialTransactionID, reportID: transaction?.reportID || reportID}),
      ROUTES.MONEY_REQUEST_CREATE.getRoute(action, iouType, initialTransactionID, reportID, backToReport),
      ),
      {compareParams: false},
      );
      return;
      }
      // If the participant was auto-assigned, we need to keep the reportID that is already on the stack.
      // This will allow the user to edit the participant field after going back and forward.
      Navigation.goBack();
      return;
      }
      // This has selected the participants from the beginning and the participant field shouldn't be editable.
      navigateToStartMoneyRequestStep(requestType, iouType, initialTransactionID, reportID, action, backToReport);
    4. Fallback: src/libs/IOUUtils.ts L23-27 — for iouAction === SUBMIT, navigateToStartMoneyRequestStep just calls Navigation.goBack().

      App/src/libs/IOUUtils.ts

      Lines 23 to 27 in 1465a42

      function navigateToStartMoneyRequestStep(requestType: IOURequestType, iouType: IOUType, transactionID: string, reportID: string, iouAction?: IOUAction, backToReport?: string): void {
      if (iouAction === CONST.IOU.ACTION.CATEGORIZE || iouAction === CONST.IOU.ACTION.SUBMIT || iouAction === CONST.IOU.ACTION.SHARE) {
      Navigation.goBack();
      return;
      }

    Root Cause

    The draft created for "Send to someone" is a converted track expense, not a global-create expense, so transaction.isFromGlobalCreate is false. On the confirmation page, pressing back runs navigateBack:

    1. backTo param is undefined (goToNextStep only sets it for the SHARE action) → skipped.
    2. action is SUBMIT, not CATEGORIZE → skipped.
    3. Not per-diem → skipped.
    4. transaction?.isFromGlobalCreate is false → the branch that would Navigation.goBack(participantsRoute) is skipped.
    5. Falls through to navigateToStartMoneyRequestStep(..., iouAction = SUBMIT), which for SUBMIT executes a bare Navigation.goBack().

    Because goToNextStep had already replaced the participants page with the confirmation page in the RHP stack, that bare goBack() pops straight out of the RHP to the underlying report — instead of returning to the recipient list. Hence "back leads to the report again."

    This same shared path also backs the Inbox track-expense whisper's "Submit it to someone" flow; PR #97883 simply made it reachable from the tracked-expense More menu.

    Suggested targeted fix direction (for the assignees to confirm): have this converted-track SUBMIT flow return to the participant selector on back — e.g. pass an explicit backTo (the participants route) when building the confirmation route in useParticipantSubmission.goToNextStep, or handle the action === SUBMIT converted-track case in IOURequestStepConfirmation.navigateBack so it routes back to MONEY_REQUEST_STEP_PARTICIPANTS instead of dismissing. Any change should be validated against the Inbox whisper "Submit it to someone" flow to avoid regressing it.


    view run

  8. self-assigned this
    on Aug 21, 2026
  9. 17 remaining items

  10. melvin-bot commented on Aug 25, 2026

    @melvin-bot

    @ikevin127

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.60-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-09-01. 🎊

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]

  11. ikevin127 commented on Aug 25, 2026

    @ikevin127
  12. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Aug 25, 2026
  13. melvin-bot commented on Aug 31, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  14. melvin-bot commented on Aug 31, 2026

    @melvin-bot

    Payment Summary

    Resolving PRs:

    BugZero Checklist (@mallenexpensify)

    • I have confirmed assignees, roles, and Upwork contracts look correct
    • I have paid out Upwork contracts / manual NewDot requests
    • [BugZero Assignee] I have created a GH issue for creating/updating the regression test once above steps have been agreed upon
  15. ikevin127 commented on Sep 1, 2026

    @ikevin127
    Contributor

    ❌ No payment required here - this one was a follow-up issue which was addressed with a follow-up PR - payment will be handled in the main issue. This one can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions