Skip to content

[Due for payment 2025-11-06] [$250] Workspace chat - custom avatar is NOT displayed in the middle of the QR code #70175

Closed

Description

@jponikarchuk

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: 9.2.3-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: https://test-management.browserstack.com/projects/2219752/folder/13176686/test-cases/41236627
Email or phone of affected tester (no customers): n.a
Issue reported by: Applause Internal Team
Device used: Win11/Chrome
App Component: Workspace Settings

Action Performed:

  1. Open the link www.staging.new.expensify.com
  2. User logged in
  3. Create New Workspace and add Custom avatar
  4. Navigate to Workspace chat >> Click on Header >> Share (observe no custom avatar is displayed in the middle of the QR code)
  5. Navigate to Workspace >> Click More >> Share (observe custom avatar is displayed in the middle of the QR code)

Expected Result:

There should have custom avatar displayed in the middle of the QR code

Actual Result:

Step 4: no custom avatar is displayed in the middle of the QR code when user click Share via Workspace chat header.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021980629526614164322
  • Upwork Job ID: 1980629526614164322
  • Last Price Increase: 2025-10-21
  • Automatic offers:
    • abzokhattab | Contributor | 109211642
Issue OwnerCurrent Issue Owner: @sonialiap

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 9, 2025
  2. melvin-bot commented on Sep 9, 2025

    @melvin-bot

    Triggered auto assignment to @adelekennedy (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. abzokhattab commented on Sep 9, 2025

    @abzokhattab
    Contributor

    Proposal

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

    Workspace chat - custom avatar is NOT displayed in the middle of the QR code

    What is the root cause of that problem?

    • The ShareCodePage.tsx component was hardcoded to always use expensifyLogo for reports instead of checking for workspace avatars here
    • The existing getLogoForWorkspace function had the correct logic but wasn't being used in the QR code component
    • Two different share flows existed with inconsistent avatar handling:
      • Workspace settings share: correctly used workspace avatar via getLogoForWorkspace
      • Workspace chat header share: always used Expensify logo regardless of workspace avatar

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

    • Use the existing logo variable that already has the correct logic in ShareCodePage
    • Update logo ratio and margin ratio logic to use correct values based on avatar type:
      • Use CONST.QR.EXPENSIFY_LOGO_SIZE_RATIO only when showing Expensify logo
      • Use CONST.QR.DEFAULT_LOGO_SIZE_RATIO for workspace avatars and personal avatars

    so we need to update this to

    logo={logo}
    logoRatio={logo === expensifyLogo ? CONST.QR.EXPENSIFY_LOGO_SIZE_RATIO : CONST.QR.DEFAULT_LOGO_SIZE_RATIO}
    logoMarginRatio={logo === expensifyLogo ? CONST.QR.EXPENSIFY_LOGO_MARGIN_RATIO : CONST.QR.DEFAULT_LOGO_MARGIN_RATIO}

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    NA

    What alternative solutions did you explore? (Optional)

    NA

  4. nyomanjyotisa commented on Sep 9, 2025

    @nyomanjyotisa
    Member

    Proposal

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

    Workspace custom avatars are not displayed in QR codes when sharing from workspace chat headers, showing the default Expensify logo instead of the configured custom workspace avatar.

    What is the root cause of that problem?

    QR code component hardcodes expensifyLogo for reports instead of using the custom workspace avatar calculated by the getLogoForWorkspace function

    logo={isReport ? expensifyLogo : (getAvatarUrl(currentUserPersonalDetails?.avatar, currentUserPersonalDetails?.accountID) as ImageSourcePropType)}

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

    We should use the logo variable (which contains the custom workspace avatar) with a fallback to expensifyLogo

    logo={isReport ? (logo ?? expensifyLogo) : (getAvatarUrl(currentUserPersonalDetails?.avatar, currentUserPersonalDetails?.accountID) as ImageSourcePropType)}

    logo={isReport ? expensifyLogo : (getAvatarUrl(currentUserPersonalDetails?.avatar, currentUserPersonalDetails?.accountID) as ImageSourcePropType)}

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    None

    What alternative solutions did you explore? (Optional)

    None

  5. dmkt9 commented on Sep 9, 2025

    @dmkt9
    Contributor

    Proposal

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

    Step 4: no custom avatar is displayed in the middle of the QR code when user click Share via Workspace chat header.

    What is the root cause of that problem?

    In case of report, it will display expensifyLogo:

    logo={isReport ? expensifyLogo : (getAvatarUrl(currentUserPersonalDetails?.avatar, currentUserPersonalDetails?.accountID) as ImageSourcePropType)}

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

    Displayed by the value of logo:

    logo={isReport ? expensifyLogo : (getAvatarUrl(currentUserPersonalDetails?.avatar, currentUserPersonalDetails?.accountID) as ImageSourcePropType)}

    logo={logo}

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    NA

    What alternative solutions did you explore? (Optional)

    NA

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

    Image
  6. daledah commented on Sep 9, 2025

    @daledah
    Contributor

    Proposal

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

    Step 4: no custom avatar is displayed in the middle of the QR code when user click Share via Workspace chat header.

    What is the root cause of that problem?

    if the share code page is opened from the report we'll show the expensifyLogo

    logo={isReport ? expensifyLogo : (getAvatarUrl(currentUserPersonalDetails?.avatar, currentUserPersonalDetails?.accountID) as ImageSourcePropType)}

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

    We should show the workspace logo if the report has workspace type chat by using function isWorkspaceChat from the reportUtils.ts

    App/src/libs/ReportUtils.ts

    Lines 7042 to 7044 in 32cf88b

    function isWorkspaceChat(chatType: string) {
    return chatType === CONST.REPORT.CHAT_TYPE.POLICY_ADMINS || chatType === CONST.REPORT.CHAT_TYPE.POLICY_ANNOUNCE || chatType === CONST.REPORT.CHAT_TYPE.POLICY_EXPENSE_CHAT;
    }

        const isWorkspaceChat = isWorkspaceChatUtils(report?.chatType ?? ''); //  We can use a different function here depending on where we want to show the avatar.
    

    then create a function getLogo

        const getLogo = () => {
            if(isWorkspaceChat) {
                return logo;
            }
            return isReport ? expensifyLogo : (getAvatarUrl(currentUserPersonalDetails?.avatar, currentUserPersonalDetails?.accountID) as ImageSourcePropType);
        }
    

    After that use that function to pass as a logo, and we also need to change the ratio here

        logo={getLogo()}
        logoRatio={isReport && !isWorkspaceChat ? CONST.QR.EXPENSIFY_LOGO_SIZE_RATIO : CONST.QR.DEFAULT_LOGO_SIZE_RATIO}
        logoMarginRatio={isReport && !isWorkspaceChat ? CONST.QR.EXPENSIFY_LOGO_MARGIN_RATIO : CONST.QR.DEFAULT_LOGO_MARGIN_RATIO}
    

    logo={isReport ? expensifyLogo : (getAvatarUrl(currentUserPersonalDetails?.avatar, currentUserPersonalDetails?.accountID) as ImageSourcePropType)}
    logoRatio={isReport ? CONST.QR.EXPENSIFY_LOGO_SIZE_RATIO : CONST.QR.DEFAULT_LOGO_SIZE_RATIO}
    logoMarginRatio={isReport ? CONST.QR.EXPENSIFY_LOGO_MARGIN_RATIO : CONST.QR.DEFAULT_LOGO_MARGIN_RATIO}

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    None

    What alternative solutions did you explore? (Optional)

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  7. removed their assignment
    on Sep 12, 2025
  8. melvin-bot commented on Sep 15, 2025

    @melvin-bot

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

  9. melvin-bot commented on Sep 17, 2025

    @melvin-bot

    Eep! 4 days overdue now. Issues have feelings too...

  10. melvin-bot commented on Sep 19, 2025

    @melvin-bot

    6 days overdue. This is scarier than being forced to listen to Vogon poetry!

  11. 40 remaining items

  12. melvin-bot commented on Oct 30, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.40-1 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 2025-11-06. 🎊

    For reference, here are some details about the assignees on this issue:

  13. melvin-bot commented on Oct 30, 2025

    @melvin-bot

    @abzokhattab / @brunovjk @sonialiap The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  14. brunovjk commented on Nov 6, 2025

    @brunovjk
    Contributor

    BugZero Checklist:

    • [Contributor] 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: No PR directly introduced this bug; the logic (The ShareCodePage.tsx component was hardcoded to always use expensifyLogo for reports instead of checking for workspace avatars) has remained the same for a long time, at least since their migration.

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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:

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    • Regression test https://github.com/Expensify/Expensify/issues/566538

    Regression Test Proposal

    Test:

    1. User log in
    2. Create New Workspace and add Custom avatar
    3. Navigate to Workspace chat >> Click on Header >> Share
    4. Validate that the workspace custom avatar is displayed in the middle of the QR code

    Do we agree 👍 or 👎

  15. sonialiap commented on Nov 10, 2025

    @sonialiap
    Contributor

    Payment summary:
    @abzokhattab $250 paid in Upwprk
    @brunovjk $250 please request in NewDot

  16. brunovjk commented on Nov 12, 2025

    @brunovjk
    Contributor

    Requested in ND.

  17. JmillsExpensify commented on Nov 13, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @brunovjk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions