Expensify: Offline Delete Bugs Impacting Expense Report Access
This article delves into a critical bug identified within the Expensify application, specifically concerning expense reports. The issues arise when reports are deleted while the application is offline, leading to unexpected behavior regarding accessibility and selectability. This comprehensive analysis covers the steps to reproduce the bug, the expected versus actual results, and the platforms affected. It's crucial for users and developers alike to understand the intricacies of this bug to ensure data integrity and a seamless user experience. Let's explore the details of this Expensify report deletion issue.
Bug Report Overview
App: Expensify
Category: ReportsDiscussion
Version Number: 9.2.62-2
Reproducible in Staging?: Yes
Reproducible in Production?: No (new feature)
Regression Test Link: https://github.com/Expensify/App/pull/71199
Reported By: Applause Internal Team
Affected Platforms: Android (App & mWeb Chrome), iOS (App, mWeb Safari, mWeb Chrome), MacOS (Chrome / Safari)
Steps to Reproduce
To effectively understand the scope of this bug, replicating the issue is paramount. Here's a detailed walkthrough of the steps required to reproduce the expense report deletion bug in Expensify:
- Access Staging Environment: Navigate to staging.new.expensify.com. This ensures you are working within the test environment where the bug was initially identified.
- Enter Workspace Chat: Proceed to the workspace chat section within the Expensify application.
- Create an Expense with Violation: Generate a new expense report, intentionally omitting a category. This creates an expense that triggers a violation, which is crucial for replicating the bug’s specific context.
- Navigate to Reports Section: Go to the Reports section and then select Reports to view the list of expense reports.
- Go Offline: Disconnect your device from the internet to simulate an offline state. This is a key step, as the bug manifests specifically during offline actions.
- Select the Report: Use the checkbox to select the expense report you created earlier.
- Initiate Deletion: Click the dropdown button associated with the selected report and choose the “Delete” option.
- Confirm Deletion: Confirm the deletion action to remove the report.
- Attempt Access After Deletion: Click the “Review” button or navigate to the Inbox to try to access the deleted expense report.
- Test on Mobile Web (mWeb) and Mobile Apps: On mWeb (Android or iOS) or within the native apps, long-press on the deleted report and select it to observe its behavior.
By meticulously following these steps, you can reliably reproduce the bug and witness the discrepancies between the expected and actual results.
Expected vs. Actual Results
Understanding the expected behavior versus what actually occurs is crucial in bug analysis. In this case, the discrepancies highlight the core issues with offline report deletion in Expensify. Let's break down the expected outcomes and the actual results observed:
Expected Results:
- Disabled Review Button: When an expense report is deleted offline, the “Review” button and the arrow button on the right should become disabled. This prevents users from attempting to access a report that has been marked for deletion.
- Inaccessible Deleted Report: The deleted expense report should no longer be accessible from any section within the application, including the Inbox. This ensures that deleted data is effectively removed from the user interface.
- Non-Selectable Report on Mobile: On mWeb, Android, and iOS platforms, the deleted report should not be selectable. This prevents users from performing any actions on a report that is intended to be deleted.
Actual Results:
- Clickable Review Button: The “Review” button and the arrow button on the right remain clickable even after the expense report is deleted offline. This allows users to attempt to access a deleted report, leading to potential errors or unexpected behavior.
- Accessible Deleted Report: The expense report deleted offline in the Reports section can still be accessed from the Inbox. This contradicts the expectation that deleted reports should be completely inaccessible.
- Selectable Report on Mobile: On mWeb, Android, and iOS platforms, the report remains selectable even after being deleted offline. This allows users to perform actions on a report that should be considered deleted. On the web platform, the checkbox appears green without a checkmark, indicating an inconsistent state.
These discrepancies between the expected and actual results underscore the severity of the bug. The continued accessibility and selectability of deleted reports can lead to user confusion, data integrity issues, and a compromised user experience. Addressing these inconsistencies is vital for maintaining the reliability of the Expensify application.
Detailed Bug Descriptions
The Expensify bug related to expense report deletion while offline manifests in several key issues. These issues undermine the expected behavior of the application and can lead to a confusing user experience. Here’s a detailed breakdown of each bug:
Bug 1: Clickable Review Button After Offline Deletion
Description: The “Review” button and the arrow button on the right side of an expense report entry remain clickable even after the report has been deleted while the application is offline.
Impact: This is problematic because users might attempt to access a report that is marked for deletion. Clicking the button could lead to errors, unexpected behavior, or the display of outdated information. It violates the principle that a deleted item should be inaccessible.
Bug 2: Accessible Deleted Report from Inbox
Description: An expense report that has been deleted offline from the Reports section can still be accessed from the Inbox.
Impact: This bug creates a significant inconsistency in the user interface. Users expect that deleting a report removes it from all sections of the application. The continued presence of the deleted report in the Inbox can cause confusion and potentially lead to unintended actions on the report. It also raises concerns about data integrity, as users might interact with a report that should be considered void.
Bug 3: Selectable Report on Mobile Platforms After Offline Deletion
Description: On mWeb (mobile web), Android, and iOS platforms, a report remains selectable even after it has been deleted while the application is offline.
Impact: The selectability of a deleted report on mobile platforms is a major usability issue. Users might inadvertently select a deleted report and attempt to perform actions on it, leading to errors or unexpected results. On the web platform, the checkbox appearing green without a checkmark adds to the confusion, indicating an inconsistent state. This inconsistency across platforms highlights the need for a unified approach to handling deleted reports.
These bugs collectively paint a picture of an incomplete deletion process when the application is offline. Addressing each of these issues is crucial to ensure that the deletion functionality works as expected across all platforms and provides a consistent user experience.
Platforms Affected
This bug has a wide-reaching impact, affecting users across multiple platforms. Identifying the specific platforms where the issue manifests is crucial for targeted testing and resolution. The following platforms are confirmed to be affected by the expense report deletion bug in Expensify:
- Android:
- App
- mWeb Chrome
- iOS:
- App
- mWeb Safari
- mWeb Chrome
- MacOS:
- Chrome
- Safari
The bug’s presence across both mobile (Android and iOS) and desktop (MacOS) environments, as well as within native apps and mobile web browsers, underscores its broad scope. This widespread impact necessitates a comprehensive fix to ensure a consistent and reliable user experience across all access points.
Notably, the bug was not tested on Windows Chrome or MacOS Desktop, indicating potential areas for further investigation. Addressing the issue on the confirmed platforms is a priority, but subsequent testing on the remaining platforms should also be conducted to ensure complete coverage.
Workaround
At present, there is no known workaround for this bug. Users are unable to prevent the issue from occurring, and the unexpected behavior persists across affected platforms. This lack of a workaround underscores the urgency of addressing the bug through a proper fix.
The absence of a workaround means that users who delete reports offline may encounter the inconsistencies and potential errors described earlier. This can lead to frustration and a compromised user experience. It is crucial for the development team to prioritize resolving this issue to provide users with a reliable and predictable application behavior.
In the meantime, users should be aware of the bug and exercise caution when deleting reports offline. It may be advisable to ensure a stable internet connection before performing deletion actions to avoid encountering the issue.
Screenshots and Videos
Visual documentation of the bug provides valuable context and aids in understanding the issue. The following screenshots and videos demonstrate the bug’s manifestation in the Expensify application:
- https://github.com/user-attachments/assets/d0669f0c-a425-464a-99e3-5886f60c7510
- https://github.com/user-attachments/assets/950adeb4-df99-4c6d-9a66-9c10d3f8a30b
These visual aids clearly illustrate the unexpected behavior, such as the clickable “Review” button, the accessibility of deleted reports from the Inbox, and the selectability of deleted reports on mobile platforms. Such evidence is invaluable for developers in diagnosing and resolving the bug efficiently.
Conclusion
In conclusion, the expense report deletion bug in Expensify, specifically affecting accessibility and selectability after offline deletion, presents a significant challenge. This issue, reproducible in the staging environment across multiple platforms including Android, iOS, and MacOS, highlights inconsistencies in how the application handles data deletion while offline.
The core problems include the continued accessibility of deleted reports via the “Review” button and the Inbox, as well as the unexpected selectability of deleted reports on mobile platforms. These bugs undermine the user experience and raise concerns about data integrity.
With no current workaround available, it is imperative that the Expensify development team addresses these issues promptly. The visual documentation provided through screenshots and videos further emphasizes the need for a comprehensive solution to ensure consistent and reliable application behavior across all platforms.
For more information on contributing to Expensify and related topics, you can check out the Expensify's contributing guidelines.