Skip to content

[Due for payment 2026-12-08] [$175] Display options icon (eyeball) is missing from some mobile tables like Per diem #107274

Open

Description

@izarutskaya

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


**Version Number:**9.5.41-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @shawnborton
Slack conversation (hyperlinked to channel name): expensify_bugs

Action Performed:

  1. Navigate to https://staging.new.expensify.com/
  2. Go to any workspace with Per diem/Taxes >
  3. Tap Per diem/Taxes page

Expected Result:

User should see Display options icon (eyeball)

Actual Result:

Display options icon (eyeball) is missing on the page

Workaround:

Unknown

Platforms:

Select the officially supported platforms where the issue was reproduced:

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

Screenshots/Videos

Screen_Recording_20261118_170900_Expensify.mp4

View all open jobs on GitHub

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

Activity

  1. added
    Daily
    Bug
    on Nov 18, 2026
  2. added
    External
    on Nov 18, 2026
  3. expensify-chore-bot commented on Nov 18, 2026

    @expensify-chore-bot

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

  4. changed the title [-]Display options icon (eyeball) is missing from some mobile tables like Per diem[/-] [+][$175] Display options icon (eyeball) is missing from some mobile tables like Per diem[/+] on Nov 18, 2026
  5. expensify-chore-bot commented on Nov 18, 2026

    @expensify-chore-bot
  6. MelvinBot commented on Nov 18, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    Per diem and Taxes explicitly force alphabetical sorting in narrow and medium layouts. The shared Display options component hides itself whenever that sorting lock is active—even though an eyeball button is already implemented.

    Confidence: Medium. Confirmed in current code; not reproduced in the browser or checked against version 9.5.41-0.

    Code evidence and alternatives checked

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

    Remove narrowLayoutSortColumn from these two tables, retaining initialSortColumn. This enables the existing eyeball control and functional sorting, while preserving alphabetical order initially.

    Confirm that mobile sorting is intended to replace the existing lock. Verify populated Per diem and Taxes tables at narrow, medium, and wide widths; test sort field, direction, reset, and resizing. Preserve empty-table behavior.

    What alternative solutions did you explore? (Optional)

    Changing the shared visibility guard alone would expose an ineffective control and affect other tables with intentional sorting locks.


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


    view run

  7. akzkid commented on Nov 18, 2026

    @akzkid

    Proposal

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

    On narrow (mobile) layouts, the Display options (eyeball) button is missing from some workspace tables, such as Per diem and Taxes, so users can't change how the table is sorted there.

    What is the root cause of that problem?

    This is caused by the shared Table component's narrowLayoutSortColumn prop, not by anything in a single page. When a table passes that prop and shouldUseNarrowTableLayout is true:

    1. The sorting middleware ignores the user's sort and forces {columnKey: narrowLayoutSortColumn, order: ASC}:
      if (shouldUseNarrowTableLayout) {
      // Narrow layouts drop columns for space rather than because the data lost them, so the fallback below must not
      // run here. Otherwise resizing past the breakpoint would silently discard the sort the user picked.
      return narrowLayoutSortColumn ? {columnKey: narrowLayoutSortColumn, order: CONST.SEARCH.SORT_ORDER.ASC} : userSorting;
      }
    2. Because sorting is locked, shouldShowTableDisplaySettingsTrigger hides the eyeball on purpose (isSortingLockedByLayout). The filter bar uses the same check:
      // On narrow layouts, tables with a narrowLayoutSortColumn ignore user sorting entirely, so a sort control would be a no-op.
      function shouldShowTableDisplaySettingsTrigger({columns, shouldUseNarrowTableLayout, narrowLayoutSortColumn}: ShouldShowTableDisplaySettingsTriggerParams): boolean {
      const hasSortableColumns = columns.some((column) => column.sortable);
      const isSortingLockedByLayout = shouldUseNarrowTableLayout && !!narrowLayoutSortColumn;
      return hasSortableColumns && !isSortingLockedByLayout;
      }

      const showsDisplaySettingsTrigger = shouldShowTableDisplaySettingsTrigger({columns, shouldUseNarrowTableLayout, narrowLayoutSortColumn});

    Six tables pass narrowLayoutSortColumn today, so the eyeball is missing on mobile in all six, not just Per diem and Taxes:

    In every one of them, narrowLayoutSortColumn has the same value as initialSortColumn. So the prop doesn't change the default order. Its only effect is to lock sorting and hide the eyeball on mobile.

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

    • Remove narrowLayoutSortColumn from all six tables above. Keep initialSortColumn, so the default mobile order stays the same (alphabetical by name, destination, card, or condition).
    • Once nothing uses it, remove the lock from the shared Table: the narrowLayoutSortColumn branch in resolveActiveSorting (narrow layout keeps returning userSorting, as it already does for tables without the prop), the isSortingLockedByLayout check in shouldShowTableDisplaySettingsTrigger, and the prop/context field in types.ts, TableContext.tsx and Table.tsx. Then no other table can hit this bug again.
    • After this, narrow layouts behave like the tables that already show the eyeball on mobile: the eyeball opens Sort by / Sort order, and the choice is applied.

    How this differs from the existing MelvinBot proposal

    Melvin's proposal finds the same mechanism but only changes Per diem and Taxes. Distance rates, Spend rules, Category rules and Expense defaults have the same narrowLayoutSortColumn and would still be missing the eyeball on mobile (the issue says "some mobile tables like Per diem"). This proposal fixes all six and removes the now-unused lock, so the bug can't come back through that prop.

    What specific scenarios should we cover in automated tests to prevent reoccurrence of this issue?

    • Unit test for shouldShowTableDisplaySettingsTrigger: it returns true on a narrow layout whenever the table has at least one sortable column.
    • Unit test for the sorting middleware: on a narrow layout, after updateSorting({columnKey: 'rate', order: 'desc'}), activeSorting equals the user's choice, and the initial order is initialSortColumn ascending.

    What alternative solutions did you explore? (Optional)

    Keep the prop but treat it as a default only (use it until the user picks a sort, then respect the user's choice). That works too, but it duplicates initialSortColumn in every current use, so removing it is simpler.


    Contributor details

    Your Expensify account email: carp-digest@mail.grokbot.com
    Upwork Profile Link: https://www.upwork.com/freelancers/~01be5d412b545fdf18

  8. melvin-bot commented on Nov 18, 2026

    @melvin-bot

    ✅ Contributor details stored successfully. Thank you for contributing to Expensify!

  9. 8 remaining items

  10. Krishna2323 commented on Nov 20, 2026

    @Krishna2323
    Contributor

    @MelvinBot implement this and open a draft PR assigned to me.

    To stay within the run limit:

    • Skip browser verification. I'll test on the PR.
    • Run only the targeted tests (tests/unit/components/Table/useSortingTest.ts, tests/ui/TableTest.tsx, and the new Taxes and trigger tests), plus lint and typecheck on changed files. Don't run the full suite.
    • Branch from the latest origin/main and don't compute a merge base or fetch full history. If you need a diff, compare against origin/main directly.
    • Push and open the draft PR as soon as the targeted checks pass. Leave QA steps and screenshots for me.
  11. MelvinBot commented on Nov 20, 2026

    @MelvinBot
    Contributor

    Created draft PR Allow sorting workspace tables on compact layouts, assigned to Krishna2323.

    • All six tables unlocked; Taxes resize sorting fixed.
    • 109 targeted tests, changed-file lint, and app/Jest typechecks passed.
    • Browser verification and full suite skipped as requested. QA steps and screenshots are left for you.

    view run

  12. expensify-chore-bot commented on Nov 23, 2026

    @expensify-chore-bot

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

  13. added
    Reviewing
    Weekly
    and removed
    Daily
    on Nov 25, 2026
  14. added
    Daily
    and removed
    Reviewing
    Weekly
    on Dec 1, 2026
  15. changed the title [-][$175] Display options icon (eyeball) is missing from some mobile tables like Per diem[/-] [+][Due for payment 2026-12-08] [$175] Display options icon (eyeball) is missing from some mobile tables like Per diem[/+] on Dec 1, 2026
  16. melvin-bot commented on Dec 1, 2026

    @melvin-bot

    @Krishna2323

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.55-6 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-12-08. 🎊

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ 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]. If no checklist is needed for this issue, you can click: [no checklist button]

  17. expensify-chore-bot commented on Dec 4, 2026

    @expensify-chore-bot

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

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

Metadata

Metadata

Labels

BugDailyExternalOverdue

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions