Skip to content

[Due for payment 2026-05-29] Expense - Partial skeleton loader briefly appears in the report after creating expense #90270

Closed

Description

@mitarachim

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.3.70-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: #89791
Email or phone of affected tester (no customers): sdsdjoijdoisnjodis@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.2 / Chrome
App Component: Money Requests

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create an empty report.
  4. Open the report.
  5. Create an expense.

Expected Result:

Skeleton loader will not appear in the report after creating expense (production).

Actual Result:

Partial skeleton loader briefly appears in the report after creating expense.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7151361_1778543583406.1.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on May 11, 2026
  2. melvin-bot commented on May 11, 2026

    @melvin-bot

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

  3. melvin-bot commented on May 11, 2026

    @melvin-bot

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

  4. github-actions commented on May 12, 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.
  5. OSBotify commented on May 12, 2026

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: #89791 - "Re-land smooth post-submit Spend tab navigation with Android skeleton fix" by @JakubKorytko (High confidence)
    Related Issues: #89669 (prior deploy blocker that this PR attempted to fix)

    Recommendation: REVERT

    PR #89791 introduced new skeleton loading logic in MoneyRequestReportActionsList.tsx (the isAwaitingDeferredTransaction + ReportActionsListLoadingSkeleton path) that causes a partial skeleton loader to briefly appear in the report after creating an expense. The bug is staging-only and directly tied to this PR which merged on 2026-05-10.

    Assigned: @JakubKorytko (PR author), @ShridharGoel, @mountiny (approving reviewers)
    Labels: DeployBlockerCash is already present and should remain (Frontend bug). No label changes needed — DeployBlocker is not present.

    Detailed Analysis

    Evidence

    Verification

    • The PR modifies src/components/MoneyRequestReportView/MoneyRequestReportActionsList.tsx — the file that directly controls the skeleton loader rendering in the report view
    • The PR introduced ReportActionsListLoadingSkeleton rendering gated on isAwaitingDeferredTransaction, which is a new non-reactive check (hasDeferredWriteForReport reads a module-level Map)
    • The PR also introduced src/pages/inbox/report/MoneyReportContentCreated.tsx and modified MoneyReportView.tsx with isTotalPending logic — changes to the exact components involved in the expense creation flow

    Root Cause

    The PR added isAwaitingDeferredTransaction logic in MoneyRequestReportActionsList.tsx that renders a ReportActionsListLoadingSkeleton when a deferred write is pending for the report and the transaction list is empty. Because hasDeferredWriteForReport is non-reactive (reads a module-level Map), there are timing windows where the skeleton renders briefly before React reconciles the Onyx state update that populates transactions. This causes the observable "partial skeleton loader" flash after creating an expense on an empty report.

  6. MelvinBot commented on May 12, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    PR #89791 introduced a deferred-write mechanism for smooth post-submit navigation. When an expense is created on an empty report, there's a brief window where:

    1. The deferred write has been reserved (via reserveDeferredWriteChannel) but hasn't flushed yet, so transactions are still empty
    2. shouldWaitForTransactions returns true because transactions.length === 0 and hasPendingDismissWrite is true
    3. This makes shouldShowOpenReportLoadingSkeleton evaluate to true, rendering the full InitialLoadingSkeleton

    Once the deferred write flushes and the optimistic transaction lands in Onyx, the skeleton disappears — but it's visible for a frame or two, producing the reported flash.

    The same PR also added a parallel skeleton path in MoneyRequestReportActionsList (isAwaitingDeferredTransaction → ReportActionsListLoadingSkeleton with FadeIn/FadeOut animation), which can produce a second brief flash if that code path is reached first.

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

    The skeleton in MoneyRequestReportView should not be shown when the only reason shouldWaitForTransactions is true is a pending deferred write (hasPendingDismissWrite). The deferred-write skeleton is already handled downstream by MoneyRequestReportActionsList (via isAwaitingDeferredTransaction), so shouldWaitForTransactions is double-covering this case and producing the flash at a higher level.

    In shouldWaitForTransactions, the hasPendingDismissWrite condition should be removed from the isStillLoadingData check. The deferred-write case is already guarded by MoneyRequestReportActionsList's isAwaitingDeferredTransaction check, which renders its own skeleton at the correct level without triggering the full-page InitialLoadingSkeleton.

    What alternative solutions did you explore? (Optional)

    An alternative would be to suppress the InitialLoadingSkeleton render in MoneyRequestReportView when shouldWaitForTransactions is true solely due to hasPendingDismissWrite (i.e., add a separate flag and skip the skeleton at the view level). However, removing hasPendingDismissWrite from shouldWaitForTransactions is cleaner since the deferred-write skeleton is already handled at the correct layer.

    Investigation details

    Related issue: #87032 ("Skeleton loading, then empty state is shown in Reports after creating expense via FAB") is open and may share the same root cause around the shouldWaitForTransactions / deferred-write interaction.

    Evidence chain:


    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.

  7. 21 remaining items

  8. melvin-bot commented on May 22, 2026

    @melvin-bot

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

  9. melvin-bot commented on May 22, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.79-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-05-29. 🎊

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

  10. melvin-bot commented on May 22, 2026

    @melvin-bot

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

  11. melvin-bot commented on May 26, 2026

    @melvin-bot

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

  12. melvin-bot commented on May 28, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  13. melvin-bot commented on May 28, 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
  14. mallenexpensify commented on May 29, 2026

    @mallenexpensify
    Contributor

    @ShridharGoel appears to be from a regression, is it due payment? If so, why? Thx

  15. ShridharGoel commented on May 29, 2026

    @ShridharGoel
    Contributor

    Yes, we can 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