Skip to content

[Due for payment 2026-03-16] Workflows - Badge outline is not visible when user is selected #84358

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.3.32-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #82210
Email or phone of affected tester (no customers): sjodijsoijosjoidsji@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.2 / Chrome
App Component: Workspace Settings

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace settings > Workflows.
  3. Click on the default workflow.
  4. Click Approver > Approver.

Expected Result:

Badge outline should be visible when user is selected.

Actual Result:

Badge outline blends with the selection highlight and becomes not visible when user is selected.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @heyjennahay

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Mar 6, 2026
  2. melvin-bot commented on Mar 6, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #82210

  3. melvin-bot commented on Mar 6, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  4. melvin-bot commented on Mar 6, 2026

    @melvin-bot

    Triggered auto assignment to @heyjennahay (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.

  5. github-actions commented on Mar 6, 2026

    @github-actions
    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.
  6. OSBotify commented on Mar 6, 2026

    @OSBotify
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: #82210 - "Update badge styles" by @abzokhattab (High confidence)
    Related Issues: None

    Recommendation: REVERT

    PR #82210 introduced a visual regression where the badge outline blends with the selection highlight, making it invisible when a user is selected. This affects user experience in the Workflows > Approver selection screen.

    Labels: Keeping DeployBlockerCash (this is a Frontend bug affecting the App), no label changes needed.

    📋 Detailed Analysis

    Evidence

    PR #82210 updated badge styles and introduced new badge theme colors. The issue manifests specifically when:

    1. User navigates to Workspace Settings > Workflows > Default workflow > Approver
    2. Selects a user from the list
    3. The badge (showing "Owner", "Admin", or "Auditor" role) outline becomes invisible against the selection highlight

    Verification

    Affected files:

    • src/styles/theme/themes/light.ts - Introduced badgeDefaultBG: colors.productLight400
    • src/components/Badge.tsx - Modified badge styling logic with new isStrong prop
    • src/styles/index.ts - Added new badge style definitions

    The root cause:
    In src/styles/theme/themes/light.ts, PR #82210 set:

    • badgeDefaultBG: colors.productLight400 (default badge background)
    • activeComponentBG: colors.productLight400 (selected row background)

    Both use the same color value, causing the badge border (which uses borderColor: theme.badgeDefaultBG) to have the same color as the selected row background.

    The badge is rendered via:

    1. WorkspaceWorkflowsApprovalsApproverPage.tsx renders approvers with MemberRightIcon in rightElement
    2. MemberRightIcon.tsx renders a Badge component for Owner/Admin/Auditor roles
    3. When the row is selected, InviteMemberListItem applies sidebarLinkActive background color
    4. The badge outline becomes invisible due to the color match

    Root Cause

    The Badge component in PR #82210 was updated with new theme colors, but the default badge background color (badgeDefaultBG) was set to the same value as the active/selected component background (activeComponentBG), both using colors.productLight400. This creates a visual accessibility issue where badges with borders are not distinguishable when rendered on selected list items.

    Timeline verification:

    • PR Update badge styles #82210 merged: 2026-03-04
    • Issue reported: 2026-03-06
    • Reproducible on staging: Yes (PR is in staging deploy 9.3.32-0)
    • Reproducible on production: No (PR not yet in production)
  7. MelvinBot commented on Mar 6, 2026

    @MelvinBot
    Contributor

    Proposal

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

    When selecting an approver in Workspace Settings > Workflows > Approver, the default Badge (e.g. "Admin", "Owner") becomes invisible on the selected/focused row because the badge's background and border color are identical to the row's selection highlight color.

    What is the root cause of that problem?

    PR #82210 ("Update badge styles") changed the default Badge from an outlined style (transparent background with a visible border) to a filled style where both backgroundColor and borderColor are set to theme.badgeDefaultBG.

    In both light and dark themes, badgeDefaultBG maps to the exact same color value as activeComponentBG (the selection highlight color):

    Theme activeComponentBG badgeDefaultBG Color
    Light colors.productLight400 colors.productLight400 #E6E1DA
    Dark colors.productDark400 colors.productDark400 #1A3D32

    The rendering chain is:

    1. WorkspaceWorkflowsApprovalsApproverPage (:89-103) builds each approver item with isSelected: true and rightElement: <MemberRightIcon>.
    2. MemberRightIcon (:28-32) renders a <Badge> with no success/error props, so it uses styles.defaultBadge.
    3. BaseListItem (:132-137) applies {backgroundColor: theme.activeComponentBG} to the selected row.
    4. Badge applies {backgroundColor: theme.badgeDefaultBG, borderColor: theme.badgeDefaultBG} — the same color as the row, making it invisible.

    PR #82210 did add a badgeDefaultActive style (using theme.buttonHoveredBG) for badges rendered within MenuItem when focused. However, the approver list renders badges via rightElement in InviteMemberListItem, which bypasses MenuItem entirely, so the active-state override never applies.

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

    The fix should pass the isFocused/isSelected state down to the Badge so it can switch to the badgeDefaultActive style when rendered on a highlighted row, similar to what MenuItem already does.

    Specifically, in InviteMemberListItem (or BaseListItem), when rendering item.rightElement, the focused/selected state should be propagated so that the Badge can apply styles.badgeDefaultActive (backgroundColor: theme.buttonHoveredBG) when the parent row is highlighted. This could be done by:

    1. Wrapping rightElement in a context or passing isFocused/isSelected to it via cloneElement or a render-prop pattern, OR
    2. Updating MemberRightIcon to accept an isHighlighted prop and conditionally apply styles.badgeDefaultActive as badgeStyles.

    The second approach is simpler and more targeted — MemberRightIcon already accepts a badgeStyles prop, so the parent list item component can pass the appropriate active style when the row is selected.

    What alternative solutions did you explore? (Optional)

    • Change badgeDefaultBG to a different color — This would fix the collision but would change the badge appearance globally across the app, potentially causing other visual regressions.
    • Always render a distinct border color on the default badge — Possible, but doesn't match the design intent of PR Update badge styles #82210 which deliberately made the badge filled.

    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.

  8. 1 remaining item

  9. puneetlath commented on Mar 6, 2026

    @puneetlath
    Contributor

    Fix CPd.

  10. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Mar 9, 2026
  11. changed the title [-]Workflows - Badge outline is not visible when user is selected[/-] [+][Due for payment 2026-03-16] Workflows - Badge outline is not visible when user is selected[/+] on Mar 9, 2026
  12. melvin-bot commented on Mar 9, 2026

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  13. melvin-bot commented on Mar 9, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.33-5 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 2026-03-16. 🎊

  14. melvin-bot commented on Mar 9, 2026

    @melvin-bot

    @puneetlath @heyjennahay 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]

  15. melvin-bot commented on Mar 9, 2026

    @melvin-bot

    Triggered auto assignment to @joekaufmanexpensify (Awaiting Payment)

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.EngineeringWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions