[CP Staging] Revert "Add insight-switcher dropdown to the chart slot in Home" - #98351
[CP Staging] Revert "Add insight-switcher dropdown to the chart slot in Home"#98351mountiny wants to merge 1 commit into
Conversation
…e-insight-switcher" This reverts commit a7d6923, reversing changes made to 9ba579bbbd3e7f5b7d9b2e0e2f8e5d8e6b4a3c1d. Reverted to fix the iOS crash reported in #98331, where selecting Top merchants in the Home Insights dropdown crashes the app. Conflict in config/eslint/eslint.seatbelt.tsv resolved by restoring the no-unsafe-type-assertion entry for SpendOverTimeSection/useSpendOverTimeData.ts, which the restored file still needs.
|
🚧 mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
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.
|
|
@ZhenjaHorbach 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] |
|
Asked QA to test if the blocker is resolved https://expensify.slack.com/archives/C09V78U42D8/p1786475915905869 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6fd1f31aa0
ℹ️ 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".
| { | ||
| sortBy: CONST.SEARCH.TABLE_COLUMNS.GROUP_TOTAL, | ||
| sortOrder: CONST.SEARCH.SORT_ORDER.DESC, | ||
| limit: CONST.SEARCH.TOP_SEARCH_LIMIT, | ||
| }, |
There was a problem hiding this comment.
Keep Top spenders capped to top results
When an admin opens Search > Spend > Top spenders in a workspace with many submitters, this canned query now omits the CONST.SEARCH.TOP_SEARCH_LIMIT cap that the parent query had and that the other top-* suggestions still use. That makes the “Top spenders” shortcut fetch and render every grouped spender for the last month instead of just the top slice, which regresses the expected top-results behavior and can make this suggested search much heavier for large workspaces.
Useful? React with 👍 / 👎.
|
Closing in favour of #98354 |
Explanation of Change
Reverts Add insight-switcher dropdown to the chart slot in Home (merge commit
a7d6923), which crashes the iOS app when a user opens the Home Insights dropdown and picks Top merchants. The crash is unrecoverable — the reporter had to delete and reinstall the app.The revert restores the previous Home behaviour, where the chart slot always shows Spend over time and has no dropdown:
InsightsSectiongoes back toSpendOverTimeSection, anduseInsightDataback touseSpendOverTimeData.InsightTitleDropdownanduseHomeInsightConfigsare removed.nvp_homeSelectedInsightOnyx key and itsinsightsSectiontranslations are removed.WidgetContainerloses thetitleContentprop that the dropdown needed.getSuggestedSearchesVisibilityintocreateTypeMenuSections, so Spend still hides Top spenders for track-intent users with Workflows disabled.One conflict came up in
config/eslint/eslint.seatbelt.tsv.mainhad dropped the@typescript-eslint/no-unsafe-type-assertionentry for this file because the post-PR version no longer had an assertion. The restoreduseSpendOverTimeData.tsstill casts toGroupedItem[], so the entry is restored with a count of 1.Fixed Issues
$ #98331
PROPOSAL: N/A
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)Avatar, 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.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
Not yet tested — needs manual QA.
Android: mWeb Chrome
Not yet tested — needs manual QA.
iOS: Native
Not yet tested — needs manual QA.
iOS: mWeb Safari
Not yet tested — needs manual QA.
MacOS: Chrome / Safari
Not yet tested — needs manual QA.