-
Notifications
You must be signed in to change notification settings - Fork 982
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
Fix schema error after logout #19933
Conversation
Jenkins Builds
|
88% of end-end tests have passed
Failed tests (5)Click to expandClass TestDeepLinksOneDevice:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestCommunityMultipleDeviceMerged:
Expected to fail tests (1)Click to expandClass TestCommunityOneDeviceMerged:
Passed tests (46)Click to expandClass TestActivityMultipleDevicePRTwo:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestCommunityMultipleDeviceMerged:
Class TestWalletMultipleDevice:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
Class TestActivityMultipleDevicePR:
Class TestWalletOneDevice:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestCommunityOneDeviceMerged:
|
Hi @ilmotta ! Thanks for your fix 🙌 |
Hi there @mariia-skrypnyk 😊 I wasn't sure about that, so thanks for letting me know. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! thank your for this 🙏
Hi @ilmotta ! Thanks for spending your time and effort on such an errors 🙏 |
fe65cb3
to
d32ad37
Compare
Summary
This PR fixes a schema error after logout.
Interesting explanation...
The schema failure is due to
utils.image-server/get-initials-avatar-uri
being called with a nil profile customization color right after the user confirms logout. My first instinct was to just wrap the schema field with a:maybe
schema and call it a day. But under the hood, the profile customization color really shouldn't be nil, so what is going on? Malli detected a potential issue.Right after logging out, the subscription
:profile/profile-with-image
is recomputed. I tried to find out what's causing that recomputation, but I timeboxed and gave up. One of its signal inputs is:profile/profile
. Right after logout, the output of sub:profile/profile
is always nil (this is correct, nobody is logged in). This means that the sub:profile/profile-with-image
will try to calculate the multiaccount URI by passing a nil profile. This is wasteful computation and is also the cause of the schema forutils.image-server/get-initials-avatar-uri
to fail, because it expects the profile'scustomization-color
to be present.Areas that may be impacted
Anything displaying a profile image.
Steps to test
I truly expect no impact in profile images in general because the subscription
:profile/profile
is only nil on logout, which is what this PR deals with. In any case, I smoke tested the app, changed profile images, etc, all good.I'll request manual QA after PR approval.
status: ready