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
Reports - Dismissed tooltip reappears after reset app or relogin #84168
Version Number: 9.3.31-0 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack:#82982 Email or phone of affected tester (no customers):josidjnosidjoidjiosj@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.2 / Chrome App Component: Search
Action Performed:
Go to staging.new.expensify.com
Go to Reports > Expenses.
Click Filters.
Click Has.
Click X button on the tooltip to dismiss it.
Close the RHP.
Go to Account > Troubleshoot > Clear cache and restart > Reset and refresh OR relogin.
Go to Reports > Expenses.
Click Filters.
Click Has.
Expected Result:
Tooltip will no longer appear after reset app or relogin because user has manually dismissed it in Step 5.
Actual Result:
Dismissed tooltip reappears after reset app or relogin.
👋 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.
Classification: Frontend bug Causing PR: #82982 - "fix: add a tooltip to train users" by @daledah (High confidence) Related Issues: #81737
Recommendation: REVERT
The tooltip dismissal state is not persisted through cache clear/restart operations, causing a poor user experience where users must repeatedly dismiss the same tooltip.
Labels: This issue is correctly labeled with DeployBlockerCash. No label changes needed at this time.
📋 Detailed Analysis
Evidence
PR #82982 added a new product training tooltip for the "Has" filter in the search filters page. The tooltip can be dismissed by users clicking the X button. The issue reports that after dismissing the tooltip and using "Clear cache and restart" (or relogin), the dismissed tooltip reappears.
Please re-state the problem that we are trying to solve in this issue.
When a user dismisses the "Has" filter tooltip (introduced in PR #82982), the tooltip reappears after performing "Clear cache and restart" or relogging in. The dismissal should persist across these actions.
What is the root cause of that problem?
The tooltip dismissal is stored in the Onyx key NVP_DISMISSED_PRODUCT_TRAINING (nvp_dismissedProductTraining). When dismissed, two things happen:
An optimistic Onyx merge sets the local state immediately (src/libs/actions/Welcome/index.ts:152-168)
An API.write(DISMISS_PRODUCT_TRAINING) call is queued to persist the dismissal server-side
The problem is that NVP_DISMISSED_PRODUCT_TRAINING is not included in the KEYS_TO_PRESERVE list used by clearOnyxAndResetApp() (src/libs/actions/App.ts:122-145). When the user clears cache:
Onyx.clear(KEYS_TO_PRESERVE) wipes the local dismissal state (line 765)
IS_LOADING_APP is preserved as false (it's in KEYS_TO_PRESERVE)
openApp() is called in a .then() chain (line 796), but before it runs and sets isLoadingApp = true, there's a window where isLoadingApp is false and dismissedProductTraining is undefined
shouldTooltipBeVisible() (src/components/ProductTrainingContext/index.tsx:129) checks isLoadingApp as a guard, but during this gap it passes through, and isProductTrainingElementDismissed() (src/libs/TooltipUtils.ts:4-5) returns false because the value is undefined
For the relogin path, the issue is more severe: cleanupSession() calls PersistedRequests.clear(), which permanently wipes any pending DismissProductTraining API writes from the sequential queue. If the write hadn't been sent to the server yet, the dismissal is permanently lost — the server never learns about it, and subsequent OpenApp calls won't include it.
What changes do you think we should make in order to solve the problem?
Add ONYXKEYS.NVP_DISMISSED_PRODUCT_TRAINING to the KEYS_TO_PRESERVE array in src/libs/actions/App.ts (around line 122-145). This ensures that when clearOnyxAndResetApp() calls Onyx.clear(), the tooltip dismissal state is retained locally, eliminating both the race condition and any risk of losing pending writes.
This is consistent with how other user-preference NVPs like NVP_TRY_FOCUS_MODE and NVP_PREFERRED_LOCALE are already preserved in the same list.
What alternative solutions did you explore? (Optional)
Guard on undefined NVP state: Modify ProductTrainingContextProvider to suppress all tooltips when dismissedProductTraining is undefined (not just when isLoadingApp is true). This would close the race condition gap but wouldn't help if the API write is lost during sign-out.
Set isLoadingApp = true before Onyx.clear(): This would suppress tooltips during the entire clear-and-reload cycle, but it's a broader change that affects more than just product training tooltips.
Adding to KEYS_TO_PRESERVE is the most targeted and minimal fix — it matches how the codebase already handles similar NVP keys that should survive cache clears.
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, or @MelvinBot <your feedback> to refine this analysis.
Activity
melvin-bot commentedon Mar 4, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #82982
melvin-bot commentedon Mar 4, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Mar 4, 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:
melvin-bot commentedon Mar 4, 2026
Triggered auto assignment to @lydiabarclay (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.puneetlath commentedon Mar 4, 2026
I think we just need to add this to the BE whitelist. Not an app deploy blocker.
OSBotify commentedon Mar 4, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #82982 - "fix: add a tooltip to train users" by @daledah (High confidence)
Related Issues: #81737
Recommendation: REVERT
The tooltip dismissal state is not persisted through cache clear/restart operations, causing a poor user experience where users must repeatedly dismiss the same tooltip.
Labels: This issue is correctly labeled with
DeployBlockerCash. No label changes needed at this time.📋 Detailed Analysis
Evidence
PR #82982 added a new product training tooltip for the "Has" filter in the search filters page. The tooltip can be dismissed by users clicking the X button. The issue reports that after dismissing the tooltip and using "Clear cache and restart" (or relogin), the dismissed tooltip reappears.
Verification
The PR modifies the following relevant files:
src/components/ProductTrainingContext/TOOLTIPS.ts- AddedHAS_FILTER_NEGATIONtooltip configurationsrc/pages/Search/SearchAdvancedFiltersPage/SearchFiltersHasPage.tsx- Added the tooltip to the Has filter pagesrc/types/onyx/DismissedProductTraining.ts- Added the new tooltip typesrc/CONST/index.ts- Added the tooltip name constantThe PR introduces the exact feature mentioned in the bug report (tooltip on Has filter that should be dismissible).
Root Cause
When a user dismisses the tooltip, the app calls
dismissProductTraining()which:ONYXKEYS.NVP_DISMISSED_PRODUCT_TRAININGin local storageHowever, when "Clear cache and restart" is executed:
Onyx.clear(KEYS_TO_PRESERVE)insrc/libs/actions/App.tsONYXKEYS.NVP_DISMISSED_PRODUCT_TRAININGis NOT in theKEYS_TO_PRESERVEarray (lines 122-145 of App.ts)openApp()should fetch this data from the server, but there appears to be a timing issue or the data is not being properly restoredThe issue is reproducible because:
This is a Frontend bug because the fix requires changes to how the App handles dismissed product training state persistence, not a backend API issue.
mkhutornyi commentedon Mar 4, 2026
puneetlath commentedon Mar 4, 2026
I'll raise a BE PR.
MelvinBot commentedon Mar 4, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user dismisses the "Has" filter tooltip (introduced in PR #82982), the tooltip reappears after performing "Clear cache and restart" or relogging in. The dismissal should persist across these actions.
What is the root cause of that problem?
The tooltip dismissal is stored in the Onyx key
NVP_DISMISSED_PRODUCT_TRAINING(nvp_dismissedProductTraining). When dismissed, two things happen:src/libs/actions/Welcome/index.ts:152-168)API.write(DISMISS_PRODUCT_TRAINING)call is queued to persist the dismissal server-sideThe problem is that
NVP_DISMISSED_PRODUCT_TRAININGis not included in theKEYS_TO_PRESERVElist used byclearOnyxAndResetApp()(src/libs/actions/App.ts:122-145). When the user clears cache:Onyx.clear(KEYS_TO_PRESERVE)wipes the local dismissal state (line 765)IS_LOADING_APPis preserved asfalse(it's inKEYS_TO_PRESERVE)openApp()is called in a.then()chain (line 796), but before it runs and setsisLoadingApp = true, there's a window whereisLoadingAppisfalseanddismissedProductTrainingisundefinedshouldTooltipBeVisible()(src/components/ProductTrainingContext/index.tsx:129) checksisLoadingAppas a guard, but during this gap it passes through, andisProductTrainingElementDismissed()(src/libs/TooltipUtils.ts:4-5) returnsfalsebecause the value isundefinedFor the relogin path, the issue is more severe:
cleanupSession()callsPersistedRequests.clear(), which permanently wipes any pendingDismissProductTrainingAPI writes from the sequential queue. If the write hadn't been sent to the server yet, the dismissal is permanently lost — the server never learns about it, and subsequentOpenAppcalls won't include it.What changes do you think we should make in order to solve the problem?
Add
ONYXKEYS.NVP_DISMISSED_PRODUCT_TRAININGto theKEYS_TO_PRESERVEarray insrc/libs/actions/App.ts(around line 122-145). This ensures that whenclearOnyxAndResetApp()callsOnyx.clear(), the tooltip dismissal state is retained locally, eliminating both the race condition and any risk of losing pending writes.This is consistent with how other user-preference NVPs like
NVP_TRY_FOCUS_MODEandNVP_PREFERRED_LOCALEare already preserved in the same list.What alternative solutions did you explore? (Optional)
Guard on
undefinedNVP state: ModifyProductTrainingContextProviderto suppress all tooltips whendismissedProductTrainingisundefined(not just whenisLoadingAppistrue). This would close the race condition gap but wouldn't help if the API write is lost during sign-out.Set
isLoadingApp = truebeforeOnyx.clear(): This would suppress tooltips during the entire clear-and-reload cycle, but it's a broader change that affects more than just product training tooltips.Adding to
KEYS_TO_PRESERVEis the most targeted and minimal fix — it matches how the codebase already handles similar NVP keys that should survive cache clears.Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR, or@MelvinBot <your feedback>to refine this analysis.puneetlath commentedon Mar 4, 2026
BE PR is here: https://github.com/Expensify/Auth/pull/20255
puneetlath commentedon Mar 9, 2026
This is fixed.