Skip to content

[Due for payment 2026-05-22] Navigation - User does not navigate to concierge chat via link when login with new-old account #82818

Closed

Description

@jponikarchuk

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.3.21-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/test-runs/TR-5132/folder/13176964/41237739/1186706320
Email or phone of affected tester (no customers): emady.syed1234+400@gmail.com
Issue reported by: Applause Internal Team
Bug source: Regression TC Execution
Device used: Windows 11 / Chrome
App Component: Chat Report View

Action Performed:

  1. Open https://staging.new.expensify.com/home
  2. Logout
  3. Click on https://staging.new.expensify.com/concierge
  4. Enter Old User details and login
  5. Logout and repeat step 3-4 with new User

Expected Result:

User should navigate to the concierge chat when clicking on its chat link

Actual Result:

User does not navigate to concierge chat via link and land on home page instead

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Feb 18, 2026
  2. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Feb 18, 2026
  3. melvin-bot commented on Feb 18, 2026

    @melvin-bot

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

  4. melvin-bot commented on Feb 18, 2026

    @melvin-bot

    Triggered auto assignment to @NicMendonca (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  5. MelvinBot commented on Feb 18, 2026

    @MelvinBot
    Contributor

    I have failed to help you. I let you down and for that I am sorry. Please try again later.

    Failure details: https://github.com/Expensify/Expensify/actions/runs/22146075383

  6. HiepPP commented on Feb 18, 2026

    @HiepPP
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Users clicking the /concierge link while not authenticated land on the home page after logging in, instead of being navigated to the concierge chat.

    What is the root cause of that problem?

    The post-login navigation flow in AuthScreens.tsx only handles report-based deep links via getReportIDFromLink():

    const reportID = getReportIDFromLink(initialURL ?? null);
    if (reportID && !isAuthenticatedAtStartup) {
    Report.openReport(reportID, introSelected);
    // Don't want to call `openReport` again when logging out and then logging in
    setIsAuthenticatedAtStartup(true);
    }
    App.openApp();
    }

    Since /concierge does not match the report route pattern (/r/:reportID), reportID is empty. The condition if (reportID && !isAuthenticatedAtStartup) fails, so only App.openApp() is called and the user lands on the home page.

    What changes do you think we should make in order to solve the problem?

    Add concierge route detection in AuthScreens.tsx to navigate users to concierge chat after login when they initially clicked a /concierge link.

    1. Subscribe to conciergeReportID from Onyx state

    src/libs/Navigation/AppNavigator/AuthScreens.tsx

    const [conciergeReportID] = useOnyx(ONYXKEYS.CONCIERGE_REPORT_ID, {
      canBeMissing: true,
    });
    1. Add concierge route handling after the report check

    src/libs/Navigation/AppNavigator/AuthScreens.tsx

    } else if (initialURL?.includes(ROUTES.CONCIERGE) && !isAuthenticatedAtStartup) {
        // Navigate to concierge chat when logging in via concierge link
        Report.navigateToConciergeChat(conciergeReportID, true);
        setIsAuthenticatedAtStartup(true);
    }

    This reuses the existing navigateToConciergeChat function which handles creating a concierge chat if one does not exist.

    What alternative solutions did you explore? (Optional)

    Considered modifying ConciergePage.tsx to preserve the original destination before redirecting to login. Rejected because it adds complexity to the authentication flow and the simpler fix in AuthScreens.tsx directly addresses the gap in post-login navigation handling.


    Files Modified:

    • src/libs/Navigation/AppNavigator/AuthScreens.tsx - Added concierge route detection and navigation after login

    Testing Performed:

    • TypeScript compilation passes
    • Lint checks pass
    • Prettier formatting check passes
    • Verified the fix follows existing codebase patterns
  7. abbasifaizan70 commented on Feb 18, 2026

    @abbasifaizan70
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    User does not navigate to concierge chat via link and lands on home page instead.


    What is the root cause of that problem?

    When the user opens the concierge URL while logged out, the app shows the sign-in page. After sign-in, post-login deep link navigation is only run for anonymous users, so a normal (non-anonymous) user never gets navigated to the /concierge route and stays on the default post-login screen (home).

    In openReportFromDeepLink, the route is correctly derived from the URL via getRouteFromLink

    App/src/libs/ReportUtils.ts

    Lines 9594 to 9623 in 3b83796

    function getRouteFromLink(url: string | null): string {
    if (!url) {
    return '';
    }
    // Get the reportID from URL
    let route = url;
    const localWebAndroidRegEx = /^(https:\/\/([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3}))/;
    for (const prefix of linkingConfig.prefixes) {
    if (route.startsWith(prefix)) {
    route = route.replace(prefix, '');
    } else if (localWebAndroidRegEx.test(route)) {
    route = route.replace(localWebAndroidRegEx, '');
    } else {
    continue;
    }
    // Remove the port if it's a localhost URL
    if (/^:\d+/.test(route)) {
    route = route.replaceAll(/:\d+/g, '');
    }
    // Remove the leading slash if exists
    if (route.startsWith('/')) {
    route = route.replace('/', '');
    }
    }
    return route;
    }

    (e.g. 'concierge' for /concierge). The logic that performs the actual navigation after sign-in lives in handleDeeplinkNavigation, which calls Navigation.navigate(route, …) and would correctly open the concierge flow. However, that handler is only invoked when [isAnonymousUser()]

    if (isAnonymousUser()) {
    handleDeeplinkNavigation();
    }

    is true, so regular signed-in users who arrived via the concierge link never run this navigation and remain on home.


    What changes do you think we should make in order to solve the problem?

    Run post-login deep link navigation for all users who opened the app via a deep link while unauthenticated, not only for anonymous users. That way, opening /concierge and then signing in (with any account type) will trigger handleDeeplinkNavigation() and navigate to the concierge route, after which ConciergePage will redirect to the actual concierge chat.

    File: App/src/libs/actions/Link.ts

                            };
    
    -                       if (isAnonymousUser()) {
    -                           handleDeeplinkNavigation();
    -                       }
    +                       handleDeeplinkNavigation();
                        });
                    },
                });
  8. self-assigned this
    on Feb 18, 2026
  9. dangrous commented on Feb 18, 2026

    @dangrous
    Contributor

    I can handle internal review on this one when ready!

  10. dangrous commented on Feb 20, 2026

    @dangrous
    Contributor

    @sobitneupane let us know what you think of the proposals when you can - thanks!

  11. 56 remaining items

  12. melvin-bot commented on May 20, 2026

    @melvin-bot

    @sobitneupane Huh... This is 4 days overdue. Who can take care of this?

  13. melvin-bot commented on May 21, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  14. melvin-bot commented on May 22, 2026

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@mallenexpensify)

    • (if NewFeature) I have created a PR for any necessary HelpDot updates, or I confirmed no updates are necessary.
    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
    • I have verified the PR was not reverted
    • I have applied any discounts due to bugs/regressions introduced by this PR
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  15. sobitneupane commented on May 25, 2026

    @sobitneupane
    Contributor

    BugZero Checklist:

    Regression Test Proposal

    Test:

    1. Open the app
    2. Log out of the app.
    3. Use the deeplink /concierge to open the app (e.g., https://staging.new.expensify.com/concierge)
    4. Log in with an existing account
    5. Verify that the Concierge chat is displayed after logging in.

    Do we agree 👍 or 👎

    Zapier Logs Run ID: 00040eee-3c2b-a504-0ebf-c4dee85506f4
  16. sobitneupane commented on May 25, 2026

    @sobitneupane
    Contributor
  17. mallenexpensify commented on May 25, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor: @nkdengineer due $250 via NewDot
    Contributor+: @sobitneupane due $250 via NewDot

    ^ Test case created. Thx

    @sobitneupane , please post your tests in the PR reviewer checklist post under the sections at the bottom. Reasoning, they're supposed to go there 🧌 , more so.. with me paying all issues, I have automation setup to navigate to that area to determine is tests have been completed. If I don't see tests there I'll be paying $125 for issues.

  18. twisterdotcom commented on Jun 16, 2026

    @twisterdotcom
    Contributor

    $250 approved for @nkdengineer in Report ID: R009bfMTMRr7.

    Zapier Logs Run ID: 00040eee-3e00-aff0-8fa0-80d4d9ba68d4

    SO: https://stackoverflowteams.com/c/expensify/questions/7582

  19. JmillsExpensify commented on Jul 28, 2026

    @JmillsExpensify
    Contributor

    $250 approved for @sobitneupane

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions