From 1e0bfcb1ff20f62d6755f27b98f604c4d840ecdc Mon Sep 17 00:00:00 2001 From: OSBotify Date: Thu, 30 Apr 2026 01:13:28 +0000 Subject: [PATCH 1/7] Update version to 9.3.64-23 (cherry picked from commit 50ba05f849506e4b4ec5b734428c8d51eaace294) (cherry-picked to staging by luacmartins) --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 2 +- ios/NotificationServiceExtension/Info.plist | 2 +- ios/ShareViewController/Info.plist | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index a668dc271a1c..e59faae845dd 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -111,8 +111,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1009036422 - versionName "9.3.64-22" + versionCode 1009036423 + versionName "9.3.64-23" // Supported language variants must be declared here to avoid from being removed during the compilation. // This also helps us to not include unnecessary language variants in the APK. resConfigs "en", "es" diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index e7e103fa3741..3a2a82e0c9ed 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -44,7 +44,7 @@ CFBundleVersion - 9.3.64.22 + 9.3.64.23 FullStory OrgId diff --git a/ios/NotificationServiceExtension/Info.plist b/ios/NotificationServiceExtension/Info.plist index b9d6c165e28d..9c06a1489a50 100644 --- a/ios/NotificationServiceExtension/Info.plist +++ b/ios/NotificationServiceExtension/Info.plist @@ -13,7 +13,7 @@ CFBundleShortVersionString 9.3.64 CFBundleVersion - 9.3.64.22 + 9.3.64.23 NSExtension NSExtensionPointIdentifier diff --git a/ios/ShareViewController/Info.plist b/ios/ShareViewController/Info.plist index 86b4574267a3..cb6ad31106a2 100644 --- a/ios/ShareViewController/Info.plist +++ b/ios/ShareViewController/Info.plist @@ -13,7 +13,7 @@ CFBundleShortVersionString 9.3.64 CFBundleVersion - 9.3.64.22 + 9.3.64.23 NSExtension NSExtensionAttributes diff --git a/package-lock.json b/package-lock.json index 2cf19f9472d8..9becdbe061e1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "9.3.64-22", + "version": "9.3.64-23", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "9.3.64-22", + "version": "9.3.64-23", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 318bedfd6e78..f69633233641 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "9.3.64-22", + "version": "9.3.64-23", "author": "Expensify, Inc.", "homepage": "https://new.expensify.com", "description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.", From 2e3886cfdcf650223e4bb43c5d3cb938dbca04d8 Mon Sep 17 00:00:00 2001 From: OSBotify Date: Thu, 30 Apr 2026 01:14:10 +0000 Subject: [PATCH 2/7] Update Mobile-Expensify submodule version to 9.3.64-23 --- Mobile-Expensify | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mobile-Expensify b/Mobile-Expensify index 698ecdaf4cac..9c1b00d52397 160000 --- a/Mobile-Expensify +++ b/Mobile-Expensify @@ -1 +1 @@ -Subproject commit 698ecdaf4cac930bcaddefd91748621071b429ca +Subproject commit 9c1b00d52397c89837e2440b70197c2749ee5731 From f6f1a7a2ec64085df8aad861852438c3f266e0c4 Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Wed, 29 Apr 2026 18:19:06 -0600 Subject: [PATCH 3/7] Merge pull request #89212 from software-mansion-labs/kuba_nowakowski/bugfix/89069-context-menu-mark-as-unread migrate wait callback to reanimated (cherry picked from commit 7e05534e5c123a8557d75d03ce6309b38982477c) --- .../PopoverReportActionContextMenu.tsx | 40 ++++++++++--- .../ContextMenu/ReportActionContextMenu.ts | 60 ++++++++++++------- 2 files changed, 71 insertions(+), 29 deletions(-) diff --git a/src/pages/inbox/report/ContextMenu/PopoverReportActionContextMenu.tsx b/src/pages/inbox/report/ContextMenu/PopoverReportActionContextMenu.tsx index c918824154a3..b211c4ec3ea7 100644 --- a/src/pages/inbox/report/ContextMenu/PopoverReportActionContextMenu.tsx +++ b/src/pages/inbox/report/ContextMenu/PopoverReportActionContextMenu.tsx @@ -4,6 +4,8 @@ import React, {useCallback, useEffect, useImperativeHandle, useRef, useState} fr import type {EmitterSubscription, GestureResponderEvent, NativeTouchEvent, View} from 'react-native'; import {DeviceEventEmitter, Dimensions, InteractionManager} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; +import {cancelAnimation, useSharedValue, withTiming} from 'react-native-reanimated'; +import {scheduleOnRN} from 'react-native-worklets'; import {Actions, useActionSheetAwareScrollViewActions} from '@components/ActionSheetAwareScrollView'; import ConfirmModal from '@components/ConfirmModal'; import PopoverWithMeasuredContent from '@components/PopoverWithMeasuredContent'; @@ -77,6 +79,8 @@ function PopoverReportActionContextMenu({ref}: PopoverReportActionContextMenuPro const {email, accountID: currentUserAccountID} = useCurrentUserPersonalDetails(); const [isPopoverVisible, setIsPopoverVisible] = useState(false); + // UI-thread timer driving the delayed hide. https://github.com/Expensify/App/issues/89069 + const hideDelayProgress = useSharedValue(0); const [isDeleteCommentConfirmModalVisible, setIsDeleteCommentConfirmModalVisible] = useState(false); const [shouldSetModalVisibilityForDeleteConfirmation, setShouldSetModalVisibilityForDeleteConfirmation] = useState(true); @@ -183,6 +187,7 @@ function PopoverReportActionContextMenu({ref}: PopoverReportActionContextMenuPro * @param isUnreadChat - Flag to check if the chat is unread in the LHN. Used for the Mark as Read/Unread action */ const showContextMenu: ReportActionContextMenu['showContextMenu'] = (showContextMenuParams) => { + cancelAnimation(hideDelayProgress); const { type, event, @@ -295,13 +300,7 @@ function PopoverReportActionContextMenu({ref}: PopoverReportActionContextMenuPro * Hide the ReportActionContextMenu modal popover. * @param onHideActionCallback Callback to be called after popover is completely hidden */ - const hideContextMenu: ReportActionContextMenu['hideContextMenu'] = (hideContextMenuParams) => { - const {callbacks = {}} = hideContextMenuParams ?? {}; - - if (typeof callbacks.onHide === 'function') { - onPopoverHideActionCallback.current = callbacks.onHide; - } - + const performHide = () => { selectionRef.current = ''; reportActionDraftMessageRef.current = undefined; setIsPopoverVisible(false); @@ -315,6 +314,33 @@ function PopoverReportActionContextMenu({ref}: PopoverReportActionContextMenuPro }); }; + const hideContextMenu: ReportActionContextMenu['hideContextMenu'] = (hideContextMenuParams) => { + const {callbacks = {}, hideDelayMs} = hideContextMenuParams ?? {}; + + if (typeof callbacks.onHide === 'function') { + onPopoverHideActionCallback.current = callbacks.onHide; + } + + cancelAnimation(hideDelayProgress); + + if (!hideDelayMs || hideDelayMs <= 0) { + performHide(); + return; + } + + // UI-thread delayed hide. https://github.com/Expensify/App/issues/89069 + hideDelayProgress.set(0); + hideDelayProgress.set( + withTiming(1, {duration: hideDelayMs}, (finished) => { + 'worklet'; + + if (finished) { + scheduleOnRN(performHide); + } + }), + ); + }; + const transactionIDs: string[] = []; if (isMoneyRequestAction(reportActionRef.current)) { const originalMessage = getOriginalMessage(reportActionRef.current); diff --git a/src/pages/inbox/report/ContextMenu/ReportActionContextMenu.ts b/src/pages/inbox/report/ContextMenu/ReportActionContextMenu.ts index 2da4ac2bbffc..e39ddc241275 100644 --- a/src/pages/inbox/report/ContextMenu/ReportActionContextMenu.ts +++ b/src/pages/inbox/report/ContextMenu/ReportActionContextMenu.ts @@ -52,6 +52,9 @@ type HideContextMenuParams = { callbacks?: { onHide?: () => void; }; + /** Delay before hiding (ms). Run on the UI thread via Reanimated. + * https://github.com/Expensify/App/issues/89069 */ + hideDelayMs?: number; }; type HideContextMenu = (params?: HideContextMenuParams) => void; @@ -71,9 +74,24 @@ type ReportActionContextMenu = { const contextMenuRef = React.createRef(); +// Retry budget for waiting on the lazy-mounted popover ref. +// 10 attempts × ~16ms ≈ 160ms total, enough to cover React.lazy chunk load + commit +// on a cold start without blocking user interaction for long. +const MAX_CONTEXT_MENU_MOUNT_RETRIES = 10; +const CONTEXT_MENU_MOUNT_RETRY_INTERVAL_MS = 16; + +// Bridge used when PopoverReportActionContextMenu is lazy-mounted: lets showContextMenu +// trigger eager mount if the user interacts before the idle-deferred mount runs. +let ensureContextMenuMounted: (() => void) | null = null; + +function registerEnsureContextMenuMounted(handler: (() => void) | null) { + ensureContextMenuMounted = handler; +} + +// How long the success icon (Checkmark / "Copied!") stays visible before the menu hides. +const SUCCESS_STATE_HIDE_DELAY_MS = 800; /** * Hide the ReportActionContextMenu modal popover. - * Hides the popover menu with an optional delay * @param [shouldDelay] - whether the menu should close after a delay * @param [onHideCallback] - Callback to be called after Context Menu is completely hidden */ @@ -82,30 +100,14 @@ function hideContextMenu(shouldDelay?: boolean, onHideCallback = () => {}, param return; } - const paramsWithCallback = { + contextMenuRef.current.hideContextMenu({ + ...params, callbacks: { ...params?.callbacks, onHide: onHideCallback, }, - ...params, - }; - - if (!shouldDelay) { - contextMenuRef.current.hideContextMenu(paramsWithCallback); - return; - } - - // Save the active instanceID for which hide action was called. - // If menu is being closed with a delay, check that whether the same instance exists or a new was created. - // If instance is not same, cancel the hide action - const instanceID = contextMenuRef.current.instanceIDRef.current; - setTimeout(() => { - if (contextMenuRef.current?.instanceIDRef.current !== instanceID) { - return; - } - - contextMenuRef.current.hideContextMenu(paramsWithCallback); - }, 800); + ...(shouldDelay ? {hideDelayMs: SUCCESS_STATE_HIDE_DELAY_MS} : {}), + }); } /** @@ -128,6 +130,20 @@ function hideContextMenu(shouldDelay?: boolean, onHideCallback = () => {}, param */ function showContextMenu(showContextMenuParams: ShowContextMenuParams) { if (!contextMenuRef.current) { + // Popover is lazy-mounted; trigger eager mount and retry until the ref is populated + // so a fast cold-start interaction isn't silently dropped. + ensureContextMenuMounted?.(); + let retries = MAX_CONTEXT_MENU_MOUNT_RETRIES; + const attempt = () => { + if (contextMenuRef.current) { + showContextMenu(showContextMenuParams); + return; + } + if (retries-- > 0) { + setTimeout(attempt, CONTEXT_MENU_MOUNT_RETRY_INTERVAL_MS); + } + }; + attempt(); return; } const show = () => { @@ -182,5 +198,5 @@ function clearActiveReportAction() { return contextMenuRef.current.clearActiveReportAction(); } -export {contextMenuRef, showContextMenu, hideContextMenu, isActiveReportAction, clearActiveReportAction, showDeleteModal, hideDeleteModal}; +export {contextMenuRef, showContextMenu, hideContextMenu, isActiveReportAction, clearActiveReportAction, showDeleteModal, hideDeleteModal, registerEnsureContextMenuMounted}; export type {ContextMenuType, ReportActionContextMenu, ContextMenuAnchor}; From 7e0d3b024319fe4cd8151c18e138b77cd749c78f Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Wed, 29 Apr 2026 18:19:06 -0600 Subject: [PATCH 4/7] Merge pull request #89212 from software-mansion-labs/kuba_nowakowski/bugfix/89069-context-menu-mark-as-unread migrate wait callback to reanimated (cherry picked from commit 7e05534e5c123a8557d75d03ce6309b38982477c) (cherry-picked to staging by luacmartins) --- src/pages/inbox/report/ContextMenu/ReportActionContextMenu.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/inbox/report/ContextMenu/ReportActionContextMenu.ts b/src/pages/inbox/report/ContextMenu/ReportActionContextMenu.ts index e39ddc241275..9aff6d7013b5 100644 --- a/src/pages/inbox/report/ContextMenu/ReportActionContextMenu.ts +++ b/src/pages/inbox/report/ContextMenu/ReportActionContextMenu.ts @@ -90,6 +90,7 @@ function registerEnsureContextMenuMounted(handler: (() => void) | null) { // How long the success icon (Checkmark / "Copied!") stays visible before the menu hides. const SUCCESS_STATE_HIDE_DELAY_MS = 800; + /** * Hide the ReportActionContextMenu modal popover. * @param [shouldDelay] - whether the menu should close after a delay From d13c165c20d55130f8b4873caeb695d76abd5ee8 Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Wed, 29 Apr 2026 19:45:10 -0600 Subject: [PATCH 5/7] resolve conflict --- .../ContextMenu/ReportActionContextMenu.ts | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/src/pages/inbox/report/ContextMenu/ReportActionContextMenu.ts b/src/pages/inbox/report/ContextMenu/ReportActionContextMenu.ts index 9aff6d7013b5..74bd02a8f26b 100644 --- a/src/pages/inbox/report/ContextMenu/ReportActionContextMenu.ts +++ b/src/pages/inbox/report/ContextMenu/ReportActionContextMenu.ts @@ -74,12 +74,6 @@ type ReportActionContextMenu = { const contextMenuRef = React.createRef(); -// Retry budget for waiting on the lazy-mounted popover ref. -// 10 attempts × ~16ms ≈ 160ms total, enough to cover React.lazy chunk load + commit -// on a cold start without blocking user interaction for long. -const MAX_CONTEXT_MENU_MOUNT_RETRIES = 10; -const CONTEXT_MENU_MOUNT_RETRY_INTERVAL_MS = 16; - // Bridge used when PopoverReportActionContextMenu is lazy-mounted: lets showContextMenu // trigger eager mount if the user interacts before the idle-deferred mount runs. let ensureContextMenuMounted: (() => void) | null = null; @@ -131,20 +125,6 @@ function hideContextMenu(shouldDelay?: boolean, onHideCallback = () => {}, param */ function showContextMenu(showContextMenuParams: ShowContextMenuParams) { if (!contextMenuRef.current) { - // Popover is lazy-mounted; trigger eager mount and retry until the ref is populated - // so a fast cold-start interaction isn't silently dropped. - ensureContextMenuMounted?.(); - let retries = MAX_CONTEXT_MENU_MOUNT_RETRIES; - const attempt = () => { - if (contextMenuRef.current) { - showContextMenu(showContextMenuParams); - return; - } - if (retries-- > 0) { - setTimeout(attempt, CONTEXT_MENU_MOUNT_RETRY_INTERVAL_MS); - } - }; - attempt(); return; } const show = () => { From db98129946f94b15579543a086387bd36a1ceb61 Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Wed, 29 Apr 2026 19:46:29 -0600 Subject: [PATCH 6/7] rm code not in staging --- .../inbox/report/ContextMenu/ReportActionContextMenu.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/pages/inbox/report/ContextMenu/ReportActionContextMenu.ts b/src/pages/inbox/report/ContextMenu/ReportActionContextMenu.ts index 74bd02a8f26b..82ea5a6d2d7a 100644 --- a/src/pages/inbox/report/ContextMenu/ReportActionContextMenu.ts +++ b/src/pages/inbox/report/ContextMenu/ReportActionContextMenu.ts @@ -74,14 +74,6 @@ type ReportActionContextMenu = { const contextMenuRef = React.createRef(); -// Bridge used when PopoverReportActionContextMenu is lazy-mounted: lets showContextMenu -// trigger eager mount if the user interacts before the idle-deferred mount runs. -let ensureContextMenuMounted: (() => void) | null = null; - -function registerEnsureContextMenuMounted(handler: (() => void) | null) { - ensureContextMenuMounted = handler; -} - // How long the success icon (Checkmark / "Copied!") stays visible before the menu hides. const SUCCESS_STATE_HIDE_DELAY_MS = 800; From 1fe571f0d30fa1ab7571b65f208d2a21bbc4509e Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Wed, 29 Apr 2026 19:47:18 -0600 Subject: [PATCH 7/7] rm export --- src/pages/inbox/report/ContextMenu/ReportActionContextMenu.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/inbox/report/ContextMenu/ReportActionContextMenu.ts b/src/pages/inbox/report/ContextMenu/ReportActionContextMenu.ts index 82ea5a6d2d7a..51a2a8af960c 100644 --- a/src/pages/inbox/report/ContextMenu/ReportActionContextMenu.ts +++ b/src/pages/inbox/report/ContextMenu/ReportActionContextMenu.ts @@ -171,5 +171,5 @@ function clearActiveReportAction() { return contextMenuRef.current.clearActiveReportAction(); } -export {contextMenuRef, showContextMenu, hideContextMenu, isActiveReportAction, clearActiveReportAction, showDeleteModal, hideDeleteModal, registerEnsureContextMenuMounted}; +export {contextMenuRef, showContextMenu, hideContextMenu, isActiveReportAction, clearActiveReportAction, showDeleteModal, hideDeleteModal}; export type {ContextMenuType, ReportActionContextMenu, ContextMenuAnchor};