-
Notifications
You must be signed in to change notification settings - Fork 3k
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 2023-12-28] [$500] Chat - Avatar of a new user changes when switching from offline to online #28518
Comments
Triggered auto assignment to @JmillsExpensify ( |
Bug0 Triage Checklist (Main S/O)
|
@JmillsExpensify Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@JmillsExpensify Eep! 4 days overdue now. Issues have feelings too... |
@JmillsExpensify Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it! |
Oh huh, good catch. I'm not sure why that's happening, but I agree that it shouldn't. |
Job added to Upwork: https://www.upwork.com/jobs/~019f97d031d4b4165c |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Avatar of a new user changes to another default avatar when switching from offline to online What is the root cause of that problem?When we are offline and create a chat with a new user, we use an optimistic ID as their account ID: When switching from offline to online, the server will update the optimistic ID to use the correct ID instead. At the same time, it also changed the address of the avatar: We're using function getAvatar to calculate the avatar here: Lines 137 to 139 in 85f372c
When the new avatar address is passed into the isDefaultAvatar function, it returns true. As a result, we recalculated the avatar address with the new accountID, and it return a different avatar. Lines 110 to 114 in 85f372c
What changes do you think we should make in order to solve the problem?When we create a chat(online or offline), we use the user's input email to create an optimistic ID.
This ID is generated using a hash algorithm, and we use this optimistic ID to index the avatar.
The backend-generated avatar URL(https://d2k5ns\2zxldvw.cloudfront.net/images/avatars/default-avatar_7.png) follows the same approach.
We also may need to update getDefaultAvatarURL to use the optimistic ID generated by user's input email:
What alternative solutions did you explore? (Optional) |
@JmillsExpensify @jjcoffee 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! |
@JmillsExpensify, @jjcoffee Huh... This is 4 days overdue. Who can take care of this? |
@anyongjitiger Thanks for your proposal! If I understand correctly what you're proposing, wouldn't the avatar still change, just on refresh? We calculate the avatar from the hash of the account ID, so I'm not sure if there's much we can do here since we can't know the correct ID in advance! Lines 73 to 86 in f942acd
|
Hello @jjcoffee |
@anyongjitiger Ah yes I see what you mean! I see that the BE is returning a PNG of the same avatar after we come back online. The problem with using that URL directly is that we'd switch from using the SVG of the avatar to a PNG. |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@jjcoffee Looks like we're still open for proposals? |
@jjcoffee IMO it's imperceptible to the user whether it's a PNG or SVG. And if the user has customized their avatar, what is displayed here is not an SVG image either. |
@JmillsExpensify Yup! @anyongjitiger We're using SVGs for the default avatars on purpose, so I reckon it would be a regression to suddenly be using PNGs. |
@jjcoffee Lines 88 to 101 in 229cb5d
|
Still going through review |
Same |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.14-6 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 2023-12-28. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
|
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:
|
@JmillsExpensify, @anyongjitiger, @Julesssss, @jjcoffee Eep! 4 days overdue now. Issues have feelings too... |
1 similar comment
@JmillsExpensify, @anyongjitiger, @Julesssss, @jjcoffee Eep! 4 days overdue now. Issues have feelings too... |
Regression Test Proposal
Do we agree 👍 or 👎 |
Thanks for that, looks good! Payment summary as follows:
I will send each of you offers now per the comment above noting that manual offers should be sent. |
Actually, I just sent an offer to @jjcoffee. @anyongjitiger do you mind sharing your Upwork profile so I can send you an offer. Thanks! |
@JmillsExpensify Offer accepted, thanks! |
@JmillsExpensify |
@jjcoffee All paid out! @anyongjitiger Offer sent! 😄 |
Everyone is paid out. Thank you! |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
The avatar of the user should not change
Actual Result:
The avatar of the user changes once the device is online
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.75-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
2023-09-29.16-02-04.mp4
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @JmillsExpensifyThe text was updated successfully, but these errors were encountered: