Remove SCAN_TEST_TOOLTIP from Create Expense Scan flow#87892
Remove SCAN_TEST_TOOLTIP from Create Expense Scan flow#87892
Conversation
Remove the SCAN_TEST_TOOLTIP, SCAN_TEST_TOOLTIP_MANAGER, and SCAN_TEST_CONFIRMATION product training tooltips and their associated code from the scan expense flow. This includes the fake receipt flow (setTestReceiptAndNavigate), the action buttons rendering in the ProductTrainingContext, the onLayout callback chain, tooltip-based Manager McTest restrictions, and translations across all 10 language files. The TestDrive feature (SCAN_TEST_DRIVE_CONFIRMATION) and Manager McTest backend flow remain intact. Co-authored-by: Chavda Sachin <ChavdaSachin@users.noreply.github.com>
Co-authored-by: Chavda Sachin <ChavdaSachin@users.noreply.github.com>
|
Fixed the failing Changed files ESLint check: removed an unused The other warnings (pre-existing |
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.
|
|
@MelvinBot, please lay out the testing steps. |
|
Here are the testing steps for this PR: Testing StepsPrerequisites
1. Verify SCAN_TEST_TOOLTIP is removed
2. Verify TestDrive feature still works
3. Verify Manager McTest still appears
4. Verify InviteMemberListItem renders correctly
5. Verify expense submission flow
6. Regression checks
|
|
@MelvinBot mark it ready for review |
|
🤖 PR has been marked as ready for review as requested by |
|
@ChavdaSachin 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] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2026-04-15.at.6.18.39.PM.mov |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
|
@MelvinBot, could you check if any unused props/styles could be removed, please? |
|
I found 4 categories of unused artifacts that can be cleaned up: 1. Unused style variables —
2. Dead
3. Unused type fields on
4. Unused
Items 1-3 are straightforward removals. Item 4 is a wider refactor since it touches callers throughout OptionsListUtils. |
|
@MelvinBot, that makes sense. Please perform the cleanup. |
…ip removal - Remove inviteMemberListItemTooltipShiftVertical/Horizontal from variables.ts - Remove canShowProductTrainingTooltip prop chain through SelectionListWithSections, ListItemRenderer, and types - Simplify InviteMemberListItemProps to just UserListItemProps (remove unused canShowProductTrainingTooltip, index, sectionIndex) Co-authored-by: Chavda Sachin <ChavdaSachin@users.noreply.github.com>
|
Cleanup done — removed unused artifacts left over from the scan test tooltip removal:
Skipped item 4 ( |
|
@MelvinBot, please clean up use of nvpDismissedProductTraining too; it's not worth a separate PR. |
…tils The nvpDismissedProductTraining parameter was passed through getValidOptions and getSearchOptions but never actually used in the function bodies. This removes the parameter and cleans up all callers and tests. Co-authored-by: Chavda Sachin <ChavdaSachin@users.noreply.github.com>
|
Cleaned up the unused |
|
@MelvinBot, add tests to the PR description. |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #87170 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
|
🤖 Updated the PR description with proper numbered test steps, offline tests, and QA steps per the PR template. |
|
Ready for merge. |
There was a problem hiding this comment.
Pull request overview
Removes the legacy scan “test receipt” product-training tooltips and the associated fake-receipt injection flow from the Create Expense → Scan experience, while keeping the newer TestDrive tooltip/flow intact.
Changes:
- Deletes
SCAN_TEST_TOOLTIP,SCAN_TEST_TOOLTIP_MANAGER, andSCAN_TEST_CONFIRMATIONtooltip configs/priority entries and removes their UI/action-button rendering path. - Removes the fake-receipt injection plumbing (
setTestReceiptAndNavigate+onLayoutcallback chain) from the scan step. - Simplifies option-building and selection list plumbing by removing tooltip-driven Manager McTest restriction logic and eliminating the
nvpDismissedProductTrainingargument from relevant option utilities and callers.
Reviewed changes
Copilot reviewed 45 out of 46 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/utils/TestHelper.ts | Removes legacy test helper for dismissed product training related to scan test tooltips. |
| tests/unit/useSearchSelectorTest.tsx | Updates mocked getValidOptions call expectations after signature change. |
| tests/unit/hooks/useAutocompleteSuggestions.test.ts | Updates test params after removing nvpDismissedProductTraining from hook inputs. |
| tests/unit/OptionsListUtilsTest.tsx | Updates many getValidOptions/getSearchOptions calls and removes scan-tooltip-specific assertions. |
| tests/ui/components/ProductTrainingContextProvider.tsx | Updates tooltip name usage/priorities to align with remaining tooltips. |
| tests/perf-test/OptionsListUtils.perf-test.ts | Updates perf tests for getSearchOptions/getValidOptions signature changes. |
| src/types/onyx/DismissedProductTraining.ts | Removes scan test tooltip keys from the dismissed-product-training Onyx type. |
| src/styles/variables.ts | Removes tooltip-shift variables used only by the old InviteMemberListItem educational tooltip. |
| src/pages/iou/request/step/IOURequestStepScan/types.ts | Removes onLayout prop used for the test receipt injection path. |
| src/pages/iou/request/step/IOURequestStepScan/index.tsx | Removes onLayout wiring and setTestReceiptAndNavigate usage from web scan step. |
| src/pages/iou/request/step/IOURequestStepScan/index.native.tsx | Removes native onLayout wrapper that provided the test receipt injection callback. |
| src/pages/iou/request/step/IOURequestStepScan/hooks/useReceiptScan.ts | Removes setTestReceiptAndNavigate and legacy fake receipt asset usage. |
| src/pages/iou/request/step/IOURequestStepScan/components/MobileWebCameraView.tsx | Removes onLayout prop/plumbing. |
| src/pages/iou/request/step/IOURequestStepScan/components/DesktopWebUploadView.tsx | Removes onLayout prop/plumbing related to test receipt injection. |
| src/pages/iou/request/MoneyRequestParticipantsSelector.tsx | Stops passing now-removed tooltip gating prop into selection list. |
| src/pages/iou/request/MoneyRequestAccountantSelector.tsx | Removes nvpDismissedProductTraining dependency from options building. |
| src/pages/iou/request/IOURequestStartPage.tsx | Removes scan test tooltip context usage and related tracking/dismissal logic. |
| src/pages/Share/ShareTab.tsx | Removes nvpDismissedProductTraining from search options construction. |
| src/pages/NewChatPage.tsx | Removes nvpDismissedProductTraining from options construction. |
| src/libs/actions/IOU/index.ts | Removes optimistic NVP dismissal merge tied to the removed scan test tooltip. |
| src/libs/OptionsListUtils/index.ts | Removes tooltip-driven Manager McTest restrictions and eliminates nvpDismissedProductTraining from APIs. |
| src/languages/zh-hans.ts | Removes scanTestTooltip translation keys. |
| src/languages/pt-BR.ts | Removes scanTestTooltip translation keys. |
| src/languages/pl.ts | Removes scanTestTooltip translation keys. |
| src/languages/nl.ts | Removes scanTestTooltip translation keys. |
| src/languages/ja.ts | Removes scanTestTooltip translation keys. |
| src/languages/it.ts | Removes scanTestTooltip translation keys. |
| src/languages/fr.ts | Removes scanTestTooltip translation keys. |
| src/languages/es.ts | Removes scanTestTooltip translation keys. |
| src/languages/en.ts | Removes scanTestTooltip translation keys. |
| src/languages/de.ts | Removes scanTestTooltip translation keys. |
| src/hooks/useSearchSelector.base.ts | Removes nvpDismissedProductTraining from option computation calls. |
| src/hooks/useAutocompleteSuggestions.ts | Removes nvpDismissedProductTraining from hook params and internal calls. |
| src/components/SelectionList/SelectionListWithSections/types.ts | Removes canShowProductTrainingTooltip prop from list API. |
| src/components/SelectionList/SelectionListWithSections/BaseSelectionListWithSections.tsx | Removes forwarding of canShowProductTrainingTooltip. |
| src/components/SelectionList/ListItem/types.ts | Removes canShowProductTrainingTooltip and related InviteMember-specific props. |
| src/components/SelectionList/ListItem/ListItemRenderer.tsx | Removes forwarding of canShowProductTrainingTooltip. |
| src/components/SelectionList/ListItem/InviteMemberListItem.tsx | Removes EducationalTooltip wrapper and scan-tooltip-specific logic. |
| src/components/Search/SearchFiltersChatsSelector.tsx | Removes nvpDismissedProductTraining dependency from search options construction. |
| src/components/Search/SearchAutocompleteList.tsx | Removes nvpDismissedProductTraining from search options + autocomplete suggestions inputs. |
| src/components/Search/FilterDropdowns/InSelectPopup.tsx | Removes nvpDismissedProductTraining dependency from search options construction. |
| src/components/ProductTrainingContext/index.tsx | Removes action-button rendering path and scan-tooltip modal exceptions. |
| src/components/ProductTrainingContext/TOOLTIPS.ts | Removes scan test tooltip configurations and the action-buttons type field. |
| src/components/MoneyRequestConfirmationList.tsx | Removes legacy scan confirmation tooltip branch; keeps TestDrive confirmation tooltip. |
| src/CONST/index.ts | Removes scan test tooltip analytics event constants and tooltip name constants. |
| assets/images/fake-receipt.png | Removes legacy fake receipt image asset used by the old scan test tooltip flow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fixed Issues
$ #87170
Tests
SCAN_TEST_TOOLTIPorSCAN_TEST_TOOLTIP_MANAGERtooltip appearsInviteMemberListItemrenders correctly without the oldEducationalTooltipwrapperNEWDOT_MANAGER_MCTESTbeta enabled and are not a member of any policy, verify Manager McTest still appears as a contactSCAN_TEST_DRIVE_CONFIRMATIONtooltip) still works when applicableOffline tests
QA Steps
SCAN_TEST_TOOLTIPappears on the scan screenSCAN_TEST_DRIVE_CONFIRMATIONtooltip still displaysSummary
Removes the
SCAN_TEST_TOOLTIP,SCAN_TEST_TOOLTIP_MANAGER, andSCAN_TEST_CONFIRMATIONproduct training tooltips from the Create Expense Scan flow. This is a cleanup of the old scan test tooltip feature while preserving the newer TestDrive feature.What was removed:
shouldRenderActionButtonstype field and action buttons rendering in ProductTrainingContextsetTestReceiptAndNavigatefunction andonLayoutcallback chain used to inject fake receiptsgetRestrictedLoginsgetIsUserSubmittedExpenseOrScannedReceiptandisManagerMcTestReporthelper functionsEducationalTooltipwrapper fromInviteMemberListItemscanTestTooltiptranslation keys from all 10 language filesfake-receipt.pngassetWhat was preserved:
SCAN_TEST_DRIVE_CONFIRMATIONtooltip and TestDrive featureEmployeeTestDriveModalandsetTestReceiptactionCONST.BETAS.NEWDOT_MANAGER_MCTEST