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-04-15] [HOLD for payment 2024-04-09] Thread - Group chat thread header shows unavailable workspace icon #39247

Closed
6 tasks done
izarutskaya opened this issue Mar 29, 2024 · 25 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering

Comments

@izarutskaya
Copy link

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: 1.4.58-0
Reproducible in staging?: Y
Reproducible in production?: N
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to FAB > Start chat.
  3. Create a group chat.
  4. Send a message in group chat.
  5. Right click on message > Reply in thread.

Expected Result:

Group chat thread header will not show unavailable workspace icon.

Actual Result:

Group chat thread header shows unavailable workspace icon.

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

Bug6431606_1711720106647.bandicam_2024-03-29_21-45-01-561.mp4

View all open jobs on GitHub

@izarutskaya izarutskaya added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Mar 29, 2024
Copy link

melvin-bot bot commented Mar 29, 2024

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

Copy link

melvin-bot bot commented Mar 29, 2024

Triggered auto assignment to @dylanexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

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.

@izarutskaya
Copy link
Author

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.

@izarutskaya
Copy link
Author

We think this issue might be related to the #vip-vsb.

@izarutskaya
Copy link
Author

Production

image (4)

Copy link

melvin-bot bot commented Mar 29, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@ZhenjaHorbach
Copy link
Contributor

ZhenjaHorbach commented Mar 29, 2024

In fact, this doesn't look like a regression and as an unaccounted case

Proposal

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

Thread - Group chat thread header shows unavailable workspace icon

What is the root cause of that problem?

The main problem with issue is that when we try to get icon for our header we use SubscriptAvatar which always uses 2 images

<SubscriptAvatar
mainAvatar={icons[0]}
secondaryAvatar={icons[1]}
size={defaultSubscriptSize}
/>

Because group thread Fits under isWorkspaceThread condition

App/src/libs/ReportUtils.ts

Lines 4805 to 4807 in c77c635

if (isWorkspaceThread(report)) {
return true;
}

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

To fix this issue we can use MultipleAvatars for group threads

For this we need create new function isGroupThread

function isGroupThread(report: OnyxEntry<Report>): boolean {
    return isThread(report) && isChatReport(report) && getChatType(report) === CONST.REPORT.CHAT_TYPE.GROUP;
}

And then return false for shouldReportShowSubscript when it's group chat

if (isGroupThread(report)) {
    return false;
}

App/src/libs/ReportUtils.ts

Lines 4805 to 4807 in c77c635

if (isWorkspaceThread(report)) {
return true;
}

And then update getIcons and add

			**if(isGroupThread(report)){
				const parentReportAction = ReportActionsUtils.getParentReportAction(report);
				const memberIcon = {
								source: UserUtils.getAvatar(personalDetails?.[parentReportAction.actorAccountID ?? -1]?.avatar ?? '', parentReportAction.actorAccountID ?? -1),
								id: parentReportAction.actorAccountID,
								type: CONST.ICON_TYPE_AVATAR,
								name: personalDetails?.[parentReportAction.actorAccountID ?? -1]?.displayName ?? '',
								fallbackIcon: personalDetails?.[parentReportAction.actorAccountID ?? -1]?.fallbackIcon,
				};

				return [memberIcon];
			}**

What alternative solutions did you explore? (Optional)

NA

@NikkiWines
Copy link
Contributor

Hmm, I'm not able to reproduce this on staging but I also see a different group icon to begin with 🤔

Screen.Recording.2024-03-29.at.10.49.23.mov

@ZhenjaHorbach
Copy link
Contributor

Staging:
After creating a chat and then a thread

Screenshot 2024-03-29 at 19 13 47

@dylanexpensify
Copy link
Contributor

@NikkiWines I don't think this is a deploy blocker, but what do you think? Attempting reproduction now

@dylanexpensify
Copy link
Contributor

Could reproduce 👍

@NikkiWines
Copy link
Contributor

I still can't reproduce it 😢 @dylanexpensify @ZhenjaHorbach are either of you able to reproduce the bug on prod? If not, let's identify what PR introduced the changes and whether or not it's a regression or just a mishandled edge case.

@ZhenjaHorbach
Copy link
Contributor

ZhenjaHorbach commented Mar 29, 2024

I still can't reproduce it 😢 @dylanexpensify @ZhenjaHorbach are either of you able to reproduce the bug on prod? If not, let's identify what PR introduced the changes and whether or not it's a regression or just a mishandled edge case.

This is not reproduced on production
But it's easy on staging
And I think this issue is related to this PR)
#37458

@marcaaron
Copy link
Contributor

Thanks @NikkiWines. Gonna jump in here.

@marcaaron marcaaron added the Reviewing Has a PR in review label Apr 1, 2024
@melvin-bot melvin-bot bot removed the Overdue label Apr 1, 2024
@marcaaron
Copy link
Contributor

QA re-testing now.

@kavimuru
Copy link

kavimuru commented Apr 1, 2024

This issue is fixed

39247.mp4

@marcaaron marcaaron added Weekly KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Apr 1, 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 Apr 2, 2024
@melvin-bot melvin-bot bot changed the title Thread - Group chat thread header shows unavailable workspace icon [HOLD for payment 2024-04-09] Thread - Group chat thread header shows unavailable workspace icon Apr 2, 2024
Copy link

melvin-bot bot commented Apr 2, 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 Apr 2, 2024
Copy link

melvin-bot bot commented Apr 2, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.58-8 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-04-09. 🎊

Copy link

melvin-bot bot commented Apr 2, 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:

  • [@marcaaron] The PR that introduced the bug has been identified. Link to the PR:
  • [@marcaaron] 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:
  • [@marcaaron] 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:
  • [@marcaaron] Determine if we should create a regression test for this bug.
  • [@marcaaron] 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.
  • [@dylanexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Apr 8, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-04-09] Thread - Group chat thread header shows unavailable workspace icon [HOLD for payment 2024-04-15] [HOLD for payment 2024-04-09] Thread - Group chat thread header shows unavailable workspace icon Apr 8, 2024
Copy link

melvin-bot bot commented Apr 8, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.60-13 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-04-15. 🎊

Copy link

melvin-bot bot commented Apr 8, 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:

  • [@marcaaron] The PR that introduced the bug has been identified. Link to the PR:
  • [@marcaaron] 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:
  • [@marcaaron] 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:
  • [@marcaaron] Determine if we should create a regression test for this bug.
  • [@marcaaron] 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.
  • [@dylanexpensify] 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 Overdue and removed Weekly KSv2 labels Apr 8, 2024
Copy link

melvin-bot bot commented Apr 11, 2024

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

@dylanexpensify
Copy link
Contributor

Hmm, @marcaaron is there anyone we need to pay here?

@melvin-bot melvin-bot bot removed the Overdue label Apr 12, 2024
@s77rt
Copy link
Contributor

s77rt commented Apr 12, 2024

No payment is due here. This can be closed

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 Engineering
Projects
None yet
Development

No branches or pull requests

7 participants