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

[HOLD for payment 2024-10-29] [$250] LHN - Chat that contains only task disappears from LHN #50478

Closed
1 of 6 tasks
lanitochka17 opened this issue Oct 8, 2024 · 20 comments
Closed
1 of 6 tasks
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Oct 8, 2024

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.0.46-3
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): applausetester+bg@applause.expensifail.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. Login with expensifail account
  2. Start a new chat
  3. Create a task on the newly created chat
  4. Go to another chat

Expected Result:

Chat that contains only task does not disappear from from LHN

Actual Result:

Chat that contains only task disappears from LHN when navigating to other chats

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
Bug6628563_1728407429433.Screen_Recording_2024-10-08_at_6.42.38_in_the_evening.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021843919279680546076
  • Upwork Job ID: 1843919279680546076
  • Last Price Increase: 2024-10-09
  • Automatic offers:
    • hoangzinh | Reviewer | 104415093
Issue OwnerCurrent Issue Owner: @VictoriaExpensify
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 8, 2024
Copy link

melvin-bot bot commented Oct 8, 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.

@mkzie2
Copy link
Contributor

mkzie2 commented Oct 8, 2024

Proposal

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

  • LHN - Chat that contains only task disappears from LHN

What is the root cause of that problem?

  • When we start a new chat, the notificaitonPreference is hidden. When creating a task, we don't set the notificationPreference to always:

// Now that we've created the optimistic chat report and chat reportActions, we can update the parent report data
// FOR PARENT REPORT (SHARE DESTINATION)
optimisticData.push(
{
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${parentReportID}`,
value: optimisticParentReport,
},
{
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${parentReportID}`,
value: {[optimisticAddCommentReport.reportAction.reportActionID]: optimisticAddCommentReport.reportAction as OnyxTypes.ReportAction},
},
);

like we did when creating a new comment:

const shouldUpdateNotificationPrefernece = !isEmptyObject(report) && ReportUtils.getReportNotificationPreference(report) === CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN;
if (shouldUpdateNotificationPrefernece) {
optimisticReport.participants = {
[currentUserAccountID]: {notificationPreference: CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS},
};
}

so the chat disappears from LHN:

if (isHidden && !shouldOverrideHidden) {

until the API CreateTask is called succesfully.

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

Add a logic to update notificationPreference to place:

    const shouldUpdateNotificationPrefernece = !isEmptyObject(parentReport) && ReportUtils.getReportNotificationPreference(parent) === CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN;

    if (shouldUpdateNotificationPrefernece) {
        optimisticData.push({
            onyxMethod: Onyx.METHOD.MERGE,
            key: `${ONYXKEYS.COLLECTION.REPORT}${parentReportID}`,
            value: {
                participants: {
                    [currentUserAccountID]: {notificationPreference: CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS},
                },
                notificationPreference: CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS // Optional
            },
        });
    }

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.

@Nodebrute
Copy link
Contributor

I am unable to reproduce this on the latest main. @mkzie2, could you please list all the steps to reproduce this issue?

Screen.Recording.2024-10-09.at.1.55.03.AM.mov

@VictoriaExpensify
Copy link
Contributor

Agree this is an isue and we should fix it

@VictoriaExpensify VictoriaExpensify added the External Added to denote the issue can be worked on by a contributor label Oct 9, 2024
@melvin-bot melvin-bot bot changed the title LHN - Chat that contains only task disappears from LHN [$250] LHN - Chat that contains only task disappears from LHN Oct 9, 2024
Copy link

melvin-bot bot commented Oct 9, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 9, 2024
Copy link

melvin-bot bot commented Oct 9, 2024

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

@hoangzinh
Copy link
Contributor

@mkzie2's RCA and solution looks good to me

Link to proposal #50478 (comment)

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Oct 10, 2024

Triggered auto assignment to @marcochavezf, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@marcochavezf
Copy link
Contributor

Thanks for the review @hoangzinh, assigning @mkzie2 🚀

@melvin-bot melvin-bot bot added the Overdue label Oct 14, 2024
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 14, 2024
Copy link

melvin-bot bot commented Oct 14, 2024

📣 @hoangzinh 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Oct 14, 2024

📣 @mkzie2 You have been assigned to this job!
Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs!
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot removed the Overdue label Oct 14, 2024
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Oct 16, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 22, 2024
@melvin-bot melvin-bot bot changed the title [$250] LHN - Chat that contains only task disappears from LHN [HOLD for payment 2024-10-29] [$250] LHN - Chat that contains only task disappears from LHN Oct 22, 2024
Copy link

melvin-bot bot commented Oct 22, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 22, 2024
Copy link

melvin-bot bot commented Oct 22, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.51-4 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 2024-10-29. 🎊

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

Copy link

melvin-bot bot commented Oct 22, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@hoangzinh] The PR that introduced the bug has been identified. Link to the PR:
  • [@hoangzinh] 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:
  • [@hoangzinh] A discussion in #expensify-bugs 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:
  • [@hoangzinh] Determine if we should create a regression test for this bug.
  • [@hoangzinh] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@VictoriaExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Oct 28, 2024
@VictoriaExpensify
Copy link
Contributor

Hi @mkzie2 - can you please accept this offer so I can process your payment - https://www.upwork.com/nx/wm/offer/104636304

@hoangzinh can you please complete the checklist

Thank you!

@mkzie2
Copy link
Contributor

mkzie2 commented Oct 29, 2024

@VictoriaExpensify I accepted the offer, thanks

@hoangzinh
Copy link
Contributor

Regression Test Proposal

Web/Desktop

  1. Start a new chat
  2. Create a task on the newly created chat
  3. Go to another chat
  4. Verify the chat from step 2 remains in LHN

mWeb/Native

  1. Start a new chat
  2. Create a task on the newly created chat
  3. Go back to LHN
  4. Verify the chat from step 2 remains in LHN

Do we agree 👍 or 👎

@hoangzinh
Copy link
Contributor

BugZero Checklist:

  • The PR that introduced the bug has been identified. Link to the PR: No offending PR, I think it's a new scenario we haven't covered yet.
  • 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: N/A
  • A discussion in #expensify-bugs 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
  • Determine if we should create a regression test for this bug: Yes
  • If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again. [HOLD for payment 2024-10-29] [$250] LHN - Chat that contains only task disappears from LHN #50478 (comment)

@VictoriaExpensify
Copy link
Contributor

Thanks @hoangzinh - raised request to add ^^ to testrail - https://github.com/Expensify/Expensify/issues/440023

@VictoriaExpensify
Copy link
Contributor

Payment summary:
Contributor: @mkzie2 paid $250 via Upwork
Contributor+: @hoangzinh paid $250 via Upwork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
No open projects
Status: Polish
Development

No branches or pull requests

6 participants