Skip to content

Search - Highlight is cut off #86535

Closed
Closed

Description

@lanitochka17

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.50-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: #84653
Email or phone of affected tester (no customers): soidjosjdosijoijs@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.2 / Chrome
App Component: Search

Action Performed:

  1. Go to staging.new.expensify.com
  2. Click search button.
  3. Type anything.

Expected Result:

Highlight on the selection will look the same as production.

Actual Result:

Highlight on the selection appears cut off.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7114893_1774615437320.4.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @zfurtak

Activity

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

    @melvin-bot

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

  3. melvin-bot commented on Mar 27, 2026

    @melvin-bot

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

  4. github-actions commented on Mar 27, 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.
  5. lanitochka17 commented on Mar 27, 2026

    @lanitochka17
    Author

    Production:

    Recording.5206.mp4
  6. OSBotify commented on Mar 27, 2026

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: PR 83799 - "Enhance icons UI consistency" by zfurtak (High confidence)
    Related Issues: None

    Recommendation: REVERT

    PR 83799 changed the default value of shouldHighlightSelectedItem from true to false in BaseListItem.tsx. Since SearchAutocompleteList does not explicitly pass this prop to SelectionListWithSections, it now inherits the new default value of false, causing the highlight/selection styling to not render properly.

    Labels: Keeping DeployBlockerCash (App deploy blocked - fix requires App PR revert or fix)

    Detailed Analysis

    Evidence
    PR 83799 made widespread changes to selection list components as part of enhancing icon consistency. The PR description states it aims to "remove active state, so chosen element is not hovered anymore."

    Key changes in BaseListItem.tsx:

    • Changed shouldHighlightSelectedItem default from = true to = false
    • Changed shouldUseDefaultRightHandSideCheckmark default from = true to = false

    SearchAutocompleteList.tsx was modified in this PR but does not explicitly pass the shouldHighlightSelectedItem prop when rendering SelectionListWithSections.

    Verification
    Confirmed that:

    1. PR 83799 modified src/components/Search/SearchAutocompleteList.tsx
    2. PR 83799 changed default behavior for shouldHighlightSelectedItem in BaseListItem.tsx
    3. SearchAutocompleteList does not explicitly set shouldHighlightSelectedItem prop, relying on the default
    4. The PR merged on 2026-03-27 at 11:17:04, placing it in the staging deploy window
    5. Issue is reproducible on staging but not production, confirming it was introduced in this deploy

    Root Cause
    When shouldHighlightSelectedItem is false, the selection highlight styling is not applied to list items properly, causing the cut off appearance reported in the issue.

  7. MelvinBot commented on Mar 27, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    The cut-off highlight is not caused by PR #84653, but by PR #83799 ("Enhance icons UI consistency"), which shipped in the same staging deploy.

    PR #83799 made two changes that combine to break the focus highlight in the search autocomplete list:

    1. Changed the default of shouldHighlightSelectedItem from true to false in BaseListItem.tsx (line ~85).

    2. Removed the explicit shouldHighlightSelectedItem prop from BaseSelectionListWithSections.tsx (line ~358), which previously hardcoded it to true.

    In BaseListItem, there are two layers that can receive focus background color:

    • Outer PressableWithFeedback — has borderRadius: 8 and paddingHorizontal: 12 (set by SearchAutocompleteList). Its highlight is gated by isFocused && shouldHighlightSelectedItem && getItemBackgroundColorStyle(...).
    • Inner View — narrower (inset by the pressable's padding) and has no border radius. Its highlight changed from being fully gated by shouldHighlightSelectedItem to only using it for the isSelected parameter: isFocused && getItemBackgroundColorStyle(shouldHighlightSelectedItem && isSelected, isFocused, ...).

    Before PR #83799: shouldHighlightSelectedItem was true, so the outer pressable got the focus background — a full-width, rounded highlight.

    After PR #83799: shouldHighlightSelectedItem defaults to false, so the outer pressable gets no background. Only the narrower inner View gets the focus highlight — resulting in a rectangular highlight that doesn't extend to the row edges, appearing "cut off" by ~12px on each side with no rounded corners.

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

    Re-add shouldHighlightSelectedItem to the ListItemRenderer call inside BaseSelectionListWithSections.tsx (around line 358), restoring the explicit pass-through so the search autocomplete list items receive the full-width rounded focus highlight:

    shouldHighlightSelectedItem={shouldHighlightSelectedItem}
    

    This ensures BaseSelectionListWithSections consumers that pass shouldHighlightSelectedItem={true} (or want the previous default behavior) can opt in, while the new default behavior from PR #83799 remains intact for other list types.

    Alternatively, the SearchAutocompleteList could explicitly pass shouldHighlightSelectedItem={true} to SelectionListWithSections.

    What alternative solutions did you explore? (Optional)

    1. Change the pressable-level highlight logic to always apply for focused (non-selected) items regardless of shouldHighlightSelectedItem — this would fix the issue but could affect other lists that intentionally don't want the pressable-level highlight.
    2. Revert PR Enhance icons UI consistency #83799 — too broad, as the PR made many intentional UI consistency improvements across the app.

    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. assigned and unassigned on Mar 27, 2026
  9. m-natarajan commented on Mar 27, 2026

    @m-natarajan

    Not repro v9.3.50-2 web chrome

    Screen.Recording.2026-03-28.at.01.48.13.mp4
  10. melvin-bot commented on Mar 30, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

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

Metadata

Metadata

Assignees

Labels

BugSomething is broken. Auto assigns a BugZero manager.EngineeringHourlyKSv2ReviewingHas a PR in review

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions