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
Version Number: 9.4.25-1 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:https://github.com/Expensify/Mobile-Expensify/pull/13987 Email or phone of affected tester (no customers):applausetester+ap3@applause.expensifail.com Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: Samsung a31 App Component: Other
Action Performed:
Log in with a new Expensify account that is using Classic (OldDot).
Sign in to the same account on another device.
Send a message from the second device to the first device.
Wait for the push notification to arrive on the first device.
Tap the push notification.
Expected Result:
The push notification opens the conversation in the NewDot single-entry experience. Pressing Back returns the user to OldDot.
Actual Result:
After tapping the push notification, the app remains in the OldDot experience instead of opening the conversation in NewDot as expected by the PR.
Root Cause: The decision to open a tapped push notification in the NewDot "single-entry" experience (vs. staying in OldDot) is made on the native OldDot side (Mobile-Expensify) — not in this repo. The App (NewDot) code deliberately defers to native for this flow: when the single-entry flag is set, App's own push handler explicitly skips navigation and relies on the native-provided initial URL to open the report. So if the app "stays in OldDot," the native notification-tap handler never initiated the NewDot single-entry transition (never set the flag / initial report URL), which means the App side never gets a chance to display the conversation.
This is not fixable in Expensify/App. The routing logic lives in the private Mobile-Expensify native code (the feature's source PR, Expensify/Mobile-Expensify#13987). This needs an internal engineer with access to Mobile-Expensify to investigate the native notification-tap handler that is supposed to launch the single-entry NewDot experience.
Investigation details & evidence
How the single-entry notification flow is split between the two apps:
App JS deliberately does NOT route the tap when in the single-entry flow. In subscribeToPushNotifications.ts:123, the report-comment tap handler returns early when isSingleNewDotEntry is true — with the comment "the navigation is handled elsewhere… we cancel here to prevent double navigation." "Elsewhere" is the native-provided initial URL.
The report deep-link and the isSingleNewDotEntry flag both come from native. On HybridApp, Linking.getInitialURL is replaced by the native HybridAppModule.getInitialURL(), and the HYBRID_APP Onyx object (including isSingleNewDotEntry) is parsed from native getHybridAppSettings() — see src/libs/actions/HybridApp/index.ts. App is a consumer of these native-set values.
The only single-entry piece App owns is the Back → OldDot handoff.ScreenWrapper/index.tsx uses usePreventRemove to call closeReactNativeApp() (a native call) when the user presses Back on the single-entry report. This is unrelated to the forward-routing failure reported here.
Failure flow: For the report to open, native OldDot must (a) parse the notification's reportID, (b) start the NewDot transition, (c) set isSingleNewDotEntry: true, and (d) set the initial URL to the report route. "Stays in OldDot" indicates the native handler never performed step (a)/(b) — a native-only code path.
Note on an alternative: If native did set isSingleNewDotEntry but not an initial report URL, App would still skip navigation and land on a blank/home NewDot screen — but that would present as an empty NewDot, not "stays in OldDot," so it's a weaker fit. Either way the fix is native.
Confidence: Medium-High on the location (App code unambiguously defers to native). Precise native failure point can't be pinned down without the Mobile-Expensify code / device logs.
Logs that would confirm: on an affected device, check for [PushNotification] Not navigating because this is a singleNewDotEntry flow / [PushNotification] Navigating to report. Absence of any [PushNotification] NewDot log after a tap confirms native never handed off to NewDot.
Next Steps: This requires a fix in Mobile-Expensify (native), which MelvinBot can't access. An internal engineer should investigate the native notification-tap handler introduced in Expensify/Mobile-Expensify#13987. Reply with @MelvinBot <feedback> to refine this analysis.
🚨 Edited by proposal-police: This proposal was edited at 2026-07-01 13:24:48 UTC.
Proposal
What is the root cause of that problem?
In HybridApp, only the native OldDot layer can bring the NewDot (React Native) surface to the foreground. NewDot never launches or foregrounds itself — it can only react to a launch that OldDot has already performed. Two facts in the App codebase prove this:
The bridge that App uses to talk to OldDot (@expensify/react-native-hybrid-app) exposes no "open/foreground NewDot" method. The only entry points NewDot has into the transition are read-only handoffs that native calls when it has already decided to show NewDot — the initial deep link and the hybrid settings blob:
Linking.getInitialURL is shadowed to read whatever URL native handed over:
// On HybridApp we need to shadow official implementation of Linking.getInitialURL on NewDot side with our custom implementation.
// Main benefit from this approach is that our deeplink-related code can be implemented the same way for both standalone NewDot and HybridApp.
// It's not possible to use the official implementation from the Linking module because the way OldDot handles deeplinks is significantly different from a standard React Native app.
NewDot's own push-notification tap handler is deliberately passive for this flow. navigateToReport only calls Navigation.navigate on the RN stack — which does nothing visible while OldDot is on screen — and for the single-entry case it explicitly bails out, delegating the actual entry to native + the initial URL:
// When transitioning to the new experience via the singleNewDotEntry flow, the navigation// is handled elsewhere. So we cancel here to prevent double navigation.if(isSingleNewDotEntry){Log.info('[PushNotification] Not navigating because this is a singleNewDotEntry flow',false,{reportID});return;}
(isSingleNewDotEntry is sourced from the native settings blob:
// Hybrid app config is not determined by changes in the UI, so we can use `connectWithoutView` here.
Onyx.connectWithoutView({
key: ONYXKEYS.HYBRID_APP,
callback: (value)=>{
if(!value){
return;
}
isSingleNewDotEntry=value?.isSingleNewDotEntry;
)
So the chain is: tap notification while on OldDot → the native OldDot notification-tap handler is the only code that can start the single-entry NewDot experience (launch RN + hand over /r/<reportID> and set isSingleNewDotEntry) → it does not do so → NewDot is never foregrounded → the app stays in OldDot.
The defect therefore lives in the native OldDot notification-tap handler introduced by the feature PR https://github.com/Expensify/Mobile-Expensify/pull/13987, not in App (NewDot) JS. The App side is already correct: getInitialURL/getHybridAppSettings consume whatever native provides, and navigateToReport correctly steps aside for single-entry to avoid a double navigation. On the reported path (a brand-new OldDot/Classic account, i.e. the user is sitting in OldDot), nothing on the NewDot JS side is reached at all until native performs the launch — which is exactly the missing step.
Note: I could not read the Mobile-Expensify submodule at this SHA (it is not checked out locally / is a separate private repo), so the exact native line is unverified. Everything above about the App/NewDot side is verified against the current App SHA. What would confirm the native side: check the tap handler added in Mobile-Expensify #13987 (Android onNotificationResponse/deep-link routing) and confirm it starts the single-entry NewDot activity with the report deep link when the foreground experience is OldDot.
What changes do you think we should make in order to solve the problem?
The fix belongs in the native OldDot notification-tap handler from Mobile-Expensify #13987. When a reportComment/reportAction notification is tapped while the user is in the OldDot experience, that handler must start the single-entry NewDot experience — i.e. launch/foreground the React Native activity with the deep link /r/<reportID> and the single-entry flag — instead of leaving the user in OldDot. This mirrors what the App already expects: NewDot reads that deep link through the shadowed Linking.getInitialURL (src/setup/hybridApp/index.native.ts:9) and reads isSingleNewDotEntry from getHybridAppSettings (src/libs/actions/HybridApp/index.ts:86), so once native launches correctly, NewDot's existing single-entry navigation and the "press Back returns to OldDot" behavior work with no App change.
No change is required in subscribeToPushNotifications.ts: its isSingleNewDotEntry early-return is intentional (it prevents a double navigation once native + the initial URL drive the entry) and removing it would not foreground NewDot anyway, since Navigation.navigate cannot bring the RN surface to front from OldDot.
Concretely on the native side (to be finalized in the Mobile-Expensify PR): in the notification response handler, route report notifications to the single-entry NewDot launch path (the same path used by the "Try New Expensify"/deep-link entry) rather than short-circuiting into OldDot. Minor details can be discussed in the PR phase.
What alternative solutions did you explore? (Optional)
Adding an App-side workaround in navigateToReport — e.g. calling into a new HybridApp bridge method to foreground NewDot on tap. This is worse: it would require a new native bridge API (none of getInitialURL, getHybridAppSettings, closeReactNativeApp, signInToOldDot can foreground NewDot), duplicate the launch logic that already exists natively for the transition flow, and risk a double-entry race with the native handler. Fixing the single native handler that already owns OldDot→NewDot launch is the smaller, root-cause change.
Please re-state the problem that we are trying to solve in this issue.
On Android, when a user signed into Classic (OldDot) taps a report push notification, the app remains in the OldDot experience instead of opening the tapped conversation in the NewDot single‑entry experience (as PR Mobile-Expensify#13987 intends). Expected: the push should launch NewDot pointed at the report, with Back returning to OldDot.
What is the root cause of that problem?
In src/libs/Notification/PushNotification/subscribeToPushNotifications.ts:114 (navigateToReport), the singleNewDotEntry short-circuit at line 123 (if (isSingleNewDotEntry) { … return; }) relies on the module-level cache isSingleNewDotEntry populated by the Onyx.connectWithoutView callback at lines 47–55. When a push tap on Android cold‑starts / re‑enters the app from OldDot, onSelected → navigateToReport runs before the HYBRID_APP Onyx callback has fired, so isSingleNewDotEntry is still undefined. Control then falls through to the OldDot Hybrid branch at line 129 (CONFIG.IS_HYBRID_APP && Navigation.getActiveRoute().includes(ROUTES.TRANSITION_BETWEEN_APPS)) and to Navigation.navigate(ROUTES.REPORT_WITH_ID…) at line 139, which navigates inside the currently-visible OldDot container instead of yielding to the singleNewDotEntry launch path that native HybridAppModule.getInitialURL() (shadowed in src/setup/hybridApp/index.native.ts:9) is expected to feed into DeepLinkHandler. Net effect: the tap stays in OldDot.
What changes do you think we should make in order to solve the problem?
src/libs/Notification/PushNotification/subscribeToPushNotifications.ts:114-153 — read isSingleNewDotEntry synchronously at the point of use (via Onyx.tryGetCachedValue/getInternalValue on ONYXKEYS.HYBRID_APP) instead of relying on the module-level cached value, so a cold-start push tap sees the correct value before deciding to navigate.
Same file, lines 45–55 — while the Onyx HYBRID_APP value is still undefined (not yet loaded), defer navigateToReport's decision until the Onyx callback fires at least once (await a one‑shot promise), rather than defaulting to the OldDot navigate branch.
On Android push‑tap entry, ensure the native side sets HYBRID_APP.isSingleNewDotEntry = true (Mobile‑Expensify PR [No QA] Update adhoc provisioning profile with new deviceIDs for Applause #13987 path) before RN dispatches onSelected, and hand the tapped reportID to HybridAppModule.getInitialURL() so DeepLinkHandler (src/DeepLinkHandler.tsx:55) can route to the report while navigateToReport correctly no‑ops.
Add a fallback in navigateToReport: if CONFIG.IS_HYBRID_APP and the active route is still OldDot / TRANSITION_BETWEEN_APPS and isSingleNewDotEntry is unknown, log and skip the in‑OldDot Navigation.navigate rather than force a NewDot navigate that visibly does nothing under OldDot.
What alternative solutions did you explore? (Optional)
Log.info(`[PushNotification] Callback triggered for ${eventType}`);
if(!data){
Log.warn('[PushNotification] Notification has null or undefined payload, not executing any callback.');
return;
}
if(!data.type){
Log.warn('[PushNotification] No type value provided in payload, not executing any callback.');
return;
}
constaction=actionMap[data.type];
if(!action){
Log.warn('[PushNotification] No callback set up: ',{
event: eventType,
notificationType: data.type,
});
return;
}
/**
* The action callback should return a promise. It's very important we return that promise so that
* when these callbacks are run in Android's background process (via Headless JS), the process waits
* for the promise to resolve before quitting
*/
returnaction(data);
}
For a Classic (OldDot) account, the foreground app is OldDot and NewDot's JS runtime is not the active context. When the push notification is tapped, the tap is consumed by OldDot's native notification handler — NewDot's JS pushNotificationEventCallback never fires, so navigateFromNotification is never called and the app simply stays in OldDot. That's exactly the reported "remains in OldDot" symptom.
The "single-entry NewDot experience" the PR is adding is precisely the missing behavior: the native OldDot notification handler needs to detect the tapped reportComment/reportAction notification and launch NewDot pointing at that report (r/<reportID>), rather than opening OldDot's own report view. That handler is native Android code in the Mobile-Expensify submodule (the linked source of this bug is https://github.com/Expensify/Mobile-Expensify/pull/13987), which is why the JS side alone can't fix it.
On the App/NewDot side the consumption plumbing already exists — the launch URL is read via Linking.getInitialURL() in the InitialURL provider:
So the gap is that OldDot's native tap handler is not launching NewDot with the report deep link; NewDot has nothing to consume.
What changes do you think we should make in order to solve the problem?
The fix is native-first, in Mobile-Expensify (PR #13987's area):
In the OldDot Android notification-tap handler, when the payload type is reportComment/reportAction/transaction, build the NewDot single-entry launch intent with the report deep link (r/<reportID> and, when present, reportActionID) instead of opening OldDot's report screen. This is the layer that decides OldDot-vs-NewDot, so it's the correct place.
Make that launch route through the same NewDot entry that InitialURLContextProvider already reads, so Linking.getInitialURL() returns the r/<reportID> route and NavigationRoot opens it via the existing initialUrl path in Expensify.tsx. No new App-side navigation code is required if the deep link is delivered through the standard initial-URL channel.
Ensure Back from that NewDot report returns to OldDot (the single-entry contract), which is a native task-stack/activity concern handled by launching NewDot as its own activity on top of OldDot.
On the App side the only thing worth verifying is that the report deep link arriving via getInitialURL() navigates correctly when authenticated (it already flows through NavigationRoot's initialUrl). If the native side instead re-uses the shared Airship JS listener, that won't work for Classic users because NewDot's JS isn't live at tap time — so the launch must be an explicit native intent, not a reliance on pushNotificationEventCallback.
What alternative solutions did you explore? (Optional)
Handling the tap purely in NewDot JS by binding another onSelected callback in PushNotification (index.native.ts). Rejected: for a Classic/OldDot-primary account, NewDot's JS runtime isn't the foreground context when the notification is tapped, so pushNotificationEventCallback never runs — the tap is consumed by OldDot native. Adding more JS listeners can't intercept a tap that never reaches NewDot's JS, which is why the routing decision has to be made in the native OldDot handler.
I couldn't cite the exact native handler because it lives in the Mobile-Expensify submodule, which isn't in the provided App sources; the App-side files confirm the consumption path exists and the shared-Airship constraint, but the launch decision is native.
🚨 Edited by proposal-police: This proposal was edited at 2026-07-01 13:26:51 UTC.
Proposal
What is the root cause of that problem?
For a Classic (OldDot) primary user on the HybridApp, tapping a report notification never reaches NewDot's JS at all, so nothing on the App side can react to it. The reason is that the Airship contact and its NotificationResponse listener are shared between OldDot and NewDot, but the foreground/active runtime for a Classic account is OldDot — NewDot's React Native surface isn't running yet at tap time:
So the tap is consumed by the native OldDot notification handler. NewDot can't foreground itself — it has no bridge method to do so; it can only consume a launch that native has already performed. The two hand-offs it consumes are the shadowed initial URL and the hybrid settings blob:
Linking.getInitialURL is shadowed to return whatever route native handed over:
// On HybridApp we need to shadow official implementation of Linking.getInitialURL on NewDot side with our custom implementation.
// Main benefit from this approach is that our deeplink-related code can be implemented the same way for both standalone NewDot and HybridApp.
// It's not possible to use the official implementation from the Linking module because the way OldDot handles deeplinks is significantly different from a standard React Native app.
And NewDot's own tap handler is intentionally passive for this flow — for the single-entry case it explicitly returns and delegates the entry to native + the initial URL, precisely to avoid a double navigation:
// When transitioning to the new experience via the singleNewDotEntry flow, the navigation
// is handled elsewhere. So we cancel here to prevent double navigation.
if(isSingleNewDotEntry){
Log.info('[PushNotification] Not navigating because this is a singleNewDotEntry flow',false,{reportID});
return;
}
The causal chain is: tap while on OldDot → the native OldDot notification handler is the only code that can launch NewDot single-entry (start RN, hand over r/<reportID>, set isSingleNewDotEntry) → it doesn't do so → NewDot is never foregrounded → the app stays in OldDot. This is why the bug only reproduces through the Hybrid PR (Mobile-Expensify#13987): the missing step lives in the native layer, not in App JS.
Note: I couldn't read the Mobile-Expensify submodule at this SHA (it isn't checked out in the App repo / is a separate repo), so the exact native line is unverified. Everything above about the App/NewDot side is verified against main. What confirms the native side: the Android notification-response handler added in #13987 must start the single-entry NewDot activity with the report deep link when the foreground experience is OldDot.
What changes do you think we should make in order to solve the problem?
The fix belongs in the native OldDot notification-tap handler from Mobile-Expensify#13987. When a reportComment/reportAction/transaction notification is tapped while the user is in OldDot, that handler must start the single-entry NewDot experience — launch/foreground the RN activity with the deep link r/<reportID> and the single-entry flag — instead of opening OldDot's own report view. It should route through the same initial-URL channel App already consumes, so no NewDot navigation code needs to change:
getInitialURL() (native) → InitialURLContextProvider reads it (
Once native launches correctly, NewDot opens the conversation and Back returns to OldDot via the existing single-entry contract. No App-side change is required: the isSingleNewDotEntry early-return in navigateToReport is intentional (it prevents a double navigation once native + the initial URL drive the entry) and removing it wouldn't foreground NewDot anyway, since Navigation.navigate can't bring the RN surface to front from OldDot.
What alternative solutions did you explore? (Optional)
I explored fixing this purely in App JS and rejected it, because for a Classic-primary account NewDot's JS runtime isn't the foreground context when the notification is tapped, so navigateToReport (and any additional onSelected binding) simply never runs — there is no App-side hook that fires. Concretely:
Removing / narrowing the isSingleNewDotEntry early-return so navigateToReport navigates itself — it can't, because Navigation.navigate on the RN stack does nothing visible while OldDot is on screen, and the handler isn't reached anyway.
Resetting a "stale" isSingleNewDotEntry flag on OldDot re-entry — this changes nothing on the reported path, since the flag is only consulted inside a handler that never executes for a Classic user's tap.
Adding a new HybridApp bridge method so NewDot foregrounds itself on tap — this would duplicate the native launch logic that already exists for the transition flow and risk a double-entry race; fixing the single native handler that already owns OldDot→NewDot launch is the smaller, root-cause change.
Please re-state the problem that we are trying to solve in this issue.
A Classic (OldDot) primary user receives a report push notification while the app is showing OldDot. Per the new single-entry design, tapping that notification should open the conversation in NewDot's single-entry experience (with Back returning to OldDot). Instead, tapping the notification does nothing visible — the app stays on OldDot.
What is the root cause of that problem?
HYBRID_APP.isSingleNewDotEntry is an Onyx flag that means "we are currently showing the special single-entry NewDot screen." The push-notification tap handler mirrors this flag into a module-level variable and uses it to decide whether it should navigate itself, or whether "elsewhere" (the single-entry transition that is already in flight) will handle it:
// Hybrid app config is not determined by changes in the UI, so we can use `connectWithoutView` here.
Onyx.connectWithoutView({
key: ONYXKEYS.HYBRID_APP,
callback: (value)=>{
if(!value){
return;
}
isSingleNewDotEntry=value?.isSingleNewDotEntry;
},
});
When a notification is tapped, navigateToReport checks that mirrored flag. If it's true, it deliberately skips calling Navigation.navigate, assuming a single-entry transition is already underway and will place the user on the right report:
Log.info('[PushNotification] Navigating to report',false,{reportID});
Navigation.waitForProtectedRoutes().then(()=>{
// The attachment modal remains open when navigating to the report so we need to close it
Modal.close(()=>{
try{
// When transitioning to the new experience via the singleNewDotEntry flow, the navigation
// is handled elsewhere. So we cancel here to prevent double navigation.
if(isSingleNewDotEntry){
Log.info('[PushNotification] Not navigating because this is a singleNewDotEntry flow',false,{reportID});
return;
}
The problem is that isSingleNewDotEntry is never reset back to false when the user leaves the single-entry NewDot screen and returns to OldDot. The only place that tears down the single-entry session is closeReactNativeApp, which is invoked from ScreenWrapper's back-press handler while isSingleNewDotEntry is true. It merges closingReactNativeApp: true into HYBRID_APP, but leaves isSingleNewDotEntry untouched:
So once a user has entered the single-entry NewDot experience once, HYBRID_APP.isSingleNewDotEntry (and therefore the mirrored module variable in subscribeToPushNotifications.ts) stays stuck at true even after they're back on OldDot. The next time a report push notification is tapped, navigateToReport sees the stale true value, assumes a fresh single-entry transition is already navigating for it, and silently returns at line 123–126 — but no such transition is actually in flight this time, so nothing brings the conversation into view and the user is left on OldDot, exactly as described in the bug report.
What changes do you think we should make in order to solve the problem?
Reset isSingleNewDotEntry to false in the same HYBRID_APP merge that marks the app as closing, so the flag never outlives the single-entry session it describes:
With the flag correctly cleared once the user is back on OldDot, the next report push notification tap will find isSingleNewDotEntry as false in subscribeToPushNotifications.ts, so navigateToReport will no longer bail out under the stale "handled elsewhere" assumption and will proceed to navigate to the tapped report, opening the NewDot single-entry experience as expected.
@arosiclair@mateuuszzzzz this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
Hi, got a bit sick this week so I haven't made great progress on this one, but it looks like our getNewDotNotificationBuilder doesn't set contentIntent and Airship SDK uses fallback intent which breaks handling of notification. I'll raise a PR on Monday
I raised a draft. Setting contentIntent helps, but I also noticed that a single NewDot entry doesn't work as expected, and the Back action takes the user to the Inbox. I'll fix it in the same PR, as the fix is incomplete without addressing this issue.
Activity
applause-bot commentedon Jul 1, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/6d6c4fc583306e7f022e076b8fb5d1281d648fadb1c544a765c03fd6e5c6af07
MelvinBot commentedon Jul 1, 2026
Issue Analysis
Root Cause: The decision to open a tapped push notification in the NewDot "single-entry" experience (vs. staying in OldDot) is made on the native OldDot side (Mobile-Expensify) — not in this repo. The App (NewDot) code deliberately defers to native for this flow: when the single-entry flag is set, App's own push handler explicitly skips navigation and relies on the native-provided initial URL to open the report. So if the app "stays in OldDot," the native notification-tap handler never initiated the NewDot single-entry transition (never set the flag / initial report URL), which means the App side never gets a chance to display the conversation.
This is not fixable in
Expensify/App. The routing logic lives in the privateMobile-Expensifynative code (the feature's source PR, Expensify/Mobile-Expensify#13987). This needs an internal engineer with access to Mobile-Expensify to investigate the native notification-tap handler that is supposed to launch the single-entry NewDot experience.Investigation details & evidence
How the single-entry notification flow is split between the two apps:
App JS deliberately does NOT route the tap when in the single-entry flow. In
subscribeToPushNotifications.ts:123, the report-comment tap handler returns early whenisSingleNewDotEntryis true — with the comment "the navigation is handled elsewhere… we cancel here to prevent double navigation." "Elsewhere" is the native-provided initial URL.The report deep-link and the
isSingleNewDotEntryflag both come from native. On HybridApp,Linking.getInitialURLis replaced by the nativeHybridAppModule.getInitialURL(), and theHYBRID_APPOnyx object (includingisSingleNewDotEntry) is parsed from nativegetHybridAppSettings()— seesrc/libs/actions/HybridApp/index.ts. App is a consumer of these native-set values.The only single-entry piece App owns is the Back → OldDot handoff.
ScreenWrapper/index.tsxusesusePreventRemoveto callcloseReactNativeApp()(a native call) when the user presses Back on the single-entry report. This is unrelated to the forward-routing failure reported here.Failure flow: For the report to open, native OldDot must (a) parse the notification's reportID, (b) start the NewDot transition, (c) set
isSingleNewDotEntry: true, and (d) set the initial URL to the report route. "Stays in OldDot" indicates the native handler never performed step (a)/(b) — a native-only code path.Note on an alternative: If native did set
isSingleNewDotEntrybut not an initial report URL, App would still skip navigation and land on a blank/home NewDot screen — but that would present as an empty NewDot, not "stays in OldDot," so it's a weaker fit. Either way the fix is native.Confidence: Medium-High on the location (App code unambiguously defers to native). Precise native failure point can't be pinned down without the Mobile-Expensify code / device logs.
Logs that would confirm: on an affected device, check for
[PushNotification] Not navigating because this is a singleNewDotEntry flow/[PushNotification] Navigating to report. Absence of any[PushNotification]NewDot log after a tap confirms native never handed off to NewDot.Next Steps: This requires a fix in
Mobile-Expensify(native), which MelvinBot can't access. An internal engineer should investigate the native notification-tap handler introduced in Expensify/Mobile-Expensify#13987. Reply with@MelvinBot <feedback>to refine this analysis.yusufdeveloper2903 commentedon Jul 1, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-07-01 13:24:48 UTC.
Proposal
What is the root cause of that problem?
In HybridApp, only the native OldDot layer can bring the NewDot (React Native) surface to the foreground. NewDot never launches or foregrounds itself — it can only react to a launch that OldDot has already performed. Two facts in the App codebase prove this:
The bridge that App uses to talk to OldDot (
@expensify/react-native-hybrid-app) exposes no "open/foreground NewDot" method. The only entry points NewDot has into the transition are read-only handoffs that native calls when it has already decided to show NewDot — the initial deep link and the hybrid settings blob:Linking.getInitialURLis shadowed to read whatever URL native handed over:App/src/setup/hybridApp/index.native.ts
Lines 5 to 10 in a97126c
getHybridAppSettings()just parses the JSON that native pushes in, includingisSingleNewDotEntry:App/src/libs/actions/HybridApp/index.ts
Lines 86 to 91 in a97126c
NewDot's own push-notification tap handler is deliberately passive for this flow.
navigateToReportonly callsNavigation.navigateon the RN stack — which does nothing visible while OldDot is on screen — and for the single-entry case it explicitly bails out, delegating the actual entry to native + the initial URL:App/src/libs/Notification/PushNotification/subscribeToPushNotifications.ts
Lines 114 to 140 in a97126c
(
isSingleNewDotEntryis sourced from the native settings blob:App/src/libs/Notification/PushNotification/subscribeToPushNotifications.ts
Lines 45 to 53 in a97126c
So the chain is: tap notification while on OldDot → the native OldDot notification-tap handler is the only code that can start the single-entry NewDot experience (launch RN + hand over
/r/<reportID>and setisSingleNewDotEntry) → it does not do so → NewDot is never foregrounded → the app stays in OldDot.The defect therefore lives in the native OldDot notification-tap handler introduced by the feature PR https://github.com/Expensify/Mobile-Expensify/pull/13987, not in App (NewDot) JS. The App side is already correct:
getInitialURL/getHybridAppSettingsconsume whatever native provides, andnavigateToReportcorrectly steps aside for single-entry to avoid a double navigation. On the reported path (a brand-new OldDot/Classic account, i.e. the user is sitting in OldDot), nothing on the NewDot JS side is reached at all until native performs the launch — which is exactly the missing step.What changes do you think we should make in order to solve the problem?
The fix belongs in the native OldDot notification-tap handler from Mobile-Expensify #13987. When a
reportComment/reportActionnotification is tapped while the user is in the OldDot experience, that handler must start the single-entry NewDot experience — i.e. launch/foreground the React Native activity with the deep link/r/<reportID>and the single-entry flag — instead of leaving the user in OldDot. This mirrors what the App already expects: NewDot reads that deep link through the shadowedLinking.getInitialURL(src/setup/hybridApp/index.native.ts:9) and readsisSingleNewDotEntryfromgetHybridAppSettings(src/libs/actions/HybridApp/index.ts:86), so once native launches correctly, NewDot's existing single-entry navigation and the "press Back returns to OldDot" behavior work with no App change.No change is required in
subscribeToPushNotifications.ts: itsisSingleNewDotEntryearly-return is intentional (it prevents a double navigation once native + the initial URL drive the entry) and removing it would not foreground NewDot anyway, sinceNavigation.navigatecannot bring the RN surface to front from OldDot.Concretely on the native side (to be finalized in the Mobile-Expensify PR): in the notification response handler, route report notifications to the single-entry NewDot launch path (the same path used by the "Try New Expensify"/deep-link entry) rather than short-circuiting into OldDot. Minor details can be discussed in the PR phase.
What alternative solutions did you explore? (Optional)
Adding an App-side workaround in
navigateToReport— e.g. calling into a new HybridApp bridge method to foreground NewDot on tap. This is worse: it would require a new native bridge API (none ofgetInitialURL,getHybridAppSettings,closeReactNativeApp,signInToOldDotcan foreground NewDot), duplicate the launch logic that already exists natively for the transition flow, and risk a double-entry race with the native handler. Fixing the single native handler that already owns OldDot→NewDot launch is the smaller, root-cause change.aswin-s commentedon Jul 1, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
On Android, when a user signed into Classic (OldDot) taps a report push notification, the app remains in the OldDot experience instead of opening the tapped conversation in the NewDot single‑entry experience (as PR Mobile-Expensify#13987 intends). Expected: the push should launch NewDot pointed at the report, with Back returning to OldDot.
What is the root cause of that problem?
In
src/libs/Notification/PushNotification/subscribeToPushNotifications.ts:114(navigateToReport), the singleNewDotEntry short-circuit at line 123 (if (isSingleNewDotEntry) { … return; }) relies on the module-level cacheisSingleNewDotEntrypopulated by theOnyx.connectWithoutViewcallback at lines 47–55. When a push tap on Android cold‑starts / re‑enters the app from OldDot,onSelected → navigateToReportruns before theHYBRID_APPOnyx callback has fired, soisSingleNewDotEntryis stillundefined. Control then falls through to the OldDot Hybrid branch at line 129 (CONFIG.IS_HYBRID_APP && Navigation.getActiveRoute().includes(ROUTES.TRANSITION_BETWEEN_APPS)) and toNavigation.navigate(ROUTES.REPORT_WITH_ID…)at line 139, which navigates inside the currently-visible OldDot container instead of yielding to the singleNewDotEntry launch path that nativeHybridAppModule.getInitialURL()(shadowed insrc/setup/hybridApp/index.native.ts:9) is expected to feed intoDeepLinkHandler. Net effect: the tap stays in OldDot.What changes do you think we should make in order to solve the problem?
src/libs/Notification/PushNotification/subscribeToPushNotifications.ts:114-153— readisSingleNewDotEntrysynchronously at the point of use (viaOnyx.tryGetCachedValue/getInternalValueonONYXKEYS.HYBRID_APP) instead of relying on the module-level cached value, so a cold-start push tap sees the correct value before deciding to navigate.HYBRID_APPvalue is stillundefined(not yet loaded), defernavigateToReport's decision until the Onyx callback fires at least once (await a one‑shot promise), rather than defaulting to the OldDot navigate branch.HYBRID_APP.isSingleNewDotEntry = true(Mobile‑Expensify PR [No QA] Update adhoc provisioning profile with new deviceIDs for Applause #13987 path) before RN dispatchesonSelected, and hand the tapped reportID toHybridAppModule.getInitialURL()soDeepLinkHandler(src/DeepLinkHandler.tsx:55) can route to the report whilenavigateToReportcorrectly no‑ops.navigateToReport: ifCONFIG.IS_HYBRID_APPand the active route is still OldDot / TRANSITION_BETWEEN_APPS andisSingleNewDotEntryis unknown, log and skip the in‑OldDotNavigation.navigaterather than force a NewDot navigate that visibly does nothing under OldDot.What alternative solutions did you explore? (Optional)
oqildev commentedon Jul 1, 2026
Proposal
What is the root cause of that problem?
This is a HybridApp routing problem, and the deciding logic lives on the native OldDot side, not in NewDot's JS.
On mobile the Airship contact and notification listeners are shared between OldDot and NewDot. That's spelled out directly in the register path:
App/src/libs/Notification/PushNotification/index.native.ts
Lines 79 to 115 in 651937a
NewDot only reacts to a notification tap through the JS
NotificationResponselistener it installs ininit:App/src/libs/Notification/PushNotification/index.native.ts
Lines 65 to 74 in 651937a
which routes into
pushNotificationEventCallbackand ultimatelynavigateFromNotification:App/src/libs/Notification/PushNotification/index.native.ts
Lines 24 to 56 in 651937a
For a Classic (OldDot) account, the foreground app is OldDot and NewDot's JS runtime is not the active context. When the push notification is tapped, the tap is consumed by OldDot's native notification handler — NewDot's JS
pushNotificationEventCallbacknever fires, sonavigateFromNotificationis never called and the app simply stays in OldDot. That's exactly the reported "remains in OldDot" symptom.The "single-entry NewDot experience" the PR is adding is precisely the missing behavior: the native OldDot notification handler needs to detect the tapped
reportComment/reportActionnotification and launch NewDot pointing at that report (r/<reportID>), rather than opening OldDot's own report view. That handler is native Android code in the Mobile-Expensify submodule (the linked source of this bug is https://github.com/Expensify/Mobile-Expensify/pull/13987), which is why the JS side alone can't fix it.On the App/NewDot side the consumption plumbing already exists — the launch URL is read via
Linking.getInitialURL()in the InitialURL provider:App/src/components/InitialURLContextProvider.tsx
Lines 38 to 45 in 651937a
and fed into
NavigationRootasinitialUrlwhen running as HybridApp:App/src/Expensify.tsx
Lines 293 to 300 in 651937a
So the gap is that OldDot's native tap handler is not launching NewDot with the report deep link; NewDot has nothing to consume.
What changes do you think we should make in order to solve the problem?
The fix is native-first, in Mobile-Expensify (PR #13987's area):
typeisreportComment/reportAction/transaction, build the NewDot single-entry launch intent with the report deep link (r/<reportID>and, when present,reportActionID) instead of opening OldDot's report screen. This is the layer that decides OldDot-vs-NewDot, so it's the correct place.InitialURLContextProvideralready reads, soLinking.getInitialURL()returns ther/<reportID>route andNavigationRootopens it via the existinginitialUrlpath inExpensify.tsx. No new App-side navigation code is required if the deep link is delivered through the standard initial-URL channel.On the App side the only thing worth verifying is that the report deep link arriving via
getInitialURL()navigates correctly when authenticated (it already flows throughNavigationRoot'sinitialUrl). If the native side instead re-uses the shared Airship JS listener, that won't work for Classic users because NewDot's JS isn't live at tap time — so the launch must be an explicit native intent, not a reliance onpushNotificationEventCallback.What alternative solutions did you explore? (Optional)
Handling the tap purely in NewDot JS by binding another
onSelectedcallback inPushNotification(index.native.ts). Rejected: for a Classic/OldDot-primary account, NewDot's JS runtime isn't the foreground context when the notification is tapped, sopushNotificationEventCallbacknever runs — the tap is consumed by OldDot native. Adding more JS listeners can't intercept a tap that never reaches NewDot's JS, which is why the routing decision has to be made in the native OldDot handler.I couldn't cite the exact native handler because it lives in the Mobile-Expensify submodule, which isn't in the provided App sources; the App-side files confirm the consumption path exists and the shared-Airship constraint, but the launch decision is native.
David-2002065 commentedon Jul 1, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-07-01 13:26:51 UTC.
Proposal
What is the root cause of that problem?
For a Classic (OldDot) primary user on the HybridApp, tapping a report notification never reaches NewDot's JS at all, so nothing on the App side can react to it. The reason is that the Airship contact and its
NotificationResponselistener are shared between OldDot and NewDot, but the foreground/active runtime for a Classic account is OldDot — NewDot's React Native surface isn't running yet at tap time:App/src/libs/Notification/PushNotification/index.native.ts
Lines 83 to 84 in 55e5bed
App/src/libs/Notification/PushNotification/index.native.ts
Lines 69 to 71 in 55e5bed
So the tap is consumed by the native OldDot notification handler. NewDot can't foreground itself — it has no bridge method to do so; it can only consume a launch that native has already performed. The two hand-offs it consumes are the shadowed initial URL and the hybrid settings blob:
Linking.getInitialURLis shadowed to return whatever route native handed over:App/src/setup/hybridApp/index.native.ts
Lines 6 to 9 in 55e5bed
getHybridAppSettings()parses the JSON native pushes in (this is whereisSingleNewDotEntryoriginates):App/src/libs/actions/HybridApp/index.ts
Lines 86 to 91 in 55e5bed
And NewDot's own tap handler is intentionally passive for this flow — for the single-entry case it explicitly returns and delegates the entry to native + the initial URL, precisely to avoid a double navigation:
App/src/libs/Notification/PushNotification/subscribeToPushNotifications.ts
Lines 121 to 126 in 55e5bed
The causal chain is: tap while on OldDot → the native OldDot notification handler is the only code that can launch NewDot single-entry (start RN, hand over
r/<reportID>, setisSingleNewDotEntry) → it doesn't do so → NewDot is never foregrounded → the app stays in OldDot. This is why the bug only reproduces through the Hybrid PR (Mobile-Expensify#13987): the missing step lives in the native layer, not in App JS.What changes do you think we should make in order to solve the problem?
The fix belongs in the native OldDot notification-tap handler from Mobile-Expensify#13987. When a
reportComment/reportAction/transactionnotification is tapped while the user is in OldDot, that handler must start the single-entry NewDot experience — launch/foreground the RN activity with the deep linkr/<reportID>and the single-entry flag — instead of opening OldDot's own report view. It should route through the same initial-URL channel App already consumes, so no NewDot navigation code needs to change:getInitialURL()(native) →InitialURLContextProviderreads it (App/src/components/InitialURLContextProvider.tsx
Lines 39 to 45 in 55e5bed
NavigationRootasinitialUrlinExpensify.tsx(App/src/Expensify.tsx
Lines 293 to 298 in 55e5bed
Once native launches correctly, NewDot opens the conversation and Back returns to OldDot via the existing single-entry contract. No App-side change is required: the
isSingleNewDotEntryearly-return innavigateToReportis intentional (it prevents a double navigation once native + the initial URL drive the entry) and removing it wouldn't foreground NewDot anyway, sinceNavigation.navigatecan't bring the RN surface to front from OldDot.What alternative solutions did you explore? (Optional)
I explored fixing this purely in App JS and rejected it, because for a Classic-primary account NewDot's JS runtime isn't the foreground context when the notification is tapped, so
navigateToReport(and any additionalonSelectedbinding) simply never runs — there is no App-side hook that fires. Concretely:isSingleNewDotEntryearly-return sonavigateToReportnavigates itself — it can't, becauseNavigation.navigateon the RN stack does nothing visible while OldDot is on screen, and the handler isn't reached anyway.isSingleNewDotEntryflag on OldDot re-entry — this changes nothing on the reported path, since the flag is only consulted inside a handler that never executes for a Classic user's tap.kitvasyl commentedon Jul 1, 2026
🚫 Duplicated proposal withdrawn by 🤖 ProposalPolice.
abbasifaizan70 commentedon Jul 1, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
A Classic (OldDot) primary user receives a report push notification while the app is showing OldDot. Per the new single-entry design, tapping that notification should open the conversation in NewDot's single-entry experience (with Back returning to OldDot). Instead, tapping the notification does nothing visible — the app stays on OldDot.
What is the root cause of that problem?
HYBRID_APP.isSingleNewDotEntryis an Onyx flag that means "we are currently showing the special single-entry NewDot screen." The push-notification tap handler mirrors this flag into a module-level variable and uses it to decide whether it should navigate itself, or whether "elsewhere" (the single-entry transition that is already in flight) will handle it:App/src/libs/Notification/PushNotification/subscribeToPushNotifications.ts
Lines 45 to 55 in 252374e
When a notification is tapped,
navigateToReportchecks that mirrored flag. If it'strue, it deliberately skips callingNavigation.navigate, assuming a single-entry transition is already underway and will place the user on the right report:App/src/libs/Notification/PushNotification/subscribeToPushNotifications.ts
Lines 114 to 126 in 252374e
The problem is that
isSingleNewDotEntryis never reset back tofalsewhen the user leaves the single-entry NewDot screen and returns to OldDot. The only place that tears down the single-entry session iscloseReactNativeApp, which is invoked fromScreenWrapper's back-press handler whileisSingleNewDotEntryistrue. It mergesclosingReactNativeApp: trueintoHYBRID_APP, but leavesisSingleNewDotEntryuntouched:App/src/libs/actions/HybridApp/index.ts
Lines 98 to 119 in 252374e
So once a user has entered the single-entry NewDot experience once,
HYBRID_APP.isSingleNewDotEntry(and therefore the mirrored module variable insubscribeToPushNotifications.ts) stays stuck attrueeven after they're back on OldDot. The next time a report push notification is tapped,navigateToReportsees the staletruevalue, assumes a fresh single-entry transition is already navigating for it, and silently returns at line 123–126 — but no such transition is actually in flight this time, so nothing brings the conversation into view and the user is left on OldDot, exactly as described in the bug report.What changes do you think we should make in order to solve the problem?
Reset
isSingleNewDotEntrytofalsein the sameHYBRID_APPmerge that marks the app as closing, so the flag never outlives the single-entry session it describes:App/src/libs/actions/HybridApp/index.ts
Lines 112 to 118 in 252374e
With the flag correctly cleared once the user is back on OldDot, the next report push notification tap will find
isSingleNewDotEntryasfalseinsubscribeToPushNotifications.ts, sonavigateToReportwill no longer bail out under the stale "handled elsewhere" assumption and will proceed to navigate to the tapped report, opening the NewDot single-entry experience as expected.melvin-bot commentedon Jul 1, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Eskalifer1 (
External)28 remaining items
melvin-bot commentedon Jul 9, 2026
@arosiclair, @mateuuszzzzz Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon Jul 15, 2026
@arosiclair @mateuuszzzzz this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
arosiclair commentedon Jul 16, 2026
Any progress @mateuuszzzzz?
mateuuszzzzz commentedon Jul 17, 2026
Hi, got a bit sick this week so I haven't made great progress on this one, but it looks like our
getNewDotNotificationBuilderdoesn't setcontentIntentand Airship SDK uses fallback intent which breaks handling of notification. I'll raise a PR on Mondaymateuuszzzzz commentedon Jul 20, 2026
I raised a draft. Setting
contentIntenthelps, but I also noticed that a single NewDot entry doesn't work as expected, and the Back action takes the user to the Inbox. I'll fix it in the same PR, as the fix is incomplete without addressing this issue.mateuuszzzzz commentedon Jul 22, 2026
PR is ready for a review
melvin-bot commentedon Jul 29, 2026
@arosiclair @mateuuszzzzz this issue is now 4 weeks old, please consider:
Thanks!
arosiclair commentedon Jul 31, 2026
This is working in v9.4.46-5