Skip to content

Reports - Has row tooltip does not dismiss after selecting Receipt #84170

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.31-0
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #82982
Email or phone of affected tester (no customers): josidjnosidjoidjiosj@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. Go to Reports > Expenses.
  3. Click Filters.
  4. Click Has.
  5. Click on the Receipt row.
  6. Click Save.
  7. Click Has.

Expected Result:

Tooltip will dismiss after selecting Receipt filter (same way tooltip is dismissed after clicking 3-dot menu on saved search).

Actual Result:

Tooltip does not dismiss after selecting Receipt filter.

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

Activity

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

    @melvin-bot

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

  3. melvin-bot commented on Mar 4, 2026

    @melvin-bot

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

  4. melvin-bot commented on Mar 4, 2026

    @melvin-bot

    Triggered auto assignment to @laurenreidexpensify (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 4, 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 4, 2026

    @OSBotify
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: #82982 - "fix: add a tooltip to train users" by @daledah (High confidence)
    Related Issues: None

    Recommendation: REVERT

    PR #82982 added a product training tooltip to the Has filter page to educate users about the -has:receipt negation syntax. However, the tooltip does not automatically dismiss when users interact with the filter options (e.g., clicking on "Receipt"). The tooltip only dismisses when the user explicitly clicks the close button or navigates away from the page, creating a poor user experience.

    Labels: Keeping DeployBlockerCash (frontend bug blocks App deploy). No DeployBlocker label present to remove.

    📋 Detailed Analysis

    Evidence

    Verification

    PR #82982 modified src/pages/Search/SearchAdvancedFiltersPage/SearchFiltersHasPage.tsx to:

    • Add useProductTrainingContext hook to get tooltip rendering functions
    • Wrap the HeaderWithBackButton with EducationalTooltip component
    • Display the tooltip when the page loads and user has not dismissed it before

    The PR introduced these changes:

    const {renderProductTrainingTooltip, shouldShowProductTrainingTooltip} = useProductTrainingContext(CONST.PRODUCT_TRAINING_TOOLTIP_NAMES.HAS_FILTER_NEGATION);

    And wrapped the header:

    <EducationalTooltip
        shouldRender={shouldShowProductTrainingTooltip && currentType === CONST.SEARCH.DATA_TYPES.EXPENSE}
        renderTooltipContent={renderProductTrainingTooltip}
        ...
    >

    Root Cause

    The useProductTrainingContext hook returns three values:

    1. renderProductTrainingTooltip - renders the tooltip UI
    2. hideProductTrainingTooltip - function to dismiss the tooltip
    3. shouldShowProductTrainingTooltip - boolean to control visibility

    While the implementation correctly uses renderProductTrainingTooltip and shouldShowProductTrainingTooltip, it never calls hideProductTrainingTooltip when the user interacts with the SelectionList items.

    The tooltip should be automatically dismissed when users click on filter options (via the onSelectRow callback in the SelectionList), similar to how tooltips are dismissed on other pages when users complete the relevant action. Currently, the updateSelectedItems callback only updates state but doesn't hide the tooltip:

    const updateSelectedItems = useCallback(
        (listItem: ListItem) => {
            // Updates selection state but doesn't call hideProductTrainingTooltip()
            ...
        },
        [items, selectedItems],
    );

    This creates a confusing UX where the tooltip continues to overlay the interface even after the user has engaged with the feature the tooltip is teaching them about.

  7. MelvinBot commented on Mar 4, 2026

    @MelvinBot
    Contributor

    Proposal

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

    On the Search > Reports > Expenses > Filters > Has page, the educational tooltip (added by PR #82982) does not dismiss when the user selects a filter option (e.g., Receipt). The tooltip persists on screen until the user manually closes it via the (X) button or navigates away.

    What is the root cause of that problem?

    In SearchFiltersHasPage.tsx:29, the component destructures useProductTrainingContext but only takes renderProductTrainingTooltip and shouldShowProductTrainingTooltip — it omits hideProductTrainingTooltip:

    const {renderProductTrainingTooltip, shouldShowProductTrainingTooltip} = useProductTrainingContext(CONST.PRODUCT_TRAINING_TOOLTIP_NAMES.HAS_FILTER_NEGATION);

    The updateSelectedItems callback (lines 47-61) that fires when a user selects any filter row never calls hideProductTrainingTooltip(). This contrasts with other components that correctly dismiss their tooltips on user interaction:

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

    In src/pages/Search/SearchAdvancedFiltersPage/SearchFiltersHasPage.tsx:

    1. Destructure hideProductTrainingTooltip from the existing useProductTrainingContext call on line 29
    2. Call hideProductTrainingTooltip() inside the updateSelectedItems callback, so the tooltip dismisses when the user selects any filter option

    This follows the established pattern used across the codebase (AccountSwitcher, OptionRowLHN, ThreeDotsMenu).

    What alternative solutions did you explore? (Optional)

    An alternative would be to add an onSelectRow wrapper that handles both the tooltip dismissal and the existing updateSelectedItems logic separately, but that adds unnecessary indirection. Calling hideProductTrainingTooltip() directly inside updateSelectedItems is simpler and consistent with how other components handle this.


    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, or @MelvinBot <your feedback> to refine this analysis.

  8. 1 remaining item

  9. MelvinBot commented on Mar 4, 2026

    @MelvinBot
    Contributor

    🤖 Draft PR created: #84171
    Please mark it as "Ready for review" when it is ready for review.

  10. puneetlath commented on Mar 4, 2026

    @puneetlath
    Contributor

    I don't think this needs to be a blocker.

    @trjExpensify how do you think this should work? Right now it looks like it only dismisses if you click the "x". Do you think it should also dismiss if you click any checkbox on the page?

    Image
  11. trjExpensify commented on Mar 4, 2026

    @trjExpensify
    Contributor

    Yeah, I think you've taken an action on the page at that point and so it should be dismissed.

  12. mkhutornyi commented on Mar 4, 2026

    @mkhutornyi
    Contributor

    Yeah, I think you've taken an action on the page at that point and so it should be dismissed.

    Any action or only Receipt toggle action?

  13. trjExpensify commented on Mar 4, 2026

    @trjExpensify
    Contributor

    Any in the menu, I'd say.

  14. puneetlath commented on Mar 4, 2026

    @puneetlath
    Contributor

    That makes sense to me too.

  15. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Mar 5, 2026
  16. melvin-bot commented on Mar 12, 2026

    @melvin-bot

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

  17. puneetlath commented on Mar 13, 2026

    @puneetlath
    Contributor

    @mkhutornyi I believe this is live on production right. Is there anything left to do here or can we just close this?

  18. mkhutornyi commented on Mar 13, 2026

    @mkhutornyi
    Contributor

    We can close this

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

Metadata

Metadata

Labels

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

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions