You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Spend - New created category is added on the bottom of the list on "Filters" page. #91686
Version Number: 9.3.82-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:#90029 Email or phone of affected tester (no customers):ibellicotest+2250@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Motorola MotoG60 / Android 12 (Hybrid app) - Windows 11 / Chrome App Component: Search
Action Performed:
Prerequisite: Account has at least one workspace.
Open the staging.new.expensify.com website.
Navigate to "Workspaces" > Open any workspace > "Categories"
Click on "Add Category" and create a new category that won´t be placed last alphabetically.
Note that new category is added to list and is correctly placed.
Navigate to "Spend"
Click on "Filters" icon > "Category"
Note that the just created category is placed last on categories list.
Expected Result:
New created category should added alphabetically to categories list on "Filters" page.
Actual Result:
New created category is displayed on the bottom of categories list on "Filters" page.
👋 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:
Identify the pull request that introduced this issue and revert it.
PR #90029 replaced the old SearchMultipleSelectionPicker (which explicitly sorted items alphabetically via sortOptionsWithEmptyValue) with a new CategorySelector + MultiSelect component pair that never sorts the items.
In CategorySelector.tsx:67-74, category names are collected into a Set (which preserves insertion order from Onyx — not alphabetical) and passed directly to MultiSelect without sorting. MultiSelect.tsx:68 only filters for search, it never sorts.
What changes do you think we should make in order to solve the problem?
Sort the uniqueCategoryNames array alphabetically in CategorySelector.tsx before mapping to items. Change line 68 from:
Array.from(uniqueCategoryNames) → Array.from(uniqueCategoryNames).sort((a, b) => localeCompare(a, b))
where localeCompare comes from the existing useLocalize() hook already imported on line 21. The "No category" item is already prepended at line 55 (before the sorted items are pushed), so it stays at the top.
Note: TagSelector.tsx:43 has the same missing-sort bug and should be fixed the same way.
What alternative solutions did you explore? (Optional)
An alternative would be adding sorting logic inside MultiSelect.tsx itself, but that would force alphabetical ordering on all consumers. Sorting at the selector level is more appropriate since different selectors may have different ordering requirements.
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.
Activity
applause-bot commentedon May 26, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/3a29ade5fe752f6cfea125075f5585b114febec67135a0df564780ee9a1f18f3
melvin-bot commentedon May 26, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #90029
melvin-bot commentedon May 26, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon May 26, 2026
👋 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:
MelvinBot commentedon May 26, 2026
Proposal
What is the root cause of that problem?
PR #90029 replaced the old
SearchMultipleSelectionPicker(which explicitly sorted items alphabetically viasortOptionsWithEmptyValue) with a newCategorySelector+MultiSelectcomponent pair that never sorts the items.In
CategorySelector.tsx:67-74, category names are collected into aSet(which preserves insertion order from Onyx — not alphabetical) and passed directly toMultiSelectwithout sorting.MultiSelect.tsx:68only filters for search, it never sorts.What changes do you think we should make in order to solve the problem?
Sort the
uniqueCategoryNamesarray alphabetically inCategorySelector.tsxbefore mapping to items. Change line 68 from:Array.from(uniqueCategoryNames)→Array.from(uniqueCategoryNames).sort((a, b) => localeCompare(a, b))where
localeComparecomes from the existinguseLocalize()hook already imported on line 21. The "No category" item is already prepended at line 55 (before the sorted items are pushed), so it stays at the top.Note:
TagSelector.tsx:43has the same missing-sort bug and should be fixed the same way.What alternative solutions did you explore? (Optional)
An alternative would be adding sorting logic inside
MultiSelect.tsxitself, but that would force alphabetical ordering on all consumers. Sorting at the selector level is more appropriate since different selectors may have different ordering requirements.Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.bernhardoj commentedon May 26, 2026
This is because we don't do any sorting on the list. Do we want to sort here?
cc: @trjExpensify
JS00001 commentedon May 26, 2026
I think we should sort these alphabetically
JS00001 commentedon May 26, 2026
Fixed by CP, popup no longer exists
trjExpensify commentedon May 26, 2026
I agree, but
No categorystay up top.