Skip to content

[Due for payment 2026-09-03] Spend - Self DM opens when navigating to offline created expense via arrow #99612

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.62-1
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: #98611
Email or phone of affected tester (no customers): sdsiodjnosdjiodsj@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:

  1. Go to staging.new.expensify.com
  2. Create a new Gmail account.
  3. Complete onboarding.
  4. Go to Spend > Expenses.
  5. Go offline.
  6. Create two expenses to self DM.
  7. Open any expense.
  8. Click arrow button to open the next expense.

Expected Result:

Next expense details thread will open.

Actual Result:

Self DM opens.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

To be added by Applause Leads

View all open jobs on GitHub

Applause Internal Information
Exported by: Mita Rachim
Bug ID: 7243712

Issue OwnerCurrent Issue Owner: @thelullabyy

Activity

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

  3. melvin-bot commented on Aug 26, 2026

    @melvin-bot

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

  4. melvin-bot commented on Aug 26, 2026

    @melvin-bot

    @JS00001 @ShridharGoel you have been assigned to this deploy blocker because you reviewed the offending PR: #98611

  5. melvin-bot commented on Aug 26, 2026

    @melvin-bot

    @thelullabyy you have been assigned to this deploy blocker because you authored the offending PR: #98611

  6. melvin-bot commented on Aug 26, 2026

    @melvin-bot

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

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

    @MelvinBot
    Contributor

    Issue Analysis

    Root Cause: PR #98611 (merge a29eb30) rewrote the prev/next transaction-thread arrow navigation and added a new short-circuit branch that navigates directly to nextTransaction.reportID (the transaction's parent report) instead of the expense's transaction thread, whenever the parent is a one-transaction report. For an offline-created Spend › Expenses expense, reportID resolves to the self-DM chat report — so the arrow opens the whole self DM instead of the next expense. See MoneyRequestReportTransactionsNavigation.tsx:228-233 (onNext) and its mirror :293-298 (onPrevious).

    The reportID !== CONST.REPORT.UNREPORTED_REPORT_ID guard was meant to exclude this case, but it only filters the '0' sentinel — an offline self-DM expense carries a real (non-'0') reportID pointing at the chat, so it slips through the guard and the branch fires. The correct target (the transaction thread childReportID, creating an optimistic thread when missing) is still computed just below, but the new branch returns before that code runs.

    Recommended Fix (roll forward preferred): Tighten both mirrored branches so they don't fire when the resolved nextTransaction.reportID / prevTransaction.reportID is a chat / self-DM report (or otherwise has no resolvable one-transaction expense thread) — let those cases fall through to the existing childReportID / createTransactionThreadReport path below. This is a small, contained change to one file. A full revert of #98611 is heavier (34 files of wanted header-standardization + carousel work) and should only be used if a safe targeted fix can't land in the deploy window.

    Investigation details

    Culprit confirmation (High confidence): PR #98611 directly rewrote the failing code path — MoneyRequestReportTransactionsNavigation.tsx (+233/−148), plus supporting useNavigateToTransactionThread.ts and TransactionThreadNavigation.ts. Timeline matches (merged 2026-08-26, version 9.4.62, staging-only because the feature doesn't exist in production). Before this PR, onNext/onPrevious resolved the target strictly through the transaction thread (nextParentReportAction?.childReportID), creating an optimistic thread when none existed. This PR added the new parent-report short-circuit ahead of that logic.

    Why the guard is insufficient: isOneTransactionReport is report?.transactionCount === 1 (ReportUtils.ts:2819-2821). For an offline self-DM expense the sibling's reportID points at the self-DM chat, which reports as a one-transaction report and is not the '0' UNREPORTED_REPORT_ID sentinel — so isOneTransactionReport(...) && reportID && reportID !== UNREPORTED_REPORT_ID is all true and the branch navigates to the chat report via Navigation.setParams({reportID: <self-DM reportID>}).

    Symptom → mechanism → fix all line up: open expense → tap arrow → new branch resolves parent (= self DM) → setParams(reportID = self-DM) → self DM opens. The pre-existing childReportID path below (~256-285) is the correct destination and already handles the optimistic-thread case.


    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](https://github.com/Expensify/App/blob/a29eb30142d79be6251894dbfd8d4443ecee1f31/src/components/MoneyRequestReportView/MoneyRequestReportTransactionsNavigation.tsx#L228-L233) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.


    view run

  9. m-natarajan commented on Aug 27, 2026

    @m-natarajan

    Not repro (Feature reverted), Win 11/Chrome, v9.4.62-4

    Recording.3438.mp4
  10. added and removed
    ReviewingHas a PR in review
    on Aug 27, 2026
  11. melvin-bot commented on Aug 27, 2026

    @melvin-bot

    @thelullabyy

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.62-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-09-03. 🎊

    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]

  12. changed the title [-]Spend - Self DM opens when navigating to offline created expense via arrow[/-] [+][Due for payment 2026-09-03] Spend - Self DM opens when navigating to offline created expense via arrow[/+] on Aug 27, 2026
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.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions