Skip to content

[Due for payment 2026-06-25] Spend-Expense preview is missing in "In expense report" in Chats #93641

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.8-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: https://test-management.browserstack.com/projects/2219752/folder/13176922/test-cases/41237507
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: MacBook Air 26.5 Chrome, iPhone 15 iOS 26.5
App Component: Search

Action Performed:

  1. Sign on to ND
  2. Create a workspace
  3. Open workspace chat, click "+" button, select "Create expense"
  4. Create a manual expense
  5. Open Spend tab, click Advanced filters
  6. Set Type to Chats, dismiss filters
  7. Look for "In Expense Report [date]" entry

Expected Result:

Expense preview is shown in "In expense report" entry in Chats

Actual Result:

Expense preview is missing in "In expense report" entry in Chats. Only the title, avatars, creator's name, and the date are displayed

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

#92749

View all open jobs on GitHub

Applause Internal Information
Exported by: Svetlana Lazutkina
Bug ID: 7181653

Activity

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

  3. melvin-bot commented on Jun 15, 2026

    @melvin-bot

    Triggered auto assignment to @cead22 (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  4. melvin-bot commented on Jun 15, 2026

    @melvin-bot

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

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

    @MelvinBot
    Contributor

    Issue Analysis

    Root Cause (likely): Regression from Expensify/App#93421 — "[NoQA] stabilize stableReportSelector and more reports in the ReportActionItem tree" (LukasMod, merged 2026-06-15, in the 9.4.8 staging window). It is the only PR in this release that touches the exact chain rendering a Type=Chats expense-report row: ChatListItem → ReportActionItem → ActionContentRouter → MoneyRequestReportPreview. It switched iouReport/chatReport to the projected getStableReportSelector instead of the full report, and lifted chatReport up as a prop. When a needed field on the projected report resolves undefined for a Search row, the preview card body is gated out and only the title/avatars/creator/date remain — exactly the reported symptom.

    Recommended Fix: Ask LukasMod to either revert Expensify/App#93421 to unblock the deploy, or fix forward by ensuring the Search Type=Chats path feeds the fields the preview needs (verify the row does not hit the isEmpty / placeholder branch in ReportActionItem.tsx:480).

    Investigation details & evidence

    Render chain (Type=Chats expense-report row):

    Why #93421 is the prime suspect: Two independent investigations bisected the 9.4.8 staging window (git log over src/components/Search/ and the ReportActionItem tree). #93421 is the only merged PR touching all of ChatListItem, ReportActionItem, and ActionContentRouter, and it changes how iouReport/chatReport/originalReport are subscribed (projected selector + lifted prop). The projection at Report.ts:126-189 drops any Report field not explicitly listed; a Search snapshot row feeding a projected report into this tree is a plausible path to an undefined field that gates the preview out.

    Confidence: Medium. The git bisect signal is strong and deterministic (single PR in the window touching the whole chain), and the gating code matches the symptom. I have not confirmed at runtime which field/branch goes falsy for Search rows specifically — that requires reproducing on staging. The fastest path for a deploy blocker is to revert #93421 and confirm the preview returns.

    Alternative explanations considered: Search snapshot reports may not be hydrated into live ONYXKEYS.COLLECTION.REPORT (Expensify/App#93112 hydrates only one specific RHP), which could independently leave iouReport undefined in the preview. This is consistent with the same symptom but is pre-existing; #93421 is the change that lands in this exact regression window.


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

  7. QichenZhu commented on Jun 16, 2026

    @QichenZhu
    Contributor

    @MelvinBot I tried reverting #93421 but it didn't fix this, and the issue doesn't reproduce in #93421's adhoc build.

  8. MelvinBot commented on Jun 16, 2026

    @MelvinBot
    Contributor

    Thanks QichenZhu — you're right, I'll retract the #93421 call. Reverting it and the clean adhoc build rule it out. Here's a corrected, code-backed analysis.

    Why the preview body is empty in Search (verified mechanism)

    In a Type=Chats row, the preview's report is read through the snapshot-aware useOnyx (so the title/avatars/creator/date render fine), but its transactions/violations come from a different source that the search snapshot does not feed:

    • useReportWithTransactionsAndViolations.ts:15-19 — report comes from wrapped useOnyx(REPORT/{id}) (snapshot-routable), but transactions/violations come from useAllReportsTransactionsAndViolations(), i.e. the derived Onyx value.
    • That derived value is computed only from the live collections reportTransactionsAndViolations.ts:11-14 (COLLECTION.TRANSACTION + COLLECTION.TRANSACTION_VIOLATIONS), and ONYXKEYS.DERIVED.* is not in SNAPSHOT_ONYX_KEYS, so it is never served from the search snapshot. Its provider also sits above SearchScopeProvider, so it can't see isOnSearch either.

    Net: the carousel body renders only when the IOU report's transactions are present in live Onyx. Right after creating an expense they usually are (which fits "not reproducible in production"), but whenever the live transaction/derived entry is absent, the body collapses to the empty placeholder while the header still shows — exactly the reported symptom.

    What this means for the regression

    This data path is unchanged for months (the hook and derived config last changed Feb/Apr 2026), so the regression is upstream of the preview — something in the 9.4.8 cut that affects whether the freshly-created transaction stays in live COLLECTION.TRANSACTION / its derived entry. I couldn't bisect it to a single PR from here (my checkout is shallow and I can't reproduce on staging), so I'd rather not name another suspect blind after getting it wrong once.

    Decisive next step (on a staging repro)

    With the preview empty, open Onyx devtools and check:

    1. Is transactions_<transactionID> present in the live ONYXKEYS.COLLECTION.TRANSACTION?
    2. Does ONYXKEYS.DERIVED.REPORT_TRANSACTIONS_AND_VIOLATIONS have an entry for that iouReportID containing the transaction?
    • Live TRANSACTION missing the entry → regression is in transaction population/retention; bisect 9.4.8 PRs that touch transaction Onyx writes (the in-flight "Remove Onyx.connect() for TRANSACTION_VIOLATIONS" refactor series is a natural place to start).
    • Present, but body still empty → regression is in the preview gating/derived-value read instead.

    That single check splits the search space cleanly.


    Next Steps: Reply with @MelvinBot <findings from the Onyx check> and I'll dig into that specific branch.

  9. QichenZhu commented on Jun 16, 2026

    @QichenZhu
    Contributor

    Net: the carousel body renders only when the IOU report's transactions are present in live Onyx. Right after creating an expense they usually are (which fits "not reproducible in production"), but whenever the live transaction/derived entry is absent, the body collapses to the empty placeholder while the header still shows — exactly the reported symptom.

    @MelvinBot 'not reproducible in production' means the same steps don't trigger the bug in prod. It has nothing to do with whether transactions are present in Onyx.

  10. MelvinBot commented on Jun 16, 2026

    @MelvinBot
    Contributor

    You're right, and thanks for the correction — I'll retract that parenthetical.

    Reproducible in production: No is a build comparison: the same repro steps run against the production build don't trigger the bug, while the staging build does. It says nothing about runtime Onyx state. I incorrectly used it as evidence for the "transactions happen to be present in prod" theory — that reasoning doesn't hold.

    If anything, the corrected reading points the other way: staging-reproducible + production-clean means the cause is a code change that landed in the 9.4.8 cut (a regression), not a data-timing coincidence. So the symptom path I described (preview body collapses when the IOU report's transactions aren't in live Onyx / the derived value) may still be the mechanism, but the trigger is whatever 9.4.8 change broke transaction population/retention or the preview's read — and the clean prod build is what tells us it's a regression, nothing more.

    The decisive Onyx-devtools check from my previous comment still stands as the way to split that search space.

  11. 9 remaining items

  12. youssef-lr commented on Jun 16, 2026

    @youssef-lr
    Contributor

    PR ready

  13. changed the title [-]Spend-Expense preview is missing in "In expense report" in Chats[/-] [+][Due for payment 2026-06-25] Spend-Expense preview is missing in "In expense report" in Chats[/+] on Jun 18, 2026
  14. melvin-bot commented on Jun 18, 2026

    @melvin-bot

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

  15. melvin-bot commented on Jun 18, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.14-1 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-06-25. 🎊

  16. melvin-bot commented on Jun 18, 2026

    @melvin-bot

    @youssef-lr 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]

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