Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[$250] Composer - "Split expense" and "Create expense" options only appear after a delay #54327

Open
2 of 8 tasks
vincdargento opened this issue Dec 18, 2024 · 26 comments
Open
2 of 8 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering Internal Requires API changes or must be handled by Expensify staff Weekly KSv2

Comments

@vincdargento
Copy link

vincdargento commented Dec 18, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 9.0.77-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5357293&group_by=cases:section_id&group_id=294998&group_order=asc
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Device used: Windows 10 / Chrome, macOS Sequoia 15.0
App Component: Chat Report View

Action Performed:

  1. Admin: Navigate to https://staging.new.expensify.com/
  2. Admin: Log in with a Gmail account that has a workspace
  3. Admin: Navigate to Workspace settings - Members
  4. Member: Log in with a new Gmail account on a different device
  5. Admin: Invite the member to the workspace
  6. Member: Quickly navigate to the workspace chat
  7. Click on the composers "+" button
  8. Dismiss the modal
  9. After waiting a little, click on the composers "+" button again (on web, you might have to refresh the browser)

Expected Result:

"Split expense" and "Create expense" options should be instantly available.

Actual Result:

"Split expense" and "Create expense" options only appear after a delay for a new workspace member. On web, refreshing the browser restores the options quicker.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

bug.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021869909199658687649
  • Upwork Job ID: 1869909199658687649
  • Last Price Increase: 2025-01-03
Issue OwnerCurrent Issue Owner: @chiragsalian
@vincdargento vincdargento added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. DeployBlocker Indicates it should block deploying the API labels Dec 18, 2024
Copy link

melvin-bot bot commented Dec 18, 2024

Triggered auto assignment to @trjExpensify (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.

@vincdargento
Copy link
Author

@trjExpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.

@rafecolton rafecolton added the DeployBlockerCash This issue or pull request should block deployment label Dec 18, 2024
Copy link

melvin-bot bot commented Dec 18, 2024

Triggered auto assignment to @chiragsalian (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link

melvin-bot bot commented Dec 18, 2024

💬 A slack conversation has been started in #expensify-open-source

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Dec 18, 2024
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@chiragsalian
Copy link
Contributor

I'm unable to reproduce the issue. I see "Split expense" and "Create expense" just fine. I tested it as quickly as i could without refreshing the page.

Can you retest @vincdargento? I'm wondering if maybe there was some site slowdown causing you to miss the onyx data.

Also can you test @trjExpensify, if issue is non reproducible we can close it out.

@chiragsalian
Copy link
Contributor

Asked tom and he is unable to reproduce the issue as well. Going to close it out, but if you are able to reproduce the issue let us know @vincdargento.

@trjExpensify
Copy link
Contributor

Agreed. Thread here for the breadcrumbs!

@vincdargento
Copy link
Author

@chiragsalian Tester was able to reproduce again, reopening in case you want to take a look

bandicam.2024-12-19.22-22-17-178.mp4

@vincdargento vincdargento reopened this Dec 19, 2024
@chiragsalian
Copy link
Contributor

okay well either way since its not consistently reproducible by all, and/or since its an edge case i don't feel like its a blocker. So I'll remove out those labels. I'll mark it external to get more eyes on it.

@chiragsalian chiragsalian added External Added to denote the issue can be worked on by a contributor Weekly KSv2 and removed Hourly KSv2 DeployBlocker Indicates it should block deploying the API labels Dec 20, 2024
Copy link

melvin-bot bot commented Dec 20, 2024

Job added to Upwork: https://www.upwork.com/jobs/~021869909199658687649

@melvin-bot melvin-bot bot changed the title Composer - "Split expense" and "Create expense" options only appear after a delay [$250] Composer - "Split expense" and "Create expense" options only appear after a delay Dec 20, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 20, 2024
Copy link

melvin-bot bot commented Dec 20, 2024

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Dec 20, 2024
Copy link

melvin-bot bot commented Dec 23, 2024

@paultsimura, @chiragsalian, @trjExpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot added the Overdue label Dec 23, 2024
@jasperhuangg jasperhuangg removed the DeployBlockerCash This issue or pull request should block deployment label Dec 24, 2024
Copy link

melvin-bot bot commented Dec 25, 2024

@paultsimura, @chiragsalian, @trjExpensify Eep! 4 days overdue now. Issues have feelings too...

@huult
Copy link
Contributor

huult commented Dec 27, 2024

Edited by proposal-police: This proposal was edited at 2024-12-27 08:36:24 UTC.

Proposal

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

"Split expense" and "Create expense" options only appear after a delay

What is the root cause of that problem?

This is a backend issue: the reported data does not return the correct value and only updates to the correct value after refreshing or switching to another chat and then returning.

Here is the report data for this ticket case.

  • Screenshot 2024-12-27 at 15 04 48

If we want to show Split Expense, the report must have a chat type of policyExpenseChat and isOwnPolicyExpenseChat must be true. However, in the report data, if isOwnPolicyExpenseChat is false, Split Expense will not be displayed.

(isPolicyExpenseChat(report) && report?.isOwnPolicyExpenseChat)

Create Expense is similar to Split Expense the condition to show it is not valid due to the report data, so Create Expense will not be displayed.”

options = [...options, CONST.IOU.TYPE.REQUEST];

So, moneyRequestOptionsList will return an empty array, and this issue occurs.

const moneyRequestOptionsList = ReportUtils.temporary_getMoneyRequestOptions(report, policy, reportParticipantIDs ?? []).map((option) => ({

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

To resolve this issue, we must check the OpenReport API to understand why it returns this value and ensure it responds with the correct value. If we want to fix it from the frontend, we need to add a condition: if the chatType is policyExpenseChat and isOwnPolicyExpenseChat is false, then we must refetch openReport.

    useEffect(() => {
        const needsReportRefetch = ReportUtils.isPolicyExpenseChat(report) && !report?.isOwnPolicyExpenseChat;
        if (needsReportRefetch) {
            fetchReport();
        }
    }, [fetchReport, report]);

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

What alternative solutions did you explore? (Optional)

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.

Copy link

melvin-bot bot commented Dec 27, 2024

@paultsimura, @chiragsalian, @trjExpensify Still overdue 6 days?! Let's take care of this!

@paultsimura
Copy link
Contributor

Thank you @huult, this indeed looks like a BE issue.

🎀👀🎀 C+ reviewed

@melvin-bot melvin-bot bot removed the Overdue label Dec 27, 2024
Copy link

melvin-bot bot commented Dec 27, 2024

Current assignee @chiragsalian is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

Copy link

melvin-bot bot commented Dec 27, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Dec 31, 2024

@paultsimura, @chiragsalian, @trjExpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Dec 31, 2024
Copy link

melvin-bot bot commented Jan 1, 2025

@paultsimura @chiragsalian @trjExpensify this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

Copy link

melvin-bot bot commented Jan 2, 2025

@paultsimura, @chiragsalian, @trjExpensify Huh... This is 4 days overdue. Who can take care of this?

@trjExpensify
Copy link
Contributor

@chiragsalian, do you agree with the RCA here? If so, let's remove the Help wanted label and switch External to Internal.

@trjExpensify
Copy link
Contributor

Adding this to #quality as it's not reproducible 100% of the time.

Copy link

melvin-bot bot commented Jan 3, 2025

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@chiragsalian
Copy link
Contributor

Yes i agree with the RCA and this is a backend issue. Updating labels.

@chiragsalian chiragsalian added Weekly KSv2 Internal Requires API changes or must be handled by Expensify staff and removed External Added to denote the issue can be worked on by a contributor Daily KSv2 Help Wanted Apply this label when an issue is open to proposals by contributors labels Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering Internal Requires API changes or must be handled by Expensify staff Weekly KSv2
Projects
Status: No status
Development

No branches or pull requests

7 participants