Skip to content

[Due for payment 2026-10-16] [$175] Home - marked as paid system message thread opens when opened from Recently added #99611

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.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. Open 1:1 DM with any user.
  3. Click + > Pay.
  4. Enter amount > Next.
  5. Click Mark as paid.
  6. Go to Home.
  7. Open the expense in Step 5 from Recently added.

Expected Result:

Expense report will open.

Actual Result:

marked as paid system message thread opens when opened from Recently added.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7243703_1787781935372.3.mp4

View all open jobs on GitHub

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

Upwork Automation - Do Not Edit
Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. 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/e6b5a427206b3605bf00a62154a6406d3ef035a6461f2fab7967020168bc91c8

  2. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 26, 2026
  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. 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.
  6. 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

  7. melvin-bot commented on Aug 26, 2026

    @melvin-bot

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

  8. MelvinBot commented on Aug 26, 2026

    @MelvinBot
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug (fix required in Expensify/App)
    Causing PR: #93451 - "[Home Page] Add Recently added slot to Home" by @adamgrzybowski (Medium confidence for the origin PR / High confidence on the root-cause code)
    Not the cause: #98611 - the auto-flagged PR (see below)
    Related Issues: Feature origin #90366 (the header standardization tracked by #98611)

    Recommendation: ROLL FORWARD (targeted fix)

    Reverting the auto-flagged PR #98611 will not fix this bug — it does not touch the code that chooses which report opens. The fix is a small, targeted change to how the tapped expense's IOU action is resolved in the Recently added slot, so we should roll forward rather than revert.

    Assigned: (kept existing melvin auto-assignees) + added @adamgrzybowski (author), @ZhenjaHorbach and @grgia (approving reviewers) of the origin PR #93451, since the fix belongs in that feature code.
    Labels: No change. DeployBlockerCash is correctly retained (Frontend bug, App deploy blocked). No DeployBlocker (Web) label was present, so none removed.

    📋 Detailed Analysis

    Why #98611 is NOT the cause

    PR #98611 ("Standardize Expense Report and Expense header…") is the PR Melvin auto-assigned because its author merged it and its BrowserStack field literally links to it. Its only change to the Recently added flow is a signature update in RecentlyAddedSection/index.tsx:

    -        setActiveTransactionIDs(siblingTransactionIDs, siblingDescriptorsByTransactionID).then(() => {
    +        setActiveTransactionIDs(siblingTransactionIDs, undefined, siblingDescriptorsByTransactionID).then(() => {
    

    This inserts an undefined for the new snapshotHash parameter of setActiveTransactionIDs. It affects only the idempotency/dedup of the carousel's sibling transaction-ID list — it does not change which reportID is navigated to for the tapped expense. The navigation target is computed by getReportIDToOpenForExpense(...), which #98611 does not modify (its file list contains neither TransactionThreadNavigationUtils.ts, ReportActionsUtils.ts, nor useRecentlyAddedData.ts).

    Root Cause

    The Recently added slot picks the IOU action for each expense here:
    src/pages/home/RecentlyAddedSection/useRecentlyAddedData.ts#L275

    reportAction: getIOUActionForTransactionID(snapshotReportActions, transaction.transactionID),

    getIOUActionForTransactionID returns the first report action matching the transaction:
    src/libs/ReportActionsUtils.ts#L2697-L2702

    function getIOUActionForTransactionID(reportActions: ReportAction[], transactionID: string): OnyxEntry<ReportAction> {
        return reportActions.find((reportAction) => {
            const IOUTransactionID = isMoneyRequestAction(reportAction) ? getOriginalMessage(reportAction)?.IOUTransactionID : undefined;
            return IOUTransactionID === transactionID;
        });
    }

    When you Pay someone in a 1:1 DM and Mark as paid, the transaction has two IOU actions that both satisfy isMoneyRequestAction (type IOU) and both carry the same IOUTransactionID:

    1. the original CREATE money-request action (its childReportID is the expense/transaction thread), and
    2. the PAY action (the "marked as paid" system message — its childReportID is the pay message thread).

    .find() returns whichever appears first in the snapshot's report-actions array; when that is the PAY action, expense.reportAction becomes the pay action.

    Navigation then uses that action's childReportID directly:
    src/libs/TransactionThreadNavigationUtils.ts#L59-L60

    if (expense.reportAction?.childReportID) {
        return expense.reportAction.childReportID;
    }

    So the app navigates to the "marked as paid" message thread instead of the expense — exactly the reported symptom.

    Verification

    Suggested fix direction

    Resolve the expense's IOU action to the money-request (create/track) action rather than any IOU action — e.g. filter out pay-type IOU actions in getIOUActionForTransactionID for this call site, or select the action whose originalMessage.type is a request/track type, so getReportIDToOpenForExpense lands on the expense's transaction thread instead of the pay message thread.

  9. 23 remaining items

  10. melvin-bot commented on Oct 9, 2026

    @melvin-bot

    @ZhenjaHorbach

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

    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. JS00001 commented on Oct 12, 2026

    @JS00001
    Contributor

    Waiting on payment here

  12. melvin-bot commented on Oct 12, 2026

    @melvin-bot

    @ZhenjaHorbach Whoops! This issue is 2 days overdue. Let's get this updated quick!

  13. melvin-bot commented on Oct 14, 2026

    @melvin-bot

    @ZhenjaHorbach Huh... This is 4 days overdue. Who can take care of this?

  14. grgia commented on Oct 15, 2026

    @grgia
    Contributor

    Regression period, payment 2026-10-16, not overdue

  15. melvin-bot commented on Oct 15, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  16. melvin-bot commented on Oct 15, 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
  17. mallenexpensify commented on Oct 18, 2026

    @mallenexpensify
    Contributor

    @ZhenjaHorbach I'm assuming this isn't due payment cuz it's a regression and you worked on the offending PR

    @ZhenjaHorbach plz complete the Contributor+ checklist and tag me in a post once you have. Thx

  18. ZhenjaHorbach commented on Oct 19, 2026

    @ZhenjaHorbach
    Contributor
    1. Open App
    2. Sign in as Account A and open (or start) a 1:1 DM with Account B.
    3. In that DM, click + > Pay.
    4. Enter an amount (for example 25) > Next > confirm the details > Pay > Mark as paid.
    5. Verify the DM shows the paid system message (for example "paid $25.00 elsewhere" / "marked as paid") along with the "1 expense" preview.
    6. Navigate to Home.
    7. Verify the paid expense does not appear under Recently added for Account A — not even briefly right after paying.
    8. Sign in as Account B (the recipient) and navigate to Home.
    9. Under Recently added, click the expense Account A just paid.
    10. Verify the expense report opens — you see the expense details (Amount, Merchant, Date, Report).
    11. Verify you are not taken to the "marked as paid" system message thread.
  19. ZhenjaHorbach commented on Oct 19, 2026

    @ZhenjaHorbach
    Contributor

    @ZhenjaHorbach I'm assuming this isn't due payment cuz it's a regression and you worked on the offending PR

    @ZhenjaHorbach plz complete the Contributor+ checklist and tag me in a post once you have. Thx

    Oh
    Right
    Let's add tests and close this!

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