Expensify: Billable Option Inconsistency During Expense Merge

by Luna Greco 62 views

Hey guys! Today, we're diving into a quirky issue found in Expensify's app where the billable option behaves differently during an expense merge compared to when you're just viewing the merged expense. It's like a little magic trick, but not the kind we want! This was spotted in version 9.1.91-1 and is reproducible in the staging environment, so let’s get into the nitty-gritty.

What's the Buzz About?

The core of the issue revolves around the consistency of the billable option within Expensify. Imagine setting up your workspace rules, diving into expense creation, and then merging expenses, only to find that the billable setting acts differently depending on where you are in the app. It’s a bit like trying to catch a shadow – elusive and a tad frustrating. Let's walk through the steps to see it in action.

Steps to Replicate the Issue

  1. Workspace Setup: First, head over to the staging environment of Expensify (https://staging.new.expensify.com/home). Once you're in, navigate to your workspace settings and enable the rules feature. This is our starting point.
  2. Billable Default: Inside the rules settings, you'll want to set the billable default to, well, billable. This ensures that expenses are, by default, marked as ready to be billed to clients. It's all about streamlining that invoicing process, right?
  3. Prevent Self-Approvals: Now, toggle on the “Prevent self-approvals” option. This is a handy feature to ensure that expenses aren't being rubber-stamped by the submitter themselves – keeps things nice and transparent.
  4. Workspace Chat: Next up, jump into your workspace chat. This is where the expense magic begins. Think of it as your financial command center.
  5. Manual Expense Creation: Create a manual expense. This is just a standard expense entry – nothing too wild just yet. We’re laying the groundwork for the main event.
  6. Split the Expense: Here’s where things get interesting. Tap the “More” option on your newly created expense and then select “Split the expense.” Splitting expenses is a common scenario, especially when dealing with shared meals or travel costs.
  7. Merge the Expense: Now, open any one of the split expenses and initiate a merge. This is where we start to see the inconsistency. The merge flow is crucial for consolidating related expenses into a single, neat package.
  8. Confirm Details Page: Pay close attention in the merge flow, specifically on the “Confirm Details” page. Notice that the billable option is locked. This is the first part of our puzzle. You can’t change it here, which seems a bit odd.
  9. Open Merged Expense: After the merge, open the resulting merged expense. Now, take a look at the billable option again. You’ll see it’s no longer locked. Ta-da! The billable option is free for editing, creating a discrepancy between the merge flow and the final merged expense view.

The Expected vs. Actual Result

So, what did we expect to happen? The expected result is pretty straightforward: the billable option should display consistently, whether you're in the “Confirm Details” page during the merge flow or viewing the final merged expense. Consistency is key, guys! We want a smooth, predictable experience.

But, as the actual result shows, that’s not quite what's happening. In the “Confirm Details” page of the merge flow, the billable option is locked, creating a moment of “Huh?” for the user. This inconsistency can lead to confusion and potentially incorrect expense tracking.

Workaround and Platforms

As of now, there’s no known workaround for this issue. It’s a quirk that users will have to navigate until a fix is implemented. It's like finding a detour on your favorite route – you can still get there, but it's not as smooth as you'd like.

This issue has been reproduced on several platforms, which means it’s not just a one-off glitch. It affects users on:

  • Android: Both the app and the mobile web version (Chrome).
  • Windows: Chrome browser.

Testing also touched on these platforms, confirming the issue's reach:

  • Android: App and mWeb Chrome
  • Windows: Chrome

Visual Evidence

Visual evidence, like screenshots or videos, can be super helpful in understanding and addressing issues. In this case, there’s a handy attachment (https://github.com/user-attachments/assets/1879a57b-ef15-422a-a66f-0cd873ae9497) that shows the billable option being locked during the merge confirmation. A picture is worth a thousand words, right?

Digging Deeper into the Issue

To truly understand the impact, let's break down why this inconsistency matters and how it might affect users.

Why Consistency is Crucial

In any application, especially one dealing with finances, consistency is paramount. When a user interacts with a feature, they expect it to behave the same way every time. This predictability builds trust and reduces the learning curve. When the billable option is locked in one place and unlocked in another, it introduces cognitive friction. Users might wonder:

  • Is this a bug?
  • Am I doing something wrong?
  • Did the setting save correctly?

These questions can lead to frustration and a less-than-ideal user experience. Imagine you're meticulously merging expenses, ensuring everything is billable, only to find you can't confirm that setting in the final step. It’s like baking a cake and realizing you can't add the frosting until after everyone's left the party.

Potential Impact on Users

The inconsistent billable option can have several practical implications for users:

  1. Incorrect Expense Tracking: If a user assumes the billable option is locked because it's already set correctly, they might miss the fact that it's unlocked in the final merged expense. This could lead to non-billable expenses being accidentally marked as billable, or vice versa.
  2. Time Waste: Discovering the inconsistency forces users to double-check their settings, adding extra steps to their workflow. This is time that could be better spent on other tasks. Think of it as a small papercut in your day – annoying and slowing you down.
  3. Confusion and Errors: The inconsistent behavior can confuse users, especially those who are new to the platform. This confusion can lead to errors in expense reporting and reconciliation, which can have financial consequences. Nobody wants accounting errors, right?
  4. Loss of Trust: Over time, small inconsistencies can erode trust in the application. Users might start to question the reliability of other features, leading to a negative perception of the overall experience. Trust is hard-earned and easily lost, so consistency is a key ingredient.

Possible Root Causes

To fix the issue, it’s helpful to speculate on the potential root causes. Here are a few possibilities:

  1. Different Code Paths: The “Confirm Details” page in the merge flow and the merged expense view might be using different code paths to determine the state of the billable option. This could lead to discrepancies if the logic isn't perfectly aligned.
  2. State Management Issues: The application's state management might not be correctly propagating the billable setting between the merge flow and the final expense view. Think of it like a game of telephone where the message gets garbled along the way.
  3. UI Component Glitches: There might be a glitch in the UI component responsible for displaying the billable option. This could cause it to incorrectly lock or unlock based on the context.
  4. Race Conditions: In rare cases, race conditions could be at play. If multiple operations are trying to access and modify the billable setting at the same time, it could lead to unpredictable behavior.

Addressing the Issue

Fixing this inconsistency requires a systematic approach:

  1. Diagnosis: The first step is to accurately diagnose the root cause. Developers will need to dive into the code, examine the different code paths, and identify where the logic diverges.
  2. Code Review: A thorough code review can help catch subtle bugs and ensure that the fix doesn't introduce new issues. Fresh eyes can often spot things that the original developer might have missed.
  3. Testing: Rigorous testing is essential to verify that the fix works as expected and doesn't have unintended side effects. This includes unit tests, integration tests, and user acceptance testing.
  4. Monitoring: After the fix is deployed, it's important to monitor the application for any regressions or new issues. Catching problems early can prevent them from impacting users.

Expensify's Commitment to Quality

Expensify, like any top-notch app, is committed to delivering a high-quality user experience. Issues like this billable option inconsistency are a natural part of software development. The key is to identify them quickly, address them effectively, and learn from them to prevent similar issues in the future. It’s all about continuous improvement, guys!

Wrapping Up

In conclusion, the billable option being locked in the “Confirm Details” page during a merge but unlocked when viewing the merged expense is an inconsistency that can cause confusion and potential errors for users. By understanding the steps to reproduce the issue, the potential impact, and the possible root causes, we can work towards a solution that ensures a more consistent and reliable experience. Thanks for diving deep with me on this one, and stay tuned for more insights into the world of expense management!