Skip to content
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
44aa890
add ramOnlyKeys param to Onyx.init, remove initWithStoredValues
JKobrynski Feb 12, 2026
4436a4f
remove initWithStoredValues: true
JKobrynski Feb 12, 2026
8b95a3a
Merge branch 'main' into JKobrynski/feat/80091-migrate-keys-to-ram-on…
JKobrynski Feb 13, 2026
fe16418
add onyx migration for ram-only keys
JKobrynski Feb 13, 2026
b58c765
revert accidental Mobile-Expensify submodule pointer change
JKobrynski Feb 14, 2026
6844562
fix canBeMissing for IS_SEARCHING_FOR_REPORTS to true
JKobrynski Feb 14, 2026
de91bc0
Merge branch 'main' into JKobrynski/feat/80091-migrate-keys-to-ram-on…
JKobrynski Feb 16, 2026
d4c0ac6
fix typo in migration log message
JKobrynski Feb 16, 2026
626d598
address review comments
JKobrynski Feb 16, 2026
93bd301
Merge remote-tracking branch 'origin/main' into JKobrynski/feat/80091…
JKobrynski Feb 17, 2026
4a8d2dc
Merge branch 'main' into JKobrynski/feat/80091-migrate-keys-to-ram-on…
JKobrynski Mar 2, 2026
2ce3734
remove ram-only onyx migration
JKobrynski Mar 2, 2026
97a936f
Merge branch 'main' into JKobrynski/feat/80091-migrate-keys-to-ram-on…
JKobrynski Mar 2, 2026
d6f1594
Merge remote-tracking branch 'upstream/main' into JKobrynski/feat/800…
JKobrynski Mar 2, 2026
7370001
remove initWithStoredValues from remaining IS_SEARCHING_FOR_REPORTS
JKobrynski Mar 3, 2026
5666ab1
Merge branch 'main' into JKobrynski/feat/80091-migrate-keys-to-ram-on…
JKobrynski Mar 3, 2026
5f9fcbd
add RAM_ONLY_ prefix to RAM-only keys
JKobrynski Mar 3, 2026
e74b1a5
Merge remote-tracking branch 'upstream/main' into JKobrynski/feat/800…
JKobrynski Mar 3, 2026
01634ee
fix failing test, add explanation
JKobrynski Mar 4, 2026
bb51ecb
Merge remote-tracking branch 'origin/main' into JKobrynski/feat/80091…
JKobrynski Mar 6, 2026
9bb37d2
fix race condition
JKobrynski Mar 9, 2026
c9a31c1
Merge remote-tracking branch 'origin/main' into JKobrynski/feat/80091…
JKobrynski Mar 10, 2026
b705408
Merge remote-tracking branch 'origin/main' into JKobrynski/feat/80091…
JKobrynski Mar 10, 2026
d2d2d67
apply fix suggested by reviewer
JKobrynski Mar 12, 2026
f68144f
handle rejected Linking.getInitialUrl, add timeout
JKobrynski Mar 12, 2026
be3f346
add a stale closure guard
JKobrynski Mar 12, 2026
1d287dd
add more documentation to the safety-net
JKobrynski Mar 12, 2026
4e9b00c
Merge remote-tracking branch 'origin/main' into JKobrynski/feat/80091…
JKobrynski Mar 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Expensify.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ function Expensify() {
const {preferredLocale} = useLocalize();
const [accountID] = useOnyx(ONYXKEYS.SESSION, {selector: accountIDSelector});
const [lastRoute] = useOnyx(ONYXKEYS.LAST_ROUTE);
const [isCheckingPublicRoom = true] = useOnyx(ONYXKEYS.IS_CHECKING_PUBLIC_ROOM, {initWithStoredValues: false});
const [updateAvailable] = useOnyx(ONYXKEYS.UPDATE_AVAILABLE, {initWithStoredValues: false});
const [updateRequired] = useOnyx(ONYXKEYS.UPDATE_REQUIRED, {initWithStoredValues: false});
const [isCheckingPublicRoom = true] = useOnyx(ONYXKEYS.IS_CHECKING_PUBLIC_ROOM);
const [updateAvailable] = useOnyx(ONYXKEYS.UPDATE_AVAILABLE);
const [updateRequired] = useOnyx(ONYXKEYS.UPDATE_REQUIRED);
const [lastVisitedPath] = useOnyx(ONYXKEYS.LAST_VISITED_PATH);

useDebugShortcut();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function UserSelectPopup({value, closeOverlay, onChange, isSearchable}: UserSele
const [countryCode = CONST.DEFAULT_COUNTRY_CODE] = useOnyx(ONYXKEYS.COUNTRY_CODE);
const [loginList] = useOnyx(ONYXKEYS.LOGIN_LIST);
const [searchTerm, setSearchTerm] = useState('');
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS);

const getInitialSelectedIDs = useCallback(() => {
return value.reduce<Set<string>>((acc, id) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Search/SearchFiltersChatsSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function SearchFiltersChatsSelector({initialReportIDs, onFiltersUpdate, isScreen
const currentUserAccountID = currentUserPersonalDetails.accountID;
const currentUserEmail = currentUserPersonalDetails.email ?? '';

const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS);
const reportAttributesDerived = useReportAttributes();
const [selectedReportIDs, setSelectedReportIDs] = useState<string[]>(initialReportIDs);
const [searchTerm, debouncedSearchTerm, setSearchTerm] = useDebouncedState('');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function SearchFiltersParticipantsSelector({initialAccountIDs, onFiltersUpdate,
const {options, areOptionsInitialized} = useOptionsList({
shouldInitialize: didScreenTransitionEnd,
});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS);
const reportAttributesDerived = useReportAttributes();
const [countryCode = CONST.DEFAULT_COUNTRY_CODE] = useOnyx(ONYXKEYS.COUNTRY_CODE);
const [loginList] = useOnyx(ONYXKEYS.LOGIN_LIST);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Search/SearchRouter/SearchRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function SearchRouter({onRouterClose, shouldHideInputCaret, isSearchRouterDispla
const {setShouldResetSearchQuery} = useSearchActionsContext();
const currentUserPersonalDetails = useCurrentUserPersonalDetails();
const currentUserAccountID = currentUserPersonalDetails.accountID;
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS);
const personalDetails = usePersonalDetails();
const [reports] = useOnyx(ONYXKEYS.COLLECTION.REPORT);
const [policies] = useOnyx(ONYXKEYS.COLLECTION.POLICY);
Expand Down
5 changes: 1 addition & 4 deletions src/pages/EnablePayments/OnfidoStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ import OnfidoPrivacy from './OnfidoPrivacy';

function OnfidoStep() {
const {translate} = useLocalize();
const [walletOnfidoData] = useOnyx(ONYXKEYS.WALLET_ONFIDO, {
// Let's get a new onfido token each time the user hits this flow (as it should only be once)
initWithStoredValues: false,
});
const [walletOnfidoData] = useOnyx(ONYXKEYS.WALLET_ONFIDO);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep Onfido flow from reusing cached walletOnfido data

Removing initWithStoredValues: false here makes OnfidoStep hydrate immediately from any existing walletOnfido value. That key is not cleared when the user exits this flow (it is only reset when openOnfidoFlow() runs in src/libs/actions/Wallet.ts after pressing Continue), so re-entering Enable Payments in the same app session can reuse stale hasAcceptedPrivacyPolicy/sdkToken and skip the privacy screen, leading to verification attempts with expired Onfido tokens instead of fetching a fresh token per attempt.

Useful? React with 👍 / 👎.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This key was migrated to a RAM-only key, so it will never read stale values from storage.


const shouldShowOnfido = walletOnfidoData?.hasAcceptedPrivacyPolicy && !walletOnfidoData?.isLoading && !walletOnfidoData?.errors && walletOnfidoData?.sdkToken;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function VerifyIdentity() {
const styles = useThemeStyles();
const {translate} = useLocalize();
const illustrations = useMemoizedLazyIllustrations(['ToddBehindCloud']);
const [walletOnfidoData] = useOnyx(ONYXKEYS.WALLET_ONFIDO, {initWithStoredValues: false});
const [walletOnfidoData] = useOnyx(ONYXKEYS.WALLET_ONFIDO);

const handleOnfidoSuccess = useCallback(
(onfidoData: OnfidoData) => {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/NewChatPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ function NewChatPage({ref}: NewChatPageProps) {
const personalData = useCurrentUserPersonalDetails();
const currentUserAccountID = personalData.accountID;
const {top} = useSafeAreaInsets();
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS);
const selectionListRef = useRef<SelectionListWithSectionsHandle | null>(null);
const [reportAttributesDerived] = useOnyx(ONYXKEYS.DERIVED.REPORT_ATTRIBUTES, {
selector: reportsSelector,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function BaseOnboardingWorkspaceInvite({shouldUseNativeStyles}: BaseOnboardingWo
// eslint-disable-next-line rulesdir/prefer-shouldUseNarrowLayout-instead-of-isSmallScreenWidth
const {onboardingIsMediumOrLargerScreenWidth, isSmallScreenWidth} = useResponsiveLayout();
const [didScreenTransitionEnd, setDidScreenTransitionEnd] = useState(false);
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS);
const [countryCode = CONST.DEFAULT_COUNTRY_CODE] = useOnyx(ONYXKEYS.COUNTRY_CODE);
const [personalDetails] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST);
const [account] = useOnyx(ONYXKEYS.ACCOUNT);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/RoomInvitePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function RoomInvitePage({
const currentUserEmail = currentUserPersonalDetails.email ?? '';
const [searchTerm, debouncedSearchTerm, setSearchTerm] = useDebouncedState(userSearchPhrase ?? '');
const [selectedOptions, setSelectedOptions] = useState<OptionData[]>([]);
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS);
const isReportArchived = useReportIsArchived(report.reportID);
const [nvpDismissedProductTraining] = useOnyx(ONYXKEYS.NVP_DISMISSED_PRODUCT_TRAINING);

Expand Down
2 changes: 1 addition & 1 deletion src/pages/Share/ShareTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function ShareTab({ref}: ShareTabProps) {

const {options, areOptionsInitialized} = useOptionsList();
const {didScreenTransitionEnd} = useScreenWrapperTransitionStatus();
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS);

const offlineMessage: string = isOffline ? `${translate('common.youAppearToBeOffline')} ${translate('search.resultsAreLimited')}` : '';
const showLoadingPlaceholder = !areOptionsInitialized || !didScreenTransitionEnd;
Expand Down
2 changes: 1 addition & 1 deletion src/pages/domain/Admins/DomainAddAdminPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function DomainAddAdminPage({route}: DomainAddAdminProps) {
const {translate} = useLocalize();

const [countryCode = CONST.DEFAULT_COUNTRY_CODE] = useOnyx(ONYXKEYS.COUNTRY_CODE);
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS);
const [domainEmail] = useOnyx(`${ONYXKEYS.COLLECTION.DOMAIN}${domainAccountID}`, {
selector: domainEmailSelector,
});
Expand Down
2 changes: 1 addition & 1 deletion src/pages/iou/request/MoneyRequestAccountantSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function MoneyRequestAccountantSelector({onFinish, onAccountantSelected, iouType
const {didScreenTransitionEnd} = useScreenWrapperTransitionStatus();
const [countryCode = CONST.DEFAULT_COUNTRY_CODE] = useOnyx(ONYXKEYS.COUNTRY_CODE);
const [betas] = useOnyx(ONYXKEYS.BETAS);
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS);
const {options, areOptionsInitialized} = useOptionsList({
shouldInitialize: didScreenTransitionEnd,
});
Expand Down
2 changes: 1 addition & 1 deletion src/pages/iou/request/MoneyRequestAttendeeSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function MoneyRequestAttendeeSelector({attendees = [], onFinish, onAttendeesAdde
const [activePolicyID] = useOnyx(ONYXKEYS.NVP_ACTIVE_POLICY_ID);
const [recentAttendees] = useOnyx(ONYXKEYS.NVP_RECENT_ATTENDEES);
const policy = usePolicy(activePolicyID);
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS);
const reportAttributesDerived = useReportAttributes();
const offlineMessage: string = isOffline ? `${translate('common.youAppearToBeOffline')} ${translate('search.resultsAreLimited')}` : '';
const [loginList] = useOnyx(ONYXKEYS.LOGIN_LIST);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ function MoneyRequestParticipantsSelector({
const [activePolicyID] = useOnyx(ONYXKEYS.NVP_ACTIVE_POLICY_ID);
const [allPolicies] = useOnyx(ONYXKEYS.COLLECTION.POLICY);
const policy = allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${activePolicyID}`];
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS);
const currentUserPersonalDetails = useCurrentUserPersonalDetails();
const currentUserLogin = currentUserPersonalDetails.login;
const currentUserEmail = currentUserPersonalDetails.email ?? '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import ROUTES from '@src/ROUTES';
function AddDelegatePage() {
const {translate} = useLocalize();
const styles = useThemeStyles();
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS);
const [account] = useOnyx(ONYXKEYS.ACCOUNT);
const [countryCode = CONST.DEFAULT_COUNTRY_CODE] = useOnyx(ONYXKEYS.COUNTRY_CODE);
const existingDelegates =
Expand Down
2 changes: 1 addition & 1 deletion src/pages/tasks/TaskAssigneeSelectorModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function TaskAssigneeSelectorModal() {
const backTo = route.params?.backTo;
const [reports] = useOnyx(ONYXKEYS.COLLECTION.REPORT);
const [task] = useOnyx(ONYXKEYS.TASK);
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS);
const [countryCode = CONST.DEFAULT_COUNTRY_CODE] = useOnyx(ONYXKEYS.COUNTRY_CODE);
const currentUserPersonalDetails = useCurrentUserPersonalDetails();
const currentUserEmail = currentUserPersonalDetails.email ?? '';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/tasks/TaskShareDestinationSelectorModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function TaskShareDestinationSelectorModal() {
const styles = useThemeStyles();
const {translate} = useLocalize();
const {isOffline} = useNetwork();
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS);
const [countryCode = CONST.DEFAULT_COUNTRY_CODE] = useOnyx(ONYXKEYS.COUNTRY_CODE);

const {searchTerm, debouncedSearchTerm, setSearchTerm, availableOptions, areOptionsInitialized, onListEndReached} = useSearchSelector({
Expand Down
2 changes: 1 addition & 1 deletion src/pages/workspace/WorkspaceInvitePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function WorkspaceInvitePage({route, policy}: WorkspaceInvitePageProps) {
const styles = useThemeStyles();
const {translate} = useLocalize();
const [didScreenTransitionEnd, setDidScreenTransitionEnd] = useState(false);
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS);
const [countryCode = CONST.DEFAULT_COUNTRY_CODE] = useOnyx(ONYXKEYS.COUNTRY_CODE);
const [invitedEmailsToAccountIDsDraft] = useOnyx(`${ONYXKEYS.COLLECTION.WORKSPACE_INVITE_MEMBERS_DRAFT}${route.params.policyID}`);
const [personalDetails] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function AssigneeStep({route}: AssigneeStepProps) {
const [personalDetails] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST);
const [account] = useOnyx(ONYXKEYS.ACCOUNT);
const [didScreenTransitionEnd, setDidScreenTransitionEnd] = useState(false);
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS);

const ineligibleInvites = getIneligibleInvitees(policy?.employeeList);
const excludedUsers: Record<string, boolean> = {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function AssigneeStep({policy, stepNames, startStepIndex, route}: AssigneeStepPr
const [personalDetails] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST);
const [account] = useOnyx(ONYXKEYS.ACCOUNT);
const [didScreenTransitionEnd, setDidScreenTransitionEnd] = useState(false);
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS);

const ineligibleInvites = getIneligibleInvitees(policy?.employeeList);
const excludedUsers: Record<string, boolean> = {};
Expand Down
1 change: 1 addition & 0 deletions src/setup/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export default function () {
},
skippableCollectionMemberIDs: CONST.SKIPPABLE_COLLECTION_MEMBER_IDS,
snapshotMergeKeys: ['pendingAction', 'pendingFields'],
ramOnlyKeys: [ONYXKEYS.IS_CHECKING_PUBLIC_ROOM, ONYXKEYS.UPDATE_AVAILABLE, ONYXKEYS.UPDATE_REQUIRED, ONYXKEYS.IS_SEARCHING_FOR_REPORTS, ONYXKEYS.WALLET_ONFIDO],
});

initOnyxDerivedValues();
Expand Down
Loading