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] LHN - Group chat with only scan receipt split expense disappears from the LHN #53956

Open
1 of 8 tasks
lanitochka17 opened this issue Dec 11, 2024 · 8 comments
Open
1 of 8 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@lanitochka17
Copy link

lanitochka17 commented Dec 11, 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.74-0
Reproducible in staging?: Y
Reproducible in production?: Y
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: N/A
Component: Left Hand Navigation (LHN)
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Click FAB (Green + button)
  3. Click Start Chat
  4. Add 2 other user to group
  5. Click Next
  6. Click Start Group
  7. Click + icon
  8. Click Split expense
  9. Upload a receipt, click Split expense
  10. Open a different chat

Expected Result:

The created group chat with a split expense is still visible and accessible from the LHN

Actual Result:

The created group chat disappears from the LHN

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

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

Screenshots/Videos

Add any screenshot/video evidence
Bug6691234_1733934537607.Recording__61.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021867027490228697541
  • Upwork Job ID: 1867027490228697541
  • Last Price Increase: 2024-12-12
Issue OwnerCurrent Issue Owner: @getusha
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 11, 2024
Copy link

melvin-bot bot commented Dec 11, 2024

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

@bernhardoj
Copy link
Contributor

bernhardoj commented Dec 11, 2024

Proposal

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

Group chat with only split bill disappears from the LHN.

What is the root cause of that problem?

The report will disappear from the LHN if the notification preference is hidden, which is true when we create a new group. When we do a split bill, the notification preference stays hidden. This issue is pretty much the same as #50478 where the chat that only contains the task disappears from the LHN.

And actually, I previously fixed this issue before in #40271, but the fix was removed by the notification preference migration PR.

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

We will use the same solution from #50478 and my previous PR, that is by optimistically updating the notification preference of the report to ALWAYS if it's previously hidden when doing a split bill in createSplitsAndOnyxData.

const shouldUpdateNotificationPreference = !isEmptyObject(parentReport) && ReportUtils.getReportNotificationPreference(parentReport) === CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN;
if (shouldUpdateNotificationPreference) {
optimisticData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${parentReportID}`,
value: {
participants: {
[currentUserAccountID]: {notificationPreference: CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS},
},
},
});
}

image

But we need a BE fix too because BE will still return hidden, the same for tasks too.

(I guess we probably need to do this for money request too)

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

We can test the createSplitsAndOnyxData (and other functions too for money request) and assert that the optimistic data for the chat report has its notificationPreference of the current user in the participants is updated to ALWAYS when it's previously HIDDEN.

@VictoriaExpensify VictoriaExpensify added the External Added to denote the issue can be worked on by a contributor label Dec 12, 2024
Copy link

melvin-bot bot commented Dec 12, 2024

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

@melvin-bot melvin-bot bot changed the title LHN - Group chat with only scan receipt split expense disappears from the LHN [$250] LHN - Group chat with only scan receipt split expense disappears from the LHN Dec 12, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 12, 2024
Copy link

melvin-bot bot commented Dec 12, 2024

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

@shubham1206agra
Copy link
Contributor

Expediting review here since I wrote the notification migration.

@bernhardoj Thanks for the proposal. But I think the fix should be internal.
@puneetlath Can you take a look into this?

@bernhardoj
Copy link
Contributor

We need a FE fix for the optimistic data too.

Copy link

melvin-bot bot commented Dec 12, 2024

📣 @Krrunal! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@kaushiktd
Copy link
Contributor

@VictoriaExpensify i can't reproduce it

here is the video
screen-capture.webm

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. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
Status: No status
Development

No branches or pull requests

6 participants