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

Workspace - Custom avatar uploaded offline is inconsistent after deleting workspace #35177

Closed
6 tasks done
kbecciv opened this issue Jan 25, 2024 · 12 comments
Closed
6 tasks done
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering

Comments

@kbecciv
Copy link

kbecciv commented Jan 25, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: v1.4.32-2
Reproducible in staging?: y
Reproducible in production?: n
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
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Issue found when executing PR #32986

Action Performed:

Precondition: There is no workspace.

  1. Go offline.
  2. Create a new workspace.
  3. Upload a custom avatar for the workspace.
  4. Delete the workspace.
  5. Go to the archived workspace chat or room like #admin.
  6. Click room header.
  7. Click on the avatar.
  8. Go online.

Expected Result:

n Step 7, the default avatar should be the same in full screen view.
In Step 8. after going online, the default avatar should remain.

Actual Result:

n Step 7, the default avatar is different in the full screen view (different background color).
In Step 8. after going online, the avatar reverts to custom avatar that is uploaded offline.

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

Bug6355012_1706208611278.20240126_024445.mp4

View all open jobs on GitHub

@kbecciv kbecciv added the DeployBlockerCash This issue or pull request should block deployment label Jan 25, 2024
Copy link

melvin-bot bot commented Jan 25, 2024

Triggered auto assignment to @rlinoz (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ 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.

@kbecciv
Copy link
Author

kbecciv commented Jan 25, 2024

We think that this bug might be related to #vip-vsb
CC @quinthar

@rlinoz
Copy link
Contributor

rlinoz commented Jan 25, 2024

This is an edge case and not blocking the users, so I am demoting this one.

@rlinoz rlinoz removed the DeployBlockerCash This issue or pull request should block deployment label Jan 25, 2024
@rlinoz rlinoz added Daily KSv2 and removed Hourly KSv2 labels Jan 25, 2024
@getusha
Copy link
Contributor

getusha commented Jan 26, 2024

Raised this in the PR #32986 (comment)
Decided to go with creating another issue for it @madmax330 @FitseTLT

@FitseTLT
Copy link
Contributor

Proposal

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

Custom avatar uploaded offline is inconsistent after deleting workspace

What is the root cause of that problem?

This a BE issue where if the workspace is all created, update avatar and delete workspace offline and it sets the avatar to the non-default avatar set by the user. I think the reason might be related to the order of the requests of the Updating of the Avatar and Deletion of the workspace.

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

This should be fixed in BE but there is a simple fix in FE we can follow, which is to check if it is an archived workspace before returning the workspace avatar here

App/src/libs/ReportUtils.ts

Lines 1450 to 1453 in 83a7535

const policyExpenseChatAvatarSource = allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${report?.policyID}`]?.avatar
? allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${report?.policyID}`]?.avatar
: getDefaultWorkspaceAvatar(workspaceName);

 const policyExpenseChatAvatarSource =
        allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${report?.policyID}`]?.avatar && !isArchivedRoom(report)
            ? allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${report?.policyID}`]?.avatar
            : getDefaultWorkspaceAvatar(workspaceName);

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Overdue label Jan 29, 2024
Copy link

melvin-bot bot commented Jan 29, 2024

@rlinoz Whoops! This issue is 2 days overdue. Let's get this updated quick!

@rlinoz
Copy link
Contributor

rlinoz commented Jan 29, 2024

I will try to find a wave/vip to put this into, but I checked and we are not blocking policy changes if the policy is deleted, so we might want to start doing that.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jan 29, 2024
@rlinoz
Copy link
Contributor

rlinoz commented Feb 1, 2024

bumped this in #vip-vsb today.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Feb 1, 2024
@rlinoz rlinoz added the Bug Something is broken. Auto assigns a BugZero manager. label Feb 5, 2024
Copy link

melvin-bot bot commented Feb 5, 2024

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

@melvin-bot melvin-bot bot removed the Overdue label Feb 5, 2024
@rlinoz
Copy link
Contributor

rlinoz commented Feb 5, 2024

Hey @miljakljajic do you think we have a wave for this or maybe we should close this?

@melvin-bot melvin-bot bot added the Overdue label Feb 7, 2024
@miljakljajic
Copy link
Contributor

I think we can close - feels more like polish to me. Thank you @rlinoz!

@melvin-bot melvin-bot bot removed the Overdue label Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering
Projects
None yet
Development

No branches or pull requests

5 participants