-
Notifications
You must be signed in to change notification settings - Fork 3.5k
fix: regression fixes for Top Categories (#80668, #80709) #80830
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: regression fixes for Top Categories (#80668, #80709) #80830
Conversation
|
@ShridharGoel Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
@neil-marcellini Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
…ts-Release-1-Top-Categories-Add-group-by-category
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ef0e615d4b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| from: "from", | ||
| card: "card", | ||
| "withdrawal-id": "withdrawn", | ||
| category: "category", | ||
| tag: "tag", | ||
| category: "groupCategory", | ||
| merchant: "groupMerchant", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normalize legacy sortBy:category when groupBy changes
Switching the default sort for groupBy:category to groupCategory removes category from the parser’s default sort set, so sortBy:category is now treated as a user‑provided custom sort. Any existing saved searches/URLs created before this change (they defaulted to sortBy:category) will keep that sort when the user switches group‑by in the filters because updateDefaultValues won’t auto‑reset it, leaving queries like group-by:merchant sort-by:category; getSortedMerchantData doesn’t map category, so results come back unsorted and the header won’t show an active sort. Consider normalizing legacy sortBy:category to groupCategory or keeping category in the default sort set.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The frontend createTopSearchMenuItem() always generated sortBy:groupTotal for ALL group types - it never used sortBy:category. Any existing saved searches/URLs have sortBy:groupTotal, not sortBy:category.
The only way to hit this edge case is manually typing sortBy:category in the URL, which is unlikely in real usage.
…ts-Release-1-Top-Categories-Add-group-by-category
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
Should we return NotFound for this case: Macbook-Chrome.mp4 |
|
Still able to see the Top categories section: Screen.Recording.2026-01-30.at.12.33.43.AM.mov |
…ts-Release-1-Top-Categories-Add-group-by-category
Did you make sure disabling categories on all workspaces Like here: Macbook-Chrome.mp4 |
That account has only 1 workspace. Screen.Recording.2026-01-30.at.1.33.41.AM.mov |
|
It gets fixed on using |
trjExpensify
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clean-up on Insights 👍
Hmm. I think policy.areCategoriesEnabled becomes undefined when we have only one workspace, but works for more than one workspaces.
👍 |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2026-01-30.at.6.16.31.AM.mov |
ShridharGoel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine, can you add the videos (atleast web) ?
lakchote
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Merging since @ShridharGoel provided a video test for Web. @TaduJR next time please provide videos for your tests. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/lakchote in version: 9.3.11-16 🚀
|
Explanation of Change
Fixed Issues
$ #80668
$ #80709
PROPOSAL:
Tests
Test #80668
Test #80709
Offline tests
Same as tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari