Skip to content

[Due for payment 2026-06-02] Expense - Expense report RHP animates expectedly when expense flow RHP opens #90657

Closed

Description

@applause-bot

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.74-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: #87920
Email or phone of affected tester (no customers): sdsdjoijdoisnjodis@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:

  • Run Onyx.merge('betas', ['newManualExpenseFlow']); in console.
  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create two expenses.
  4. Open the report.
  5. Click + > Create expense.

Expected Result:

Expense report RHP will not animate when expense flow RHP opens.

Actual Result:

Expense report RHP animates expectedly when expense flow RHP opens.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7153956_1778758988829.14.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Nathan Lemma
Bug ID: 7153956

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 May 14, 2026
  2. applause-bot commented on May 14, 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/9a09653ea8960d7ce9a5290049734b8ce25819018328be9151b8abc0d0add246

  3. melvin-bot commented on May 14, 2026

    @melvin-bot

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

  4. melvin-bot commented on May 14, 2026

    @melvin-bot

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

  5. github-actions commented on May 14, 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. MelvinBot commented on May 14, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    PR #87920 embeds IOURequestStepConfirmation directly inside IOURequestStartPage when the newManualExpenseFlow beta is enabled (IOURequestStartPage.tsx:251-256). This causes a preInsertFullscreenUnderRHP effect (IOURequestStepConfirmation.tsx:443-509) to evaluate immediately when the create-expense RHP opens—rather than later when the user would have navigated to a separate confirmation step.

    The isReportOpenInRHP guard at line 467 only inspects the last route in the root navigation state (isReportOpenInRHP.ts:7). When the money-request RHP has been pushed on top of the expense-report RHP, the last route is the money-request navigator—so isReportOpenInRHP returns false, the guard passes, and preInsertFullscreenUnderRHP fires. This dispatches DISABLE_RHP_ANIMATION / RESTORE_RHP_ANIMATION events (RightModalNavigator.tsx:122-127), toggling the RHP animation from NONE → SLIDE_FROM_RIGHT and causing the expense-report RHP to visibly slide/animate when it shouldn't.

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

    Skip the preInsertFullscreenUnderRHP effect entirely when IOURequestStepConfirmation is rendered in embedded mode (i.e., when shouldHideHeader is true). The pre-insert logic exists for the standalone confirmation screen that will dismiss back to a fullscreen route—when the confirmation is embedded inside IOURequestStartPage within the RHP, the pre-insert is never needed and actively harmful.

    Add shouldHideHeader as an early return guard in the effect at IOURequestStepConfirmation.tsx:444:

    if (hasPreInsertFired.current || !isTransactionReady || !getIsNarrowLayout() || shouldHideHeader) {
        return;
    }
    

    This is the minimal change: it prevents the pre-insert from firing when the component is embedded, without modifying the standalone flow at all.

    What alternative solutions did you explore? (Optional)

    An alternative would be to fix isReportOpenInRHP to scan all routes in the root state (not just the last one) for wide RHP screens. This would make the existing guard catch the case correctly, but it changes the semantics of isReportOpenInRHP globally and could have unintended side effects in other call sites. The shouldHideHeader guard is more targeted and safer.

    Investigation details

    Navigation flow during repro:

    1. User opens expense report → RIGHT_MODAL_NAVIGATOR with EXPENSE_REPORT screen is on the root stack
    2. User taps "+ Create expense" → linkTo pushes a NEW RIGHT_MODAL_NAVIGATOR with MONEY_REQUEST on the root stack
    3. IOURequestStartPage mounts with IOURequestStepConfirmation embedded (beta enabled)
    4. The pre-insert effect evaluates: isReportOpenInRHP checks only state.routes.at(-1) which is the NEW money-request RHP → returns false → isOutsideRHP = true
    5. shouldPreInsertReport evaluates to true → preInsertFullscreenUnderRHP fires after a delay
    6. This emits DISABLE_RHP_ANIMATION, then on cleanup emits RESTORE_RHP_ANIMATION which sets animation to SLIDE_FROM_RIGHT
    7. The expense report RHP underneath visibly animates

    Key code references:


    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.

  7. puneetlath commented on May 14, 2026

    @puneetlath
    Contributor

    Demoting since this only affects those in beta.

  8. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on May 14, 2026
  9. 21 remaining items

  10. melvin-bot commented on Jun 1, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  11. melvin-bot commented on Jun 1, 2026

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@mallenexpensify)

    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
    • I have verified the PR was not reverted
    • I have applied any discounts due to bugs/regressions introduced by this PR
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  12. mallenexpensify commented on Jun 3, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor: @dukenv0307 due $250 via NewDot

    @ChavdaSachin plz complete the BZ checklist and tag me in a post once you have. Thx

  13. ChavdaSachin commented on Jun 3, 2026

    @ChavdaSachin
    Contributor

    This was a regression from my own PR - #91004
    I am not due payment here.
    My payment would be handled at #82586 at the end

  14. mallenexpensify commented on Jun 3, 2026

    @mallenexpensify
    Contributor

    @dukenv0307 same for you too? Payment via the project?
    If so, I'll remove the payment summary (and.. I think I paid a handful of others too that likely need updating)

  15. dukenv0307 commented on Jun 4, 2026

    @dukenv0307
    Contributor

    @mallenexpensify I didn't handle the whole project, I was assigned this issue to help speed up the project. I think that's fair to pay me here cc @trjExpensify

  16. mallenexpensify commented on Jun 4, 2026

    @mallenexpensify
    Contributor

    Thx, updated the payment summary to denote @dukenv0307 is only one due payment

  17. quinthar commented on Jun 13, 2026

    @quinthar
    Contributor

    Approved $250 to @dukenv0307

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