Resurface Top Spenders insight for track-intent workspace users#88752
Draft
Resurface Top Spenders insight for track-intent workspace users#88752
Conversation
The Top Spenders insight was unconditionally hidden for track-intent users via a hard exclusion in the insightsSearchKeys array. The existing eligibility check (isPaidPolicy && admin/auditor/approver && 2+ members) already correctly gates visibility, making the track-intent exclusion redundant. Removing it allows track-intent workspace owners who invite members and upgrade to a paid plan to see Top Spenders naturally. Co-authored-by: Daniel Gale-Rosen <dangrous@users.noreply.github.com>
…kspace Verifies that track-intent users on a paid workspace with 2+ members and admin role can see the Top Spenders insight in search menu sections. Co-authored-by: Daniel Gale-Rosen <dangrous@users.noreply.github.com>
Contributor
|
@MelvinBot please complete the checklist for human reviewers - this looks good but I haven't manually tested yet, will do that before requesting a reviewer |
Contributor
Author
|
Checklist updated. Here's a summary: Checked off (verified by AI review):
Left unchecked (requires human action):
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation of Change
Removes the hard exclusion of the Top Spenders insight for track-intent users. Previously,
isTrackIntentUserunconditionally removedTOP_SPENDERSfrom the insights keys array, preventing it from ever appearing — even when the user had upgraded to a paid workspace with 2+ members.The existing eligibility check (
isPaidPolicy && (isAdmin || isAuditor || isUserApprover) && memberCount >= 2) already correctly gates Top Spenders visibility. Removing the redundant track-intent gate allows workspace owners who invite members and upgrade to a paid plan to see Top Spenders naturally.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/618934
PROPOSAL:
Tests
// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review"
// Please describe what tests you performed that validates your changed worked.
Offline tests
N/A — this change only affects menu visibility logic, no network calls involved.
QA Steps
AI Tests
eslint-config-airbnb-base)typecheck-tsgo)userSelectstyle issues)SearchUIUtilsTest.ts)@react-navigation/core)All failures are pre-existing and unrelated to this change. CI will validate in its own environment.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))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