Skip to content

[$250] Notifications - Push notification opens OldDot instead of NewDot #95049

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


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:

  1. Log in with a new Expensify account that is using Classic (OldDot).
  2. Sign in to the same account on another device.
  3. Send a message from the second device to the first device.
  4. Wait for the push notification to arrive on the first device.
  5. 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.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome Safari

Screenshots/Videos

Bug7196415_1782909784114.WhatsApp_Video_2026-06-30_at_11.05.54_AM__1_.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7196415

Upwork Automation - Do Not Edit
Issue OwnerCurrent Issue Owner: @mateuuszzzzz

Activity

  1. added
    Daily
    Bug
    on Jul 1, 2026
  2. applause-bot commented on Jul 1, 2026

    @applause-bot
    Author

    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

  3. MelvinBot commented on Jul 1, 2026

    @MelvinBot
    Contributor

    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 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:

    1. 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.

    2. 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.

    3. 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.

  4. added
    External
    on Jul 1, 2026
  5. added
    Help Wanted
    on Jul 1, 2026
  6. yusufdeveloper2903 commented on Jul 1, 2026

    @yusufdeveloper2903
    Contributor

    🚨 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:

    1. 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:
        if (CONFIG.IS_HYBRID_APP) {
        // 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.
        Linking.getInitialURL = () => HybridAppModule.getInitialURL();
        }
      • getHybridAppSettings() just parses the JSON that native pushes in, including isSingleNewDotEntry:
        function getHybridAppSettings(): Promise<HybridAppSettings | null> {
        return HybridAppModule.getHybridAppSettings().then((hybridAppSettings) => {
        return parseHybridAppSettings(hybridAppSettings);
        });
        }
    2. 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:

      function navigateToReport({reportID}: AnyPushNotificationData): Promise<void> {
      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;
      }
      // Get rid of the transition screen, if it is on the top of the stack
      if (CONFIG.IS_HYBRID_APP && Navigation.getActiveRoute().includes(ROUTES.TRANSITION_BETWEEN_APPS)) {
      Navigation.goBack();
      }
      // If a chat is visible other than the one we are trying to navigate to, then we need to navigate back
      if (Navigation.getActiveRoute().slice(1, 2) === ROUTES.REPORT && !Navigation.isActiveRoute(`r/${reportID}`)) {
      Navigation.goBack();
      }
      Log.info('[PushNotification] onSelected() - Navigation is ready. Navigating...', false, {reportID});
      const backTo = Navigation.isActiveRoute(ROUTES.REPORT_WITH_ID.getRoute(String(reportID))) ? undefined : Navigation.getActiveRoute();
      Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(String(reportID), undefined, undefined, backTo));
      updateLastVisitedPath(ROUTES.REPORT_WITH_ID.getRoute(String(reportID)));

      // 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:

      let isSingleNewDotEntry: boolean | undefined;
      // 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.

  7. aswin-s commented on Jul 1, 2026

    @aswin-s
    Contributor

    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 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?

    1. 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.
    2. 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.
    3. 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.
    4. 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)

  8. oqildev commented on Jul 1, 2026

    @oqildev
    Contributor

    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:

    const register: Register = (notificationID) => {
    Airship.contact
    .getNamedUserId()
    .then((userID) => {
    // In the HybridApp, the contact identity is set on the YAPL side after sign-in.
    // Since the Airship instance is shared between NewDot and OldDot,
    // NewDot users won't see the push notification permission prompt as we return early in this case.
    // Therefore, we cannot handle the HybridApp scenario here.
    if (!CONFIG.IS_HYBRID_APP && userID === notificationID.toString()) {
    // No need to register again for this notificationID.
    return;
    }
    // Get permissions to display push notifications if not determined (prompts user on iOS, but not Android)
    Airship.push.getNotificationStatus().then(({notificationPermissionStatus}) => {
    if (notificationPermissionStatus !== PermissionStatus.NotDetermined) {
    return;
    }
    Airship.push.enableUserNotifications().then((isEnabled) => {
    if (isEnabled) {
    return;
    }
    Log.info('[PushNotification] User has disabled visible push notifications for this app.');
    });
    });
    // Register this device as a named user in AirshipAPI.
    // Regardless of the user's opt-in status, we still want to receive silent push notifications.
    Log.info(`[PushNotification] Subscribing to notifications`);
    Airship.contact.identify(notificationID.toString());
    })
    .catch((error: Record<string, unknown>) => {
    Log.warn('[PushNotification] Failed to register for push notifications! Reason: ', error);
    });
    };

    NewDot only reacts to a notification tap through the JS NotificationResponse listener it installs in init:

    const init: Init = () => {
    // Setup event listeners
    Airship.addListener(EventType.PushReceived, (notification) => pushNotificationEventCallback(EventType.PushReceived, notification.pushPayload));
    // Note: the NotificationResponse event has a nested PushReceived event,
    // so event.notification refers to the same thing as notification above ^
    Airship.addListener(EventType.NotificationResponse, (event) => pushNotificationEventCallback(EventType.NotificationResponse, event.pushPayload));
    ForegroundNotifications.configureForegroundNotifications();
    };

    which routes into pushNotificationEventCallback and ultimately navigateFromNotification:

    function pushNotificationEventCallback(eventType: EventType, notification: PushPayload) {
    const actionMap = notificationEventActionMap[eventType] ?? {};
    const data = parsePushNotificationPayload(notification.extras.payload);
    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;
    }
    const action = 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
    */
    return action(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:

    useEffect(() => {
    Linking.getInitialURL().then((initURL) => {
    if (!initURL) {
    return;
    }
    setInitialURL(initURL as Route);
    });
    }, []);

    and fed into NavigationRoot as initialUrl when running as HybridApp:

    App/src/Expensify.tsx

    Lines 293 to 300 in 651937a

    {hasAttemptedToOpenPublicRoom && (CONFIG.IS_HYBRID_APP || initialUrl !== undefined) && (
    <NavigationRoot
    onReady={setNavigationReady}
    authenticated={isAuthenticated}
    lastVisitedPath={lastVisitedPath as Route}
    initialUrl={initialUrl ?? null}
    />
    )}

    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.

  9. David-2002065 commented on Jul 1, 2026

    @David-2002065
    Contributor

    🚨 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:

    // In the HybridApp, the contact identity is set on the YAPL side after sign-in.
    // Since the Airship instance is shared between NewDot and OldDot,

    // Note: the NotificationResponse event has a nested PushReceived event,
    // so event.notification refers to the same thing as notification above ^
    Airship.addListener(EventType.NotificationResponse, (event) => pushNotificationEventCallback(EventType.NotificationResponse, event.pushPayload));

    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.
      Linking.getInitialURL = () => HybridAppModule.getInitialURL();
    • getHybridAppSettings() parses the JSON native pushes in (this is where isSingleNewDotEntry originates):
      function getHybridAppSettings(): Promise<HybridAppSettings | null> {
      return HybridAppModule.getHybridAppSettings().then((hybridAppSettings) => {
      return parseHybridAppSettings(hybridAppSettings);
      });
      }

    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 (

    Linking.getInitialURL().then((initURL) => {
    if (!initURL) {
    return;
    }
    setInitialURL(initURL as Route);
    });
    }, []);
    ) → fed to NavigationRoot as initialUrl in Expensify.tsx (

    App/src/Expensify.tsx

    Lines 293 to 298 in 55e5bed

    {hasAttemptedToOpenPublicRoom && (CONFIG.IS_HYBRID_APP || initialUrl !== undefined) && (
    <NavigationRoot
    onReady={setNavigationReady}
    authenticated={isAuthenticated}
    lastVisitedPath={lastVisitedPath as Route}
    initialUrl={initialUrl ?? null}
    ).

    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.
  10. kitvasyl commented on Jul 1, 2026

    @kitvasyl

    🚫 Duplicated proposal withdrawn by 🤖 ProposalPolice.

  11. abbasifaizan70 commented on Jul 1, 2026

    @abbasifaizan70
    Contributor

    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.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:

    let isSingleNewDotEntry: boolean | undefined;
    // 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:

    function navigateToReport({reportID}: AnyPushNotificationData): Promise<void> {
    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:

    function closeReactNativeApp({shouldSetNVP, isTrackingGPS, shouldIgnoreTryNewDotLoading = false}: CloseReactNativeAppParams) {
    if (isLockedToNewApp(currentTryNewDot)) {
    return;
    }
    if (isTrackingGPS) {
    setIsGPSInProgressModalOpen(true);
    return;
    }
    if (!shouldIgnoreTryNewDotLoading && shouldBlockOldAppExit(currentTryNewDot, isLoadingTryNewDot, shouldSetNVP)) {
    return;
    }
    Navigation.clearPreloadedRoutes();
    if (CONFIG.IS_HYBRID_APP) {
    Onyx.merge(ONYXKEYS.HYBRID_APP, {closingReactNativeApp: true});
    }
    // eslint-disable-next-line no-restricted-properties
    HybridAppModule.closeReactNativeApp({shouldSetNVP});
    }

    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:

    Navigation.clearPreloadedRoutes();
    if (CONFIG.IS_HYBRID_APP) {
    Onyx.merge(ONYXKEYS.HYBRID_APP, {closingReactNativeApp: true});
    }
    // eslint-disable-next-line no-restricted-properties
    HybridAppModule.closeReactNativeApp({shouldSetNVP});

    Navigation.clearPreloadedRoutes();
    if (CONFIG.IS_HYBRID_APP) {
      Onyx.merge(ONYXKEYS.HYBRID_APP, {
        closingReactNativeApp: true,
        isSingleNewDotEntry: false,
      });
    }

    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.

  12. melvin-bot commented on Jul 1, 2026

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @Eskalifer1 (External)

  13. 28 remaining items

  14. melvin-bot commented on Jul 9, 2026

    @melvin-bot

    @arosiclair, @mateuuszzzzz Whoops! This issue is 2 days overdue. Let's get this updated quick!

  15. melvin-bot commented on Jul 15, 2026

    @melvin-bot

    @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!

  16. arosiclair commented on Jul 16, 2026

    @arosiclair
    Contributor

    Any progress @mateuuszzzzz?

  17. mateuuszzzzz commented on Jul 17, 2026

    @mateuuszzzzz
    Contributor

    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

  18. mateuuszzzzz commented on Jul 20, 2026

    @mateuuszzzzz
    Contributor

    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.

  19. mateuuszzzzz commented on Jul 22, 2026

    @mateuuszzzzz
    Contributor

    PR is ready for a review

  20. melvin-bot commented on Jul 29, 2026

    @melvin-bot

    @arosiclair @mateuuszzzzz this issue is now 4 weeks old, please consider:

    • Finding a contributor to fix the bug
    • Closing the issue if BZ has been unable to add the issue to a VIP or Wave project
    • If you have any questions, don't hesitate to start a discussion in #expensify-open-source

    Thanks!

  21. arosiclair commented on Jul 31, 2026

    @arosiclair
    Contributor

    This is working in v9.4.46-5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugExternalWeekly

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions