Skip to content

[Due for payment 2026-08-07] [$250] Web - Inbox - Inbox filters overlap with each other when filter word is long #93975

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.15-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #92146
Email or phone of affected tester (no customers): sdjnoisdjdosijsonssjo@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Left Hand Navigation (LHN)

Action Performed:

Precondition:

  • App language is Polski.
  1. Go to staging.new.expensify.com
  2. Go to Inbox.

Expected Result:

Inbox filters will not overlap with each other when filter word is long.

Actual Result:

Inbox filters overlap with each other when filter word is long.
The selection pill does not cover the entire word when selected.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7184904_1781809551460.6.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Svetlana Lazutkina
Bug ID: 7184904

Upwork Automation - Do Not Edit
Issue OwnerCurrent Issue Owner: @ahmedGaber93

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jun 18, 2026
  2. applause-bot commented on Jun 18, 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/b6fddfbab96cf53dbd75629246f937ac43a77120bfd9156e16a0f0c0f1bf1364

  3. MelvinBot commented on Jun 18, 2026

    @MelvinBot
    Contributor

    Proposal

    Root Cause: The Inbox tab labels overflow their slots in long-word locales (e.g. Polish "Zadania do wykonania") because the tab label container never shrinks, so numberOfLines={1} truncation never kicks in.

    What is the root cause of that problem?

    The Inbox filter row renders via InboxTabSelector with equalWidth, so each of the 3 tabs is given flex: 1 — exactly ⅓ of the (narrow) LHN width — via TabSelectorItem.tsx:62.

    Inside each button, the label is wrapped in a View that only sets maxWidth and has no flexShrink (TabLabel.tsx:29):

    <View style={{maxWidth: variables.tabSelectorMaxTabLabelWidth}}>

    In React Native / Yoga, the default flexShrink is 0 (unlike web CSS, where it is 1). So in a long-word locale the label View keeps its full intrinsic content width instead of shrinking to the button's ⅓ slot. Because the View never shrinks, the numberOfLines={1} Text never gets a bounded width to truncate against, and the text spills past the button boundary.

    This explains both reported symptoms:

    • Filters overlap — the long label overflows its ⅓ slot and runs into the neighboring tab.
    • Selection pill doesn't cover the whole word — the pill is the button background (sized to the ⅓ slot), but the text extends beyond it.

    In English the labels ("All", "Unread", "To-dos") are short enough to fit ⅓ of the width, which is why the bug is locale-dependent. Polish labels are much longer (pl.ts:2941 — todo: 'Zadania do wykonania', unread: 'Nieprzeczytane').

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

    Let the label container shrink within its tab so the existing numberOfLines={1} truncation can take effect:

    • On the label wrapper View in TabLabel.tsx:29, add flexShrink: 1 (and minWidth: 0 for the web/flexbox min-content case) alongside the existing maxWidth. With a bounded width, the label truncates with an ellipsis instead of overflowing.

    Because TabLabel is shared by other selectors (e.g. navigation TabSelector, SplitExpensePage), confirm the change is visually fine there too — those rows aren't equalWidth-constrained, so allowing shrink should be a no-op when there's enough room. If any regression appears, scope the shrink to the equalWidth path instead.

    What alternative solutions did you explore? (Optional)

    • Shortening the Polish copy. This only papers over the layout bug and would recur for any long translation/label.
    • Wrapping labels to 2 lines — rejected; tabs are a fixed-height single-line row (tabSelectorButtonHeight: 40).
    Investigation details & evidence
    • Feature introduced by PR Expensify/App#92146 ("Inbox filters").
    • equalWidth → flex: 1 per tab: flex.ts:17, applied at TabSelectorItem.tsx:62.
    • Button is a centered row with paddingHorizontal and the label/badge children: tabSelectorButton style.
    • Label container has only maxWidth: 256, no shrink: TabLabel.tsx:29; tabSelectorMaxTabLabelWidth = 256 (variables.ts:217).
    • Confidence: Medium-High. Root cause is established from code (RN default flexShrink: 0 + unbounded label width defeating numberOfLines={1}), and matches both symptoms and the locale-specific reproduction. Not verified with a live render in Polish.

    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/93975) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.

  4. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jun 18, 2026
  5. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jun 18, 2026
  6. MobileMage commented on Jun 18, 2026

    @MobileMage
    Contributor

    Proposal

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

    The Inbox filter tabs (All / Unread / To-dos), added in PR #92146, are laid out with equal width. When a tab's translated label is long — as in Polish, where "To-dos" becomes "Zadania do wykonania" and "Unread" becomes "Nieprzeczytane" — the visible pill of one tab overflows its slot and overlaps the neighboring tab, and the selected-state background no longer covers the full label.

    What is the root cause of that problem?

    The Inbox tabs render through InboxTabSelector → TabSelectorBase → TabSelectorItem with the equalWidth prop set. In TabSelectorItem, the layout is split across two views: the outer wrapper (the OpacityView inside PressableWithFeedback) receives wrapperStyle, and the inner pressable (the visible pill that carries the selection background) receives style. In equal-width mode only the wrapper gets flex: 1, while the inner pill keeps its intrinsic content size:

    style={[styles.tabSelectorButton, styles.tabBackground(...), ...]}
    wrapperStyle={equalWidth ? styles.flex1 : styles.flexGrow1}

    style={[
    styles.tabSelectorButton,
    styles.tabBackground(isHovered, isActive, isDisabled, backgroundColor),
    styles.userSelectNone,
    isOfflineWithPendingAction ? styles.offlineFeedbackPending : undefined,
    ]}
    wrapperStyle={equalWidth ? styles.flex1 : styles.flexGrow1}

    The flex: 1 on the wrapper divides the row into three equal slots, but that constraint never reaches the inner pill. tabSelectorButton only sets height, paddingHorizontal: 12, flexDirection: 'row', alignItems/justifyContent: center and a border radius — it has no flex, no width, no minWidth: 0, and no overflow, so it sizes to its content (label + horizontal padding) and is free to grow past the wrapper's bounds.

    App/src/styles/index.ts

    Lines 4477 to 4485 in 5a507e4

    tabSelectorButton: {
    height: variables.tabSelectorButtonHeight,
    paddingHorizontal: variables.tabSelectorButtonPadding,
    flexDirection: 'row',
    alignItems: 'center',
    justifyContent: 'center',
    borderRadius: variables.buttonBorderRadius,
    scrollMarginInline: variables.tabSelectorScrollMarginInline,
    },

    The label itself does not save us either. TabLabel wraps the text in a View with maxWidth: variables.tabSelectorMaxTabLabelWidth (256px) and numberOfLines={1}. The Polish "Zadania do wykonania" measures well under 256px, so the text never reaches the truncation cap and never ellipsizes — it simply renders at full width and pushes the pill wider than the third of the row the wrapper allotted. Because the inner pill (and its selection background) is what overflows while the wrapper stays at its flex: 1 width, the pill spills over the adjacent tab and the selected background, which is bounded by the wrapper's measured slot, stops short of the full word. So the gap is the missing constraint between the equal-width wrapper and its inner pill, not the 256px label cap.

    <View style={{maxWidth: variables.tabSelectorMaxTabLabelWidth}}>
    <Animated.View style={[{opacity: activeOpacity}]}>
    <Text
    numberOfLines={1}
    style={[styles.tabText(true, hasIcon), textStyle]}

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

    Propagate the equal-width constraint to the inner pill and let the label truncate within it. In TabSelectorItem, when equalWidth is true, add flex: 1 and minWidth: 0 to the pressable's style (alongside tabSelectorButton) so the pill fills exactly the wrapper's slot and is allowed to shrink below its content width:

    style={[
        styles.tabSelectorButton,
        equalWidth && {flex: 1, minWidth: 0},
        styles.tabBackground(isHovered, isActive, isDisabled, backgroundColor),
        ...
    ]}

    The minWidth: 0 is the load-bearing part: a flex child defaults to min-width: auto, which refuses to shrink past its content, so without it the pill would still overflow. With the pill clamped to its slot, the existing numberOfLines={1} on the TabLabel text now ellipsizes long labels, and the selection background — drawn on this same pill — covers the entire visible label. Because the change is gated on equalWidth and the badge already has its own minWidth/marginLeft via inboxTabBadge, the non-equal-width navigation tabs (flexGrow1 path) are untouched. The other equalWidth callers (SetSpendRulesStep, EditInviteReceiptPartnerPolicyPage) flow through this same TabSelectorItem, so they inherit the correct fill-and-truncate behavior rather than regressing.

    What alternative solutions did you explore? (Optional)

    Lowering tabSelectorMaxTabLabelWidth so the label truncates sooner: rejected because it is a global, magic-number cap shared by every tab selector and would clip short labels unnecessarily while still not tying the pill width to the equal-width slot — the overlap can recur for any label wider than a third of the row.

  7. ahmdshrif commented on Jun 18, 2026

    @ahmdshrif
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2026-06-18 19:49:03 UTC.

    Proposal

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

    In the Inbox LHN, the All / Unread / To-dos filter tabs overlap each other when a label is long (e.g. Polish), and the selected-tab pill does not cover the whole word.

    What is the root cause of that problem?

    1. The filters render through InboxTabSelector with equalWidth, so every tab's wrapper gets flex: 1 — each tab is forced to exactly 1/3 of the (narrow) LHN width.
      wrapperStyle={equalWidth ? styles.flex1 : styles.flexGrow1}
    2. Inside every tab, the label is wrapped in a View that sets only maxWidth (256px) and has no flexShrink. In React Native/Yoga the default flexShrink is 0 (web CSS defaults to 1), so the label keeps its full content width and never shrinks to the 1/3 slot.
      <View style={{maxWidth: variables.tabSelectorMaxTabLabelWidth}}>
      <Animated.View style={[{opacity: activeOpacity}]}>
      <Text
      numberOfLines={1}
      style={[styles.tabText(true, hasIcon), textStyle]}
    3. Because the label View never gets a bounded width, the inner numberOfLines={1} Text has nothing to truncate against, so the centered text spills past the button on both sides.

    This single cause explains BOTH symptoms: the overflowing text runs into the neighbor tab (overlap), and the pill is the button background sized to the 1/3 slot, so it covers only the middle of the over-wide word. It is locale-specific because the English labels fit 1/3, while pl is long (todo: 'Zadania do wykonania').

    inboxTabs: {all: 'Wszystko', todo: 'Zadania do wykonania', unread: 'Nieprzeczytane'},

    TabLabel is the single shared label for every TabSelectorBase consumer (Inbox, Search narrow menus, WorkspaceListLayout), one file with no platform split — so one fix covers web and native.

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

    On the label wrapper View in TabLabel.tsx add flexShrink: 1 (plus minWidth: 0 for the web min-content case) alongside the existing maxWidth:

    <View style={{maxWidth: variables.tabSelectorMaxTabLabelWidth, flexShrink: 1, minWidth: 0}}>

    Now the label shrinks to the tab's real width and the existing numberOfLines={1} truncates with an ellipsis. Regression-safe: maxWidth still caps width, and non-equalWidth scrollable rows only shrink when space is actually constrained, so short labels and existing tab rows are unchanged.

    What alternative solutions did you explore? (Optional)

    • Add minWidth: 0 only on the flex: 1 wrapper. Lets the wrapper shrink, but the label View's own flexShrink: 0 still keeps it from yielding, so the text can still overflow — incomplete.
    • Lower tabSelectorMaxTabLabelWidth. A magic number that still overflows on the narrowest widths and truncates short labels needlessly.
  8. dostonbunyodov0006 commented on Jun 18, 2026

    @dostonbunyodov0006

    Proposal

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

    In the Inbox (LHN) filter row, long filter labels — e.g. in Polski — make the filter pills overlap each other, and the selected-state background does not cover the whole word.

    What is the root cause of that problem?

    The two symptoms are one defect: the pill box width is decided independently of its label. The filters row constrains each pill''s width — via a flex distribution (flex: 1 / shared flexBasis) or a fixed/maxWidth that was tuned against short English labels. With a long Polish word the label is wider than the box it lives in, and because overflow isn''t contained, the text bleeds past its own pill into the neighbour -> the overlap. The selected background is painted on that too-small box, not on the text, so it stops short of the word''s end.

    Crucially, this is language-fragile by design: any width baked for one language''s word lengths will break for the next longer-word language. Polish just exposed it first.

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

    Stop constraining or distributing pill widths at all. Make each pill intrinsically content-sized inside a horizontally-scrollable row, so the box always equals its label and the row scrolls instead of squeezing. Overlap then becomes structurally impossible, in every language:

    // Inbox filter pills row + pill styles (illustrative — confirm against the component)
     filtersRow: {
         flexDirection: 'row',
    +    columnGap: 8,            // real spacing between pills, not borrowed from squeezing
     },
     filterPill: {
    -    flex: 1,                 // (or a fixed / maxWidth) — forces a width unrelated to the label
    -    overflow: 'visible',     // long labels bleed past the box into the next pill
    +    flexGrow: 0,
    +    flexShrink: 0,           // never compress below the label''s intrinsic width
    +    alignSelf: 'flex-start', // box wraps its content exactly
         paddingHorizontal: 12,
     },

    And wrap the row in a horizontal ScrollView (horizontal showsHorizontalScrollIndicator={false}) so that when the intrinsic pills exceed the viewport they scroll rather than overflow. Because the selected background is the pill, and the pill now equals the label, the highlight always spans the full word — the second symptom is fixed by the same change.

    What alternative solutions did you explore? (Optional)

    • Bump the fixed width / add padding / set a larger maxWidth — rejected: it just re-tunes a magic number for Polish and breaks again for the next language with longer words (German, Finnish...). It treats the symptom, not the language-fragile width model.
    • Truncate long labels with numberOfLines={1} + ellipsis — rejected: it stops the overlap but hides the filter name, degrading usability exactly where the words are longest; intrinsic-width + scroll keeps every label fully readable.
  9. melvin-bot commented on Jun 18, 2026

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @ahmedGaber93 (External)

  10. changed the title [-]Web - Inbox - Inbox filters overlap with each other when filter word is long[/-] [+][$250] Web - Inbox - Inbox filters overlap with each other when filter word is long[/+] on Jun 18, 2026
  11. melvin-bot commented on Jun 18, 2026

    @melvin-bot
  12. aswin-s commented on Jun 18, 2026

    @aswin-s
    Contributor

    Proposal

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

    When the app language is set to Polish, the Inbox tab filter labels ("Wszystko", "Nieprzeczytane", "Zadania do wykonania") are significantly longer than their English equivalents. Because all three tabs are rendered with equalWidth (each taking flex: 1 of the container), the columns are narrower than the fixed maxWidth: 256 cap on the label View in TabLabel.tsx. This allows the text to visually overflow its tab column and overlap adjacent tabs. The active selection pill is also narrower than the rendered text. The expected result is that each tab label is constrained to its equal-width column and does not overflow into neighboring tabs.

    What is the root cause of that problem?

    TabLabel.tsx:29 wraps label text in a View with style={{maxWidth: variables.tabSelectorMaxTabLabelWidth}} where tabSelectorMaxTabLabelWidth is the fixed value 256 (variables.ts:217). When InboxTabSelector.tsx renders TabSelectorBase with equalWidth (line 52), each tab's wrapper is given flex: 1 (TabSelectorItem.tsx:62), dividing the container into thirds. On typical screens those thirds are narrower than 256px, yet the label View is still permitted to grow to 256px, causing text to escape the tab column and overlap its neighbors. Neither tabSelectorButton nor AnimatedPressableWithFeedback enforces overflow: 'hidden', so the overflow is visible.

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

    1. src/components/TabSelector/TabLabel.tsx — Add an optional maxWidth prop (type number | string, default variables.tabSelectorMaxTabLabelWidth) and apply it to the outer View at line 29 instead of the hardcoded variable, so callers can pass '100%' when equal-width layout is needed.
    2. src/components/TabSelector/TabSelectorItem.tsx — Pass equalWidth down to TabLabel and, when equalWidth is true, pass maxWidth="100%" to the new TabLabel prop so the label is capped to its flex column.
    3. src/components/TabSelector/types.ts — Add the new maxWidth prop to TabLabelProps if it is exported/shared, or update the internal type in TabLabel.tsx.
    4. Alternatively (simpler): in TabLabel.tsx:29, change the View style to {maxWidth: variables.tabSelectorMaxTabLabelWidth, overflow: 'hidden'} — this stops the visual bleed without requiring prop threading, though it does not prevent the text from being allocated space beyond the column.

    What alternative solutions did you explore? (Optional)

    Adding overflow: 'hidden' to tabSelectorButton in styles/index.ts:4477 would clip visually but still allow the label View to request more layout space than its column, potentially shifting the badge position; passing maxWidth='100%' to TabLabel is more correct because it constrains the layout measurement itself.

  13. 68 remaining items

  14. melvin-bot commented on Aug 6, 2026

    @melvin-bot

    @ahmedGaber93 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  15. Abdulloh0109 commented on Aug 7, 2026

    @Abdulloh0109
    Contributor

    @mallenexpensify
    The payment is due today. Please don't forget.

  16. ahmedGaber93 commented on Aug 7, 2026

    @ahmedGaber93
    Contributor

    BugZero Checklist:

    • [Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to the comment on the PR: https://github.com/Expensify/App/pull/92146/changes#r3734051807

    • [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: N/A.

    • [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.

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue: https://github.com/Expensify/Expensify/issues/670268

    Regression Test Proposal

    Precondition:

    Test:

    1. Set the app language to Polski (Account → Preferences → Language → Polski).
    2. Open the Inbox (Skrzynka odbiorcza).
    3. Verify the three filter tabs — Wszystko / Nieprzeczytane / Zadania do wykonania — each show their full label and do not overlap each other.
    4. Verify that when the labels don't fit the width, the tab row scrolls horizontally (labels are not truncated).
    5. Scroll the tab row all the way to the right and verify there is ~20px padding after the last tab (equal margins on both sides).
    6. Switch the language back to English and verify the tabs (All / Unread / To-dos) render and scroll normally.
    7. Open another tab selector that uses TabSelectorBase (e.g. the narrow Search type menu) and verify it still renders correctly.

    Do we agree 👍 or 👎

    Zapier Logs Run ID: 00040eee-f7d6-afd0-dbde-6f2689698f94
  17. melvin-bot commented on Aug 10, 2026

    @melvin-bot

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

  18. mallenexpensify commented on Aug 11, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor: @Abdulloh0109 due $250 via Upwork
    Contributor+: @ahmedGaber93 due $250 via NewDot

    @Abdulloh0109 can you please accept the job below? Please reply here and tag me once you have.
    If you're not sent an offer in Upwork when you're assigned to an issue, please tag me. If an Upwork job exists, please submit a proposal.https://www.upwork.com/jobs/~022086980474301324661

  19. ahmedGaber93 commented on Aug 12, 2026

    @ahmedGaber93
    Contributor

    Not overdue ^

  20. mallenexpensify commented on Aug 12, 2026

    @mallenexpensify
    Contributor

    @Abdulloh0109 paid, summary updated above. Thx.

    @Abdulloh0109 plz comment on the GH when you accept the offer in Upwork, otherwise we won't know to pay you. Thx

  21. flaviadefaria commented on Sep 2, 2026

    @flaviadefaria
    Contributor

    Approved: @ahmedGaber93 due $250 via NewDot

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