Skip to content

[Due for payment 2025-06-25] [$250] Expense - Expense preview is blank briefly when deleted offline and returning online #63155

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: 9.1.54-2
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): applausetester+300506kh@applause.expensifail.com
Issue reported by: Applause Internal Team
Device used: Mac 15.4 / Chrome
App Component: Money Requests

Action Performed:

Precondition:

  • Log in with Expensifail account.
  1. Go to staging.new.expensify.com
  2. Go to any chat.
  3. Submit two expenses.
  4. Go to expense report.
  5. Go offline.
  6. Click on any expense row.
  7. Click More > Delete.
  8. Delete the expense.
  9. Go back to main workspace chat.
  10. Go online.

Expected Result:

The preview of the deleted expense will disappear immediately after returning online.

Actual Result:

The preview of the deleted expense becomes blank briefly after returning online.

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
Image

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021929752908827516446
  • Upwork Job ID: 1929752908827516446
  • Last Price Increase: 2025-06-03
  • Automatic offers:
    • FitseTLT | Contributor | 107617425
Issue OwnerCurrent Issue Owner: @kadiealexander

Activity

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

    @melvin-bot

    Triggered auto assignment to @kadiealexander (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. FitseTLT commented on May 30, 2025

    @FitseTLT
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2025-05-30 18:35:08 UTC.

    Proposal

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

    Expense - Expense preview is blank briefly when deleted offline and returning online

    What is the root cause of that problem?

    We have passed shouldHIdeOnDelete as true for the offline so it hides it when there is pending delete online


    but it appears as an empty box because the parent View has a fixed width set.
    transactionPreviewStyle: {width: currentWrapperWidth > minimalWrapperWidth ? TRANSACTION_WIDTH_WIDE : transactionPreviewWidth},

    <View style={[transactionWrapperStyles, containerStyles]}>

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

    1. We can take the parent view component inside the OfflineWithFeedback to follow the approach we use in other places so that the OfflineWithFeedback will hide it when online
      <View style={[transactionWrapperStyles, containerStyles]}>
      <OfflineWithFeedback

      we will only need some additional style tweaking so that it will not show unnecessary spacings linked to the hidden previews. Or apply the OfflineWithFeedback on a higher parent componet of TransactionPreviewContent
    2. Or, we can filter out pending delete transactions when online
      const [iouReport, transactions, violations] = useReportWithTransactionsAndViolations(iouReportID);
     const {isOffline} = useNetwork();
        const [iouReport, transactionsList, violations] = useReportWithTransactionsAndViolations(iouReportID);
        const transactions = transactionsList?.filter((transaction) => transaction?.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE || isOffline);
      
    

    We can optionally take this filter in useReportWithTransactionsAndViolations if we want it to generally apply it.
    We need to check if similar problems occur in other components such as MoneyRequestPreviewContent and apply similar fix.

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    N / A

    What alternative solutions did you explore? (Optional)

  4. moved this to Bugs and Follow Up Issues in #expensify-bugson Jun 3, 2025
  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jun 3, 2025
  6. changed the title [-]Expense - Expense preview is blank briefly when deleted offline and returning online[/-] [+][$250] Expense - Expense preview is blank briefly when deleted offline and returning online[/+] on Jun 3, 2025
  7. melvin-bot commented on Jun 3, 2025

    @melvin-bot
  8. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jun 3, 2025
  9. melvin-bot commented on Jun 3, 2025

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (External)

  10. 26 remaining items

  11. kadiealexander commented on Jun 25, 2025

    @kadiealexander
    Contributor

    Payments needed:

    @rushatgabhane please complete the checklist!

  12. melvin-bot commented on Jun 30, 2025

    @melvin-bot

    @kadiealexander Eep! 4 days overdue now. Issues have feelings too...

  13. melvin-bot commented on Jun 30, 2025

    @melvin-bot

    @kadiealexander Eep! 4 days overdue now. Issues have feelings too...

  14. kadiealexander commented on Jul 2, 2025

    @kadiealexander
    Contributor

    @rushatgabhane bump on this!

  15. rushatgabhane commented on Jul 2, 2025

    @rushatgabhane
    Member

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [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: https://github.com/Expensify/App/pull/56405/files#r2178823134

    • [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: Not critical

    • [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 Template

    Regression Test Proposal

    Precondition:

    Test:

    1. Go to any chat.
    2. Submit two expenses.
    3. Go to expense report.
    4. Go offline.
    5. Click on any expense row.
    6. Click More > Delete.
    7. Delete the expense.
    8. Go back to main workspace chat.
    9. Go online.
    10. The preview of the deleted expense will disappear immediately after returning online.

    Do we agree 👍 or 👎

  16. moved this from Bugs and Follow Up Issues to Done in #expensify-bugson Jul 3, 2025
  17. kadiealexander commented on Jul 3, 2025

    @kadiealexander
    Contributor

    Payment summary here.

  18. garrettmknight commented on Jul 3, 2025

    @garrettmknight
    Contributor

    $250 approved for @rushatgabhane

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

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions