Open lanitochka17 opened 1 week ago
Triggered auto assignment to @neil-marcellini (DeployBlockerCash
), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.
:wave: 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:
@neil-marcellini 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
Ok, taking a look. In general we can add external and the contributors can help us figure out if it's a backend problem.
Job added to Upwork: https://www.upwork.com/jobs/~015c5e79bf2b62e7b7
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia (External
)
I finally confirmed that the personal detail for concierge has the correct avatar link https://d2k5nsl2zxldvw.cloudfront.net/images/icons/concierge_2022.png. On production it's the same value, so I don't think it's a problem with the data.
Mention - Avatar is not displaying on Concierge in mention list
The problem is that when we try to get the default avatar, we use accountID
, which in the case of suggestionList , we do not pass
To fix this issue we can update this code and add accountID: detail?.accountID,
And also pass accountID for Avatar
As alternative we can update getUserMentionOptions
and pass accountID only in case CONCIERGE, NOTIFICATIONS and so on
Thanks @ZhenjaHorbach. Can you explain the root cause a bit more please? Why is it that we don't pass the accountID when creating the mention? It looks to me like we do.
Thanks @ZhenjaHorbach. Can you explain the root cause a bit more please? Why is it that we don't pass the accountID when creating the mention? It looks to me like we do.
In this PR we added accountID for Avatar and added additional checking which use accountID inside getAvatar
But since we didn’t pass this ID for mentionsList
It turns out that this function does not work correctly
And here we can't get ConciergeAvatar without accountID
Actually in this case I think we need to check all places where we use Avatar
Ok @ZhenjaHorbach I think I finally understand your proposal. I would say the root cause is this.
When we build the suggestions the source is set to this https://github.com/Expensify/App/blob/c6117097e247a8ca7c51b5d59d9d08a901b75162/src/pages/home/report/ReportActionCompose/SuggestionMention.tsx#L245 Previously it was this, and was changed here. https://github.com/Expensify/App/blob/45cd559d2a4af67b8610a87bb472840da087cf80/src/pages/home/report/ReportActionCompose/SuggestionMention.tsx#L241
MentionSuggestions renders the Avatar here and doesn't pass an accountID https://github.com/Expensify/App/blob/c6117097e247a8ca7c51b5d59d9d08a901b75162/src/components/MentionSuggestions.tsx#L82-L89
The avatar source is set here using UserUtils.getAvatar. The accountID is undefined https://github.com/Expensify/App/blob/c6117097e247a8ca7c51b5d59d9d08a901b75162/src/components/Avatar.tsx#L89
That calls getDefaultAvatar https://github.com/Expensify/App/blob/c6117097e247a8ca7c51b5d59d9d08a901b75162/src/libs/UserUtils.ts#L151
Since there's not accountID, it incorrectly returns a default avatar https://github.com/Expensify/App/blob/c6117097e247a8ca7c51b5d59d9d08a901b75162/src/libs/UserUtils.ts#L106
I'm wondering how we can test this. I can't reproduce on dev because the avatar is always blank for me. I'll try against the staging api instead of our dev api.
Or we could just revert Use fallback user avatar in cases where the user is unknown to us. @grgia what do you think since you were involved there?
@ZhenjaHorbach I put up a PR based loosely on your proposal. I hope that's cool with you and I really appreciate you pointing me in the right direction. I would have approved your proposal earlier, but I didn't really understand the root cause until I investigate it thoroughly myself.
Fix concierge avatar in mention suggestion #41034
Happy to help )
@Kicu could you take a look at this?
@neil-marcellini I doubt we will need to revert, I'm fairly certain this will be an easy fix
hey I'm the author of https://github.com/Expensify/App/pull/39229 and I took a look at this, few points from me in random order
getAvatar()
that basically repeated logic, so my intention in PR 39229 was to keep pushing down details.avatar
prop and only run getAvatar()
once - IMO this simplifies the already complex avatar logicBecause of this I believe the best fix for this is to actually do pass accountID
prop correctly. This PR seems to do just that (https://github.com/Expensify/App/pull/41034).
I tested locally on my dev the same fix, and it looks good
In general we only need accountID
to be able to display the "pretty" svg versions of: default avatars, ConciergeAvatar and NotificationsAvatar. Otherwise .avatar
from user details is always correct.
In addition I can supply a separate PR that adds the new accountID
prop in a few places where Avatar is used, because it seems I might miss them.
@grgia
@Kicu are you able to open a PR fix for this as a followup in that case?
@grgia we can use this fix by @neil-marcellini I believe - it's already created: https://github.com/Expensify/App/pull/41034
@neil-marcellini Can you please assign this to me since I reviewed the PR?
Ended up reverting the PR to unblock the deploy, assign @Kicu to address this in the second iteration
I will fix this as part of trying to bring back the fallback avatars fix
Reviewing
label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.4.66-5 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2024-05-03. :confetti_ball:
For reference, here are some details about the assignees on this issue:
⚠️ 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.
The PR was closed and the offending PR was reverted. As such, we don't need to wait for the 7 days for the payment.
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.4.67-7 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2024-05-06. :confetti_ball:
For reference, here are some details about the assignees on this issue:
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.66-0 Reproducible in staging?: Y Reproducible in production?: N If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4516979&group_by=cases:section_id&group_order=asc&group_id=306201&group_by=cases:section_id&group_order=asc&group_id=306201 Email or phone of affected tester (no customers): shussain+accoun1@applausemail.com Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
Avatar should be displayed on Concierge in mention list
Actual Result:
Avatar is not displaying on Concierge in mention list
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/Expensify/App/assets/78819774/dc9b332d-a255-4240-a01e-a035a0beeaf5
View all open jobs on GitHub
Upwork Automation - Do Not Edit