Skip to content

[Due for payment 2025-07-15] [$250] Excluded User Still Sees “Your Split” Label in Split Expense UI #65027

Closed

Description

@m-natarajan

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.71-8
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @dubielzyk-expensify
Slack conversation (hyperlinked to channel name): #Expensify Bugs

Action Performed:

  1. Go to a group chat with 4 members (e.g., Users A, B, C, D)
  2. Have User A create a split expense including all 4 members
  3. Then, have User A create another split expense, but this time include only Users A, C, and D, excluding User B
  4. Login as User B
  5. Observe the expense

Expected Result:

If a user is excluded from a split, the UI should not show “Your split”

Actual Result:

Excluded users see a “Your split” label

Workaround:

Unknown

Platforms:

Select the officially supported platforms where the issue was reproduced:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop
Platforms Tested: On which of our officially supported platforms was this issue tested:
  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Image

Recording.1334.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021938303481336886209
  • Upwork Job ID: 1938303481336886209
  • Last Price Increase: 2025-06-26
Issue OwnerCurrent Issue Owner: @clarajones-expensify

Activity

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

    @melvin-bot

    Triggered auto assignment to @slafortune (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. m-natarajan commented on Jun 26, 2025

    @m-natarajan
    Author

    Proposal by @dukenv0307

    Proposal

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

    Split expense says Your split: $X.XX even though th user is not part of the split:

    What is the root cause of that problem?

    The shouldShowSplitShare is always true for split bill

    const shouldShowSplitShare = isBillSplit && !!requestAmount && requestAmount > 0;

    And we always fallback the splitShare amount with calculateAmount even though the current user is not a part of the split bill

    const splitShare = useMemo(
    () =>
    shouldShowSplitShare
    ? (transaction?.comment?.splits?.find((split) => split.accountID === sessionAccountID)?.amount ??
    calculateAmount(isReportAPolicyExpenseChat ? 1 : participantAccountIDs.length - 1, requestAmount ?? 0, requestCurrency ?? '', action?.actorAccountID === sessionAccountID))
    : 0,
    [

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

    We can update shouldShowSplitShare condition to false if the user is not a part of the split bill.

    const participantAccountIDs = isMoneyRequestAction(action) && isBillSplit ? (getOriginalMessage(action)?.participantAccountIDs ?? []) : [];
    const shouldShowSplitShare = isBillSplit && !!requestAmount && requestAmount > 0 && participantAccountIDs.includes(getCurrentUserAccountID());
    

    const shouldShowSplitShare = isBillSplit && !!requestAmount && requestAmount > 0;

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

    Update createTransactionPreviewConditionals unit test to verify shouldShowSplitShare is only true if the user is a part of the split bill transaction.

    What alternative solutions did you explore? (Optional)

    We can return 0 here if the current user is not in participantAccountIDs

    shouldShowSplitShare
        ? (transaction?.comment?.splits?.find((split) => split.accountID === sessionAccountID)?.amount ??
          (!participantAccountIDs.includes(sessionAccountID ?? 0)
              ? 0
              : calculateAmount(
                    isReportAPolicyExpenseChat ? 1 : participantAccountIDs.length - 1,
                    requestAmount ?? 0,
                    requestCurrency ?? '',
                    action?.actorAccountID === sessionAccountID,
                )))
        : 0,
    

    const splitShare = useMemo(
    () =>
    shouldShowSplitShare
    ? (transaction?.comment?.splits?.find((split) => split.accountID === sessionAccountID)?.amount ??
    calculateAmount(isReportAPolicyExpenseChat ? 1 : participantAccountIDs.length - 1, requestAmount ?? 0, requestCurrency ?? '', action?.actorAccountID === sessionAccountID))
    : 0,
    [

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  4. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jun 26, 2025
  5. changed the title [-]Excluded User Still Sees “Your Split” Label in Split Expense UI[/-] [+][$250] Excluded User Still Sees “Your Split” Label in Split Expense UI[/+] on Jun 26, 2025
  6. melvin-bot commented on Jun 26, 2025

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

    @melvin-bot

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

  9. melvin-bot commented on Jun 30, 2025

    @melvin-bot

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

  10. ahmedGaber93 commented on Jun 30, 2025

    @ahmedGaber93
    Contributor

    reviewing today

  11. 22 remaining items

  12. melvin-bot commented on Jul 8, 2025

    @melvin-bot

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

  13. melvin-bot commented on Jul 8, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.77-2 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 2025-07-15. 🎊

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

    • @ahmedGaber93 requires payment through NewDot Manual Requests
    • @dukenv0307 requires payment through NewDot Manual Requests
  14. melvin-bot commented on Jul 8, 2025

    @melvin-bot

    @ahmedGaber93 / @dukenv0307 @clarajones-expensify 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]

  15. clarajones-expensify commented on Jul 11, 2025

    @clarajones-expensify
    Contributor

    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:

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

    • [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
    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Precondition:

    Test:

    Do we agree 👍 or 👎

  16. clarajones-expensify commented on Jul 11, 2025

    @clarajones-expensify
    Contributor

    Hi @ahmedGaber93 - would you fill out the above checklist? Thanks!

  17. melvin-bot commented on Jul 15, 2025

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@clarajones-expensify)

    • 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/1938303481336886209/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
  18. ahmedGaber93 commented on Jul 15, 2025

    @ahmedGaber93
    Contributor

    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/57614/files#r2208098724

    • [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 Template
    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Precondition:

    Test:

    1. Go to a group chat with 4 members (e.g., Users A, B, C, D)
    2. Have User A create a split expense including all 4 members
    3. Then, have User A create another split expense, but this time include only Users A, C, and D, excluding User B
    4. Login as User B
    5. Observe the expense
    6. Verify that If a user is excluded from a split, the UI should not show “Your split”

    Do we agree 👍 or 👎

  19. ahmedGaber93 commented on Jul 15, 2025

    @ahmedGaber93
    Contributor

    @clarajones-expensify checklist have been completed.

  20. clarajones-expensify commented on Jul 15, 2025

    @clarajones-expensify
    Contributor

    Payment Summary

    C+: @ahmedGaber93 owed $250 via NewDot
    Contributor: @dukenv0307 owed $250 via NewDot

    @JmillsExpensify good to go

  21. flaviadefaria commented on Aug 4, 2025

    @flaviadefaria
    Contributor

    Approved $250 for @dukenv0307

  22. trjExpensify commented on Nov 5, 2025

    @trjExpensify
    Contributor

    approved $250 for @ahmedGaber93.

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