Skip to content

Rules - Tooltip does not appear when hovered over All cards default rule #96197

Closed

Description

@applause-bot

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.4.34-11
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: #95885
Email or phone of affected tester (no customers): applausetester+ssndjois2jd1@applause.expensifail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Workspace Settings

Action Performed:

Precondition:

  • Log in with Expensifail account.
  • Workspace has at least one Expensify Card.
  • Enable Rules.
  1. Go to staging.new.expensify.com
  2. Go to workspace settings > Rules.
  3. Go to Card restrictions.
  4. Hover over All cards rule (make sure it has ellipsis).

Expected Result:

Tooltip will appear when hovered over All cards default rule (tooltip appears when hovered over custom card rule).

Actual Result:

Tooltip does not appear when hovered over All cards default rule.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7209082_1784127923843.11.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7209082

Activity

  1. added
    DeployBlockerCash
    Bug
    on Jul 15, 2026
  2. applause-bot commented on Jul 15, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/e1b8ccac1ede8e3798652c420d55664e68e4f71b8186771346e315e9b92ed16c

  3. melvin-bot commented on Jul 15, 2026

    @melvin-bot

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

  4. melvin-bot commented on Jul 15, 2026

    @melvin-bot

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

  5. github-actions commented on Jul 15, 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. added
    Daily
    and removed
    DeployBlockerCash
    Hourly
    on Jul 15, 2026
  7. JS00001 commented on Jul 15, 2026

    @JS00001
    Contributor

    behind a beta

  8. MelvinBot commented on Jul 15, 2026

    @MelvinBot
    Contributor

    Issue Analysis

    Root Cause (medium confidence): The default "All cards" row and the custom-rule rows use the exact same tooltip code, so there is no code-level difference in how their tooltips render. The tooltip is gated on the text actually overflowing its column — TextWithTooltip only sets showTooltip when scrollWidth > offsetWidth. The default row's copy doesn't actually overflow: its card label is the short 'All cards' and its rule summary is a hardcoded string that already ends in a literal ... — defaultRuleSummary: 'Categories including adult services, ATMs, gambling, and...'. So it looks truncated (because of the literal ...) but the DOM text isn't clipped, the overflow check returns false, and no tooltip appears. Custom rules carry real, longer data that genuinely overflows, so their tooltips fire.

    One quick check needed to finalize the fix — narrow the window until the default row's text is genuinely clipped by CSS (not just the literal ...) and hover:

    • Tooltip appears → the report is purely the literal-... copy looking truncated. Fix is a copy change (see below), or close as expected.
    • Tooltip still does not appear → there's a real measurement bug in TextWithTooltip for this row (stale onLayout measurement), and the fix moves there instead.

    Recommended Fix: Assuming the copy artifact is confirmed, drop the hardcoded ... from defaultRuleSummary (and its translations in es, fr, de, etc.) so the string no longer masquerades as truncated. If product wants a tooltip to reveal the full category list on the default row, the summary needs real full text to reveal — the current and... copy has nothing more to show.

    Investigation details & ruled-out hypotheses
    • Introduced by: #95885, which added TextWithTooltip (truncation-gated tooltips) to the workspace tables including WorkspaceSpendRulesTableRow.
    • Default vs. custom row is identical code. Both branches render <TextWithTooltip shouldShowTooltip numberOfLines={1} .../> for cardSummary and ruleSummary. The only per-row data difference is set in RulesCardRestrictionsTab, where the default rule gets the fixed 'All cards' / defaultRuleDescription copy.
    • Ruled out — "disabled row blocks hover": the default row is the only one with disabled: true, which makes react-native-web apply pointerEvents: 'box-none' to the row Pressable. I verified RNW compiles box-none so the element is pointer-events: none but its children get pointer-events: auto — so hover still reaches the nested tooltip. This is not the cause.

    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/96197) to create a draft PR.
    To refine: @MelvinBot <your feedback> (e.g. after running the quick check above).
    To reject: Explain why you are rejecting this analysis.

  9. added
    Reviewing
    Weekly
    and removed
    Daily
    on Jul 15, 2026
  10. MelvinBot commented on Jul 15, 2026

    @MelvinBot
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug (fix, if any, is in Expensify/App)
    Causing PR: #95885 - "Add truncated-text tooltips to remaining workspace table rows." by @Krishna2323 (High confidence)
    Related Issues: N/A

    Recommendation: DEMOTE (already actioned — no deploy-blocker action required)

    The DeployBlockerCash label was already removed by @JS00001 (internal engineer) with the note "behind a beta", so the App deploy is no longer blocked. This is not a regression: it is a data/copy artifact, and demotion is the correct outcome. No label change is needed from me — an internal employee has already handled it, and per triage rules I will not re-add or alter it.

    Assigned: No change. @Krishna2323 was already auto-assigned as the author of the causing PR; that is appropriate for the follow-up copy fix.
    Labels: No changes made. DeployBlockerCash was already removed by an internal engineer (@JS00001) before this investigation.

    📋 Detailed Analysis

    Evidence

    • PR Add truncated-text tooltips to remaining workspace table rows. #95885 is in the current StagingDeployCash (#96044, line item 34, checked off).
    • The PR diff shows it did not introduce TextWithTooltip to this row — that component was already there rendering plain text. The PR only added the shouldShowTooltip prop to the existing cardSummary and ruleSummary cells in WorkspaceSpendRulesTableRow.tsx, turning tooltips ON. So before Add truncated-text tooltips to remaining workspace table rows. #95885 no row showed a tooltip; after it, tooltips are gated on real text overflow. This is the code that produces the reported behavior — High confidence it is the causing PR.
    • Reproducible on staging only; N/A on production because the feature is new and beta-gated. That, plus @JS00001's "behind a beta" note, is why it was demoted off the blocker list.

    Verification (SHA cc39972)

    • Tooltip gating: TextWithTooltip/index.tsx#L23-L34 — the tooltip only renders when the DOM text actually overflows (scrollWidth > offsetWidth || scrollHeight > offsetHeight), measured in onLayout.
    • Default vs. custom rows render identical tooltip code — there is no per-row branch that disables the tooltip: WorkspaceSpendRulesTableRow.tsx#L105-L164. Both cardSummary and ruleSummary cells get shouldShowTooltip.
    • The only difference is the data fed to the default row: RulesCardRestrictionsTab.tsx#L64-L73 sets cardSummary = 'All cards' (defaultRuleDescription) and ruleSummary = defaultRuleSummary.
    • The default ruleSummary copy: en.ts#L7860-L7863 — defaultRuleSummary: 'Categories including adult services, ATMs, gambling, and...'. Note the trailing ... is a literal part of the string, not CSS truncation.

    Root Cause

    The default row's copy is short ('All cards') and its rule summary is a pre-abbreviated literal that already ends in a literal .... At normal column widths the DOM text does not actually overflow, so scrollWidth > offsetWidth is false and no tooltip renders — even though the literal ... makes it look truncated. Custom rules carry genuinely long, joined summary text (rule.summaryParts.map(...).join(', ')) that really overflows, so their tooltips fire. This is expected behavior of the truncation-gated tooltip meeting a copy artifact, not a rendering/measurement bug.

    I confirmed the prior "disabled row blocks hover" theory is not the cause: disabled only affects the ArrowRight opacity and press handling; the tooltip cells are outside any pointer-events-disabling wrapper, and identical code runs for both row types.

    Resolution options

    • REVERT Add truncated-text tooltips to remaining workspace table rows. #95885: Not warranted. The PR works as designed for every other workspace table and for custom card rules; reverting would remove wanted tooltips everywhere to fix one cosmetic edge case.
    • Quick fix (recommended follow-up, non-blocking): This is a copy issue. Either (a) drop the literal and... from defaultRuleSummary (and its es/fr/de/etc. translations) so it no longer masquerades as truncated, or (b) if product wants the default row to reveal the full category list on hover, give it real full text to show — the current and... has nothing more to reveal. A code change to TextWithTooltip is not needed.
    • DEMOTE: Already done by @JS00001 (beta-gated, cosmetic, no data/auth/payment impact). Correct call.
  11. JS00001 commented on Jul 23, 2026

    @JS00001
    Contributor

    this is fixed

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

Metadata

Metadata

Assignees

Labels

BugEngineeringReviewingWeekly

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions