Skip to content

[Due for payment 2026-08-07] Expense - Confirm page shows per diem expense after switching from Per diem to Manual #96578

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

Action Performed:

Precondition:

  • Disable Submissions in Workflows settings.
  • Workspace has per diem rates.
  1. Go to staging.new.expensify.com
  2. Open FAB > Create expense > Per diem.
  3. Create a per diem expense.
  4. Open FAB > Create expense.
  5. Change to Manual tab.

Expected Result:

Confirm page will be manual expense after switching from Per diem to Manual.

Actual Result:

Confirm page shows per diem expense after switching from Per diem to Manual.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7213126_1784604620741.13.mp4

View all open jobs on GitHub

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

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jul 21, 2026
  2. applause-bot commented on Jul 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/d9a5dc3b0f3382de477239a1b83ab9f8574639b01e7182e592d6aff532aee428

  3. melvin-bot commented on Jul 21, 2026

    @melvin-bot

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

  4. melvin-bot commented on Jul 21, 2026

    @melvin-bot

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

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

    @MelvinBot
    Contributor

    Proposal

    Root Cause

    This is a regression from #96228 ("feat: remove isNewManualExpenseFlowEnabled beta flag", merged 2026-07-20, ~1 day before this v9.4.41 build) — not the auto-assigned #90403, which only touches report headers/carousel and is unrelated to expense creation.

    #96228 made the embedded confirmation (IOURequestStepConfirmation) the default content of the Manual tab for everyone (previously beta-gated, so still off in production — which is why this is staging-only). That confirmation derives per‑diem purely from the shared draft transaction:

    const requestType = getRequestType(transaction);
    const isPerDiemRequest = requestType === CONST.IOU.REQUEST_TYPE.PER_DIEM;

    When switching Per diem → Manual, the shared draft is briefly still a per‑diem transaction until the tab-switch reset rebuilds it as manual. The Manual-tab guard in IOURequestStartPage.tsx:227-242 only defers mounting the confirmation while the stale draft is a scan request — it does not defer for a stale per‑diem draft:

    if (isScanRequest(transaction)) {
        // wait for the reset so the manual confirmation mounts once
        manualTabContent = <FullScreenLoadingIndicator .../>;
    } else {
        manualTabContent = <IOURequestStepConfirmation ... />;  // ← mounts against per-diem draft
    }

    So the confirmation mounts against the per‑diem draft and renders per‑diem UI. The "Submissions disabled" precondition matters because it routes the target to the self-DM report (useDefaultParticipants.ts:70-72), making useResetIOUType skip early participant/type seeding and defer resolution — widening the window in which the stale per‑diem draft is shown.

    Recommended Fix

    Since this is a deploy blocker and the regression is isolated to #96228, the fastest safe options are to revert #96228 (or ping its author thelullabyy), or apply this targeted fix:

    Extend the Manual-tab deferral guard in IOURequestStartPage.tsx:228 to also wait out a stale per‑diem draft, mirroring the existing scan handling:

    if (isScanRequest(transaction) || isPerDiemRequest(transaction)) {
        manualTabContent = <FullScreenLoadingIndicator ... />;
    }

    isPerDiemRequest is already exported from @libs/TransactionUtils. Optional defense-in-depth: also reset the persisted SELECTED_TAB when starting a fresh FAB "Create expense", so the second open doesn't reopen on the Per diem tab at all.

    Investigation details & confidence

    Confidence: High — code path is deterministic and the staging-not-production symptom exactly matches the beta-flag removal (production still uses IOURequestStepAmountWithTransactionOnly on the Manual tab, which never renders per-diem confirmation UI).

    Data flow:

    1. Step 2 persists SELECTED_TAB = PER_DIEM.
    2. Step 3 FAB startMoneyRequest clears the draft but not the persisted tab, so the 2nd open lands on Per diem and builds a per-diem draft.
    3. Step 4 tapping Manual triggers resetIOUTypeIfChanged('manual'), but the guard omission mounts the confirmation against the still-per-diem draft before the reset lands.

    Open question (best confirmed via local repro, not logs): whether the reset genuinely fails to land vs. the confirmation simply renders per-diem first — either way the guard fix covers it. #90403 ruled out: it touches only MoneyReportHeader/MoneyRequestHeader/carousel/TransactionThreadNavigation, none in the creation flow.


    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/96578) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.

  7. trjExpensify commented on Jul 21, 2026

    @trjExpensify
    Contributor

    Can reproduce it 👍

  8. melvin-bot commented on Jul 21, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  9. m-natarajan commented on Jul 21, 2026

    @m-natarajan

    Chrome / v9.4.41-2
    Not repro

    REC-20260721210702.mp4
  10. 6 remaining items

  11. changed the title [-]Expense - Confirm page shows per diem expense after switching from Per diem to Manual[/-] [+][Due for payment 2026-07-29] Expense - Confirm page shows per diem expense after switching from Per diem to Manual[/+] on Jul 22, 2026
  12. melvin-bot commented on Jul 22, 2026

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  13. melvin-bot commented on Jul 22, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.41-4 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-07-29. 🎊

  14. melvin-bot commented on Jul 22, 2026

    @melvin-bot

    @JS00001 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero 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]

  15. melvin-bot commented on Jul 22, 2026

    @melvin-bot

    @JS00001 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero 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]

  16. changed the title [-][Due for payment 2026-07-29] Expense - Confirm page shows per diem expense after switching from Per diem to Manual[/-] [+][Due for payment 2026-08-07] Expense - Confirm page shows per diem expense after switching from Per diem to Manual[/+] on Jul 31, 2026
  17. melvin-bot commented on Jul 31, 2026

    @melvin-bot

    @JS00001

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.46-10 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-08-07. 🎊

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero 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]

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

Metadata

Metadata

Assignees

Labels

BugSomething 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