Skip to content

[Due for payment 2025-11-12] [$250] Reports - Empty report created in offline is not shown in reports page but expense is displayed #72837

Closed

Description

@jponikarchuk

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: V9.2 33-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/test-runs/TR-1351/folder/13176730/41237110/958154685
Email or phone of affected tester (no customers): Slottwo1 fgg55@gmail.com
Issue reported by: Applause Internal Team
Device used: Redminote 10s android 13 phone
App Component: Money Requests

Action Performed:

  1. Go to https://staging.new.expensify.com/home
  2. Go to reports > reports
  3. Go offline
  4. Create a workspace
  5. Navigate back to reports page
  6. Tap Create a report and navigate back to reports page
  7. Note empty report is not displayed on reports page
  8. Create an expense
  9. Note expense created in offline is displayed in reports page

Expected Result:

Empty report created in offline must be shown in reports page like expense is displayed.

Actual Result:

Empty report created in offline is not shown in reports page but expense is displayed.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021981749924227067250
  • Upwork Job ID: 1981749924227067250
  • Last Price Increase: 2025-10-24
Issue OwnerCurrent Issue Owner: @dmkt9

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 17, 2025
  2. melvin-bot commented on Oct 17, 2025

    @melvin-bot

    Triggered auto assignment to @OfstadC (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. dmkt9 commented on Oct 17, 2025

    @dmkt9
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Empty report created in offline is not shown in reports page but expense is displayed.

    What is the root cause of that problem?

    Since snapshot Onyx data only updates keys that already exist in snapshot_, newly created reports won’t be automatically added to the snapshot Onyx data.

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

    We should manually add the data to the snapshot in buildNewReportOptimisticData, similar to how we do it in buildOptimisticChangePolicyData.

    const currentSearchQueryJSON = getCurrentSearchQueryJSON();
    if (currentSearchQueryJSON?.type === CONST.SEARCH.DATA_TYPES.EXPENSE && currentSearchQueryJSON?.groupBy === CONST.SEARCH.GROUP_BY.REPORTS) {
        optimisticData.push({
            onyxMethod: Onyx.METHOD.MERGE,
            key: `${ONYXKEYS.COLLECTION.SNAPSHOT}${currentSearchQueryJSON.hash}` as const,
            value: {
                data: {[`${ONYXKEYS.COLLECTION.REPORT}${reportID}`]: optimisticReportData},
            },
        });
    }

    Currently, this addition only happens when the active search matches the report route — but this condition can be discussed and potentially expanded to cover more cases if needed.

    2025-10-17.17-56-07.mp4
  4. melvin-bot commented on Oct 20, 2025

    @melvin-bot

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

  5. OfstadC commented on Oct 20, 2025

    @OfstadC
    Contributor

    I'm confused:

    Empty report created in offline is not shown in reports page but expense is displayed.

    The empty report was showing as expected in the video - then an expense was created. So it's no longer an empty report 🤔 - I'm going to try and test as well

  6. OfstadC commented on Oct 21, 2025

    @OfstadC
    Contributor

    Haven't gotten back to this yet - but will soon

  7. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Oct 24, 2025
  8. changed the title [-]Reports - Empty report created in offline is not shown in reports page but expense is displayed[/-] [+][$250] Reports - Empty report created in offline is not shown in reports page but expense is displayed[/+] on Oct 24, 2025
  9. melvin-bot commented on Oct 24, 2025

    @melvin-bot
  10. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Oct 24, 2025
  11. 23 remaining items

  12. melvin-bot commented on Nov 5, 2025

    @melvin-bot

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

  13. OfstadC commented on Nov 11, 2025

    @OfstadC
    Contributor

    Please complete BZ checklist prior to payment date! Thank you!

  14. OfstadC commented on Nov 12, 2025

    @OfstadC
    Contributor

    @hungvu193 Please complete BZ Checklist

    @dmkt9 Offer sent here

  15. melvin-bot commented on Nov 12, 2025

    @melvin-bot

    Issue is ready for payment but no BZ is assigned. @greg-schroeder you are the lucky winner! Please verify the payment summary looks correct and complete the checklist. Thanks!

  16. hungvu193 commented on Nov 13, 2025

    @hungvu193
    Contributor

    BugZero Checklist:

    • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to comment: Fix/72837 - Empty report created in offline is not shown in reports page but expense is displayed #73719

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion: N/A

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Regression Test Proposal

    Test:

    1. Go to https://staging.new.expensify.com/home
    2. Go to reports > reports
    3. Go offline
    4. Create a workspace
    5. Navigate back to reports page
    6. Tap Create a report and navigate back to reports page
    7. Verify that empty report is displayed on reports page

    Do we agree 👍 or 👎

  17. OfstadC commented on Nov 13, 2025

    @OfstadC
    Contributor

    Payment Summary

  18. garrettmknight commented on Nov 21, 2025

    @garrettmknight
    Contributor

    $250 approved for @hungvu193

  19. m-natarajan commented on Nov 24, 2025

    @m-natarajan

    @hungvu193 Can you please check the Regression Test Proposal step 7 ( Reports are not displayed, Is this a typo?)

  20. OfstadC commented on Dec 3, 2025

    @OfstadC
    Contributor
  21. hungvu193 commented on Dec 4, 2025

    @hungvu193
    Contributor

    @hungvu193 Can you please check the Regression Test Proposal step 7 ( Reports are not displayed, Is this a typo?)

    Yeah, it's typo. I updated it

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.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions