Skip to content

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

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: @ZhenjaHorbach

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. 9 remaining items

  10. JS00001 commented on Sep 3, 2026

    @JS00001
    Contributor

    PR in review

  11. removed their assignment
    on Sep 19, 2026
  12. changed the title [-]Home - marked as paid system message thread opens when opened from Recently added[/-] [+][$175] Home - marked as paid system message thread opens when opened from Recently added[/+] on Sep 28, 2026
  13. melvin-bot commented on Sep 28, 2026

    @melvin-bot
  14. added and removed
    ReviewingHas a PR in review
    on Oct 9, 2026
  15. changed the title [-][$175] Home - marked as paid system message thread opens when opened from Recently added[/-] [+][Due for payment 2026-10-16] [$175] Home - marked as paid system message thread opens when opened from Recently added[/+] on Oct 9, 2026
  16. 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]

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.DailyKSv2EngineeringOverdue

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions