Skip to content

[Due for payment 2026-07-13] Home - Action button disappears the second time an expense is opened from "Recently Added" #94311

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.17-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: #93451
Email or phone of affected tester (no customers): ibellicotest+2766@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Motorola MotoG60 / Android 12 (Hybrid app) - Windows 11 / Chrome
App Component: Money Requests

Action Performed:

Prerequisite: Account has at least one workspace.

  1. Open the staging.new.expensify.com website.
  2. Open any workspace chat.
  3. Create a manual expense.
  4. Navigate to "Home" > "Recently Added"
  5. Click on the just created expense.
  6. Note that when RHP is opened, report shows "Submit" / "Mark as done" action button.
  7. Close RHP and click on expense again.
  8. Note that now, only "More" button is visible on top of report.

Expected Result:

Action buttons should still be visible on report, the second time that an expense is opened from "Recently Added" section on "Home".

Actual Result:

Action buttons are only visible the first time that an expense is opened from "Recently Added" section on "Home". The second time, report only displays "More" button on top.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7188208_1782184886391.Recently.mp4

View all open jobs on GitHub

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

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. applause-bot commented on Jun 23, 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/24e29752aa2d77e7eb73943f6d6a539207733eb88aafae839ce833e578ce7c13

  2. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jun 23, 2026
  3. melvin-bot commented on Jun 23, 2026

    @melvin-bot

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

  4. melvin-bot commented on Jun 23, 2026

    @melvin-bot

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

  5. github-actions commented on Jun 23, 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. adamgrzybowski commented on Jun 23, 2026

    @adamgrzybowski
    Contributor

    I will be working on this one 👋

  7. MelvinBot commented on Jun 23, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    The action buttons disappear because the second open navigates to a different report than the first, and the two reports render different headers.

    getReportIDToOpenForExpense() decides which report a "Recently added" row opens. For a one-transaction report it returns threadReportID ?? reportID — i.e. it prefers the transaction thread whenever one is known (src/libs/TransactionThreadNavigationUtils.ts:50-56):

    • 1st open: the just-created expense has no transaction thread yet, so the Search snapshot's IOU action has no childReportID → threadReportID is undefined → it opens the parent one-transaction expense report, which renders MoneyReportHeader → Submit / Mark as done shown.
    • 1st open creates the thread (via openReport / createTransactionThreadReport in SearchMoneyRequestReportPage.tsx). Closing the RHP refocuses Home and re-fires the Search (useRecentlyAddedData.ts:101-106), so the refreshed snapshot now carries the IOU action's childReportID → threadReportID becomes defined (useRecentlyAddedData.ts:174).
    • 2nd open: threadReportID is now set → it opens the transaction thread, which renders MoneyRequestHeader → only the "More" button (no report-level primary actions).

    The header is chosen purely by report type: a transaction-thread report (isReportTransactionThread) gets MoneyRequestHeader (More only); the parent money-request report gets MoneyReportHeader (Submit/Pay/Approve). So the visible-button difference is a direct consequence of which reportID was resolved.

    The comment at TransactionThreadNavigationUtils.ts:52-55 shows this is intentional (it prefers the thread to host the prev/next carousel) — but that preference is exactly what removes the action buttons once a thread exists.

    Investigation details (data flow + evidence)

    Data flow

    1. 1st tap → snapshot has no childReportID → threadReportID undefined → opens parent report → MoneyReportHeader → Submit/Mark as done ✅
    2. Opening the report materializes the transaction thread (childReportID)
    3. Close RHP → Home refocuses → Search re-fires → snapshot now has childReportID
    4. 2nd tap → threadReportID defined → opens transaction thread → MoneyRequestHeader → only "More" ❌

    Not the cause: the new TRANSACTION_THREAD_NAVIGATION_* Onyx key (active transaction IDs) only drives the prev/next carousel and is cleared on RHP close. It is not read by useReportPrimaryAction / useTransactionsAndViolationsForReport, so it does not gate button visibility.

    Key references

    Both independent investigations converged on this mechanism with high confidence.

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

    Make getReportIDToOpenForExpense()'s one-transaction branch deterministic so the same expense always opens the same view regardless of whether a thread already exists.

    For a one-transaction report, return the parent reportID instead of threadReportID ?? reportID (TransactionThreadNavigationUtils.ts:50-56). The parent one-transaction report already renders the expense inline, so this keeps the expense view and consistently shows the action buttons on every open.

    If the prev/next carousel is still required for single-expense siblings, mount that carousel from the parent one-transaction report (in MoneyRequestReportTransactionsNavigation) rather than forcing navigation into the thread sub-view — that way you keep the carousel without losing MoneyReportHeader's action buttons.

    Note for whoever takes this: please confirm the intended UX — should a single just-created expense from "Recently added" always open the full money-request report (with Submit/Mark as done), or the transaction-thread carousel view? The fix above assumes the former (matching the 1st-open behavior the tester expected).

    What alternative solutions did you explore? (Optional)

    Stabilizing the snapshot so threadReportID isn't repopulated on refocus would make both opens land on the thread — but that produces the opposite (no action buttons on either open), which isn't the expected result. The deterministic resolver fix above is preferred.


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

  8. adamgrzybowski commented on Jun 23, 2026

    @adamgrzybowski
    Contributor

    I have some others high prio stuff, so it needs to wait a few days, or I will find someone from SWM

  9. 12 remaining items

  10. melvin-bot commented on Jul 6, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.27-2 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-13. 🎊

    For reference, here are some details about the assignees on this issue:

  11. melvin-bot commented on Jul 6, 2026

    @melvin-bot

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

  12. melvin-bot commented on Jul 9, 2026

    @melvin-bot

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

  13. ZhenjaHorbach commented on Jul 10, 2026

    @ZhenjaHorbach
    Contributor

    @grgia
    Let's close this!

  14. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Jul 10, 2026
  15. melvin-bot commented on Jul 12, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  16. melvin-bot commented on Jul 12, 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
  17. ZhenjaHorbach commented on Jul 13, 2026

    @ZhenjaHorbach
    Contributor

    @grgia
    Let's 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