Skip to content

[$250] Concierge chat - 'Back' app button redirects to 'Workspaces' instead of 'Concierge' #58709

Closed

Description

@mitarachim

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.1.15-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both
If this was caught during regression testing, add the test name, ID and link from TestRail: Exploratory.
Email or phone of affected tester (no customers): testexpensify9+onvoardin000005@gmail.com
Issue reported by: Applause Internal Team
Device used: Samsung A15, Android 14 | iPhone SE 3rd generation (2022), iOS 18.3.2
App Component: Other

Action Performed:

  1. Open Hybrid app or go to: https://staging.new.expensify.com/
  2. Sign up with new gmail account
  3. Click on 'Join'
  4. Click on 'Manage my team's expenses'
  5. Click on '1-10 employees' > Continue
  6. Click on 'QBD' > Continue
  7. Go to Hybrid app and loggin with the same account
  8. Tap on 'Concierge' chat
  9. Tap on 'workspace' deeplink from the first task
  10. Tap 'Back' button from the app (not back OS button)

Expected Result:

The user should be redirected to Concierge chat

Actual Result:

The user is redirected to 'Workspaces' page.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6775014_1742351016285.az_recorder_20250318_230458.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021902393745076359952
  • Upwork Job ID: 1902393745076359952
  • Last Price Increase: 2025-03-19
Issue OwnerCurrent Issue Owner: @ahmedGaber93

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    DeployBlockerIndicates it should block deploying the API
    DeployBlockerCashThis issue or pull request should block deployment
    on Mar 19, 2025
  2. melvin-bot commented on Mar 19, 2025

    @melvin-bot

    Triggered auto assignment to @lschurr (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.

  3. github-actions commented on Mar 19, 2025

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  4. samranahm commented on Mar 19, 2025

    @samranahm
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2025-03-19 17:07:47 UTC.

    Proposal

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

    Concierge chat - 'Back' app button redirects to 'Workspaces' instead of 'Concierge'

    What is the root cause of that problem?

    Here

    onBackButtonPress={() => Navigation.goBack(route.params?.backTo ?? ROUTES.SETTINGS_WORKSPACES.route)}

    we are using ROUTES.SETTINGS_WORKSPACES that take us back to workspaces page

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

    Update the logic like this to always go back on from route

    onBackButtonPress={() => Navigation.goBack(route.params?.backTo)}
    

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    N/A

    What alternative solutions did you explore? (Optional)

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  5. github-actions commented on Mar 19, 2025

    @github-actions
    Contributor

    ⚠️ @samranahm Thanks for your proposal. Please update it to follow the proposal template, as proposals are only reviewed if they follow that format (note the mandatory sections).

  6. mitarachim commented on Mar 19, 2025

    @mitarachim
    Author

    we have different behavior in Prod Android Hybrid (9.1.9.8 from playstore)

    2025-03-19.7.09.15.PM.mp4

    but have same behavior in Prod Android: mWeb Chrome (v9.1.14-5) and iOS Hybrid (v9.1.14-5)

    ScreenRecording_03-19-2025.19-21-30_1.MP4
    2025-03-19.7.18.21.PM.mp4
  7. lschurr commented on Mar 19, 2025

    @lschurr
    Contributor
  8. 13 remaining items

  9. mountiny commented on Mar 19, 2025

    @mountiny
    Contributor

    This might not be a bug

  10. added and removed
    DeployBlockerIndicates it should block deploying the API
    DeployBlockerCashThis issue or pull request should block deployment
    Help WantedApply this label when an issue is open to proposals by contributors
    on Mar 19, 2025
  11. mountiny commented on Mar 19, 2025

    @mountiny
    Contributor

    Discussing in the thread

  12. daledah commented on Mar 19, 2025

    @daledah
    Contributor

    Proposal

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

    The user is redirected to 'Workspaces' page.

    What is the root cause of that problem?

    We just get the workspace setting link here

    App/src/CONST.ts

    Lines 128 to 132 in 04a0d0b

    const createWorkspaceTask: OnboardingTask = {
    type: 'createWorkspace',
    autoCompleted: true,
    mediaAttributes: {},
    title: ({workspaceSettingsLink}) => `Create a [workspace](${workspaceSettingsLink})`,

    App/src/libs/actions/Report.ts

    Lines 3922 to 3928 in 04a0d0b

    const taskTitle =
    typeof task.title === 'function'
    ? task.title({
    integrationName,
    workspaceSettingsLink: `${environmentURL}/${ROUTES.WORKSPACE_INITIAL.getRoute(onboardingPolicyID)}`,
    })
    : task.title;

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

    We should add backTo to the WORKSPACE_INITIAL route to go back the concierge page when user click the device back button

        workspaceSettingsLink: `${environmentURL}/${ROUTES.WORKSPACE_INITIAL.getRoute(onboardingPolicyID, `/r/${conciergeChatReportID}`)}`,
    

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    None

    What alternative solutions did you explore? (Optional)

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  13. samranahm commented on Mar 19, 2025

    @samranahm
    Contributor
  14. Shahidullah-Muffakir commented on Mar 20, 2025

    @Shahidullah-Muffakir
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2025-03-20 03:23:15 UTC.

    Proposal

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

    When user clicks on the call to action link in the Title or description of any onboarding task, after going to that page, using the back button , user is not landing on the concierge chat/admin room

    What is the root cause of that problem?

    We are not adding the backTo route here to the call-to-actions links :

    App/src/libs/actions/Report.ts

    Lines 3896 to 3904 in 524c4e8

    adminsRoomLink: `${environmentURL}/${ROUTES.REPORT_WITH_ID.getRoute(adminsChatReportID)}`,
    workspaceCategoriesLink: `${environmentURL}/${ROUTES.WORKSPACE_CATEGORIES.getRoute(onboardingPolicyID)}`,
    workspaceMembersLink: `${environmentURL}/${ROUTES.WORKSPACE_MEMBERS.getRoute(onboardingPolicyID)}`,
    workspaceMoreFeaturesLink: `${environmentURL}/${ROUTES.WORKSPACE_MORE_FEATURES.getRoute(onboardingPolicyID)}`,
    navatticURL: getNavatticURL(environment, engagementChoice),
    integrationName,
    workspaceAccountingLink: `${environmentURL}/${ROUTES.POLICY_ACCOUNTING.getRoute(onboardingPolicyID)}`,
    workspaceSettingsLink: `${environmentURL}/${ROUTES.WORKSPACE_INITIAL.getRoute(onboardingPolicyID)}`,
    })

    and here:
    workspaceSettingsLink: `${environmentURL}/${ROUTES.WORKSPACE_INITIAL.getRoute(onboardingPolicyID)}`,

    This is happens in both Titles and Descriptions of the onboarding Tasks

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

    1. For the Title part: In case of test accounts, those which have + in it, the onboarding tasks are created in the concierge chat, while in the case of real users , the onboarding tasks are created in the admin room
      const shouldPostTasksInAdminsRoom =

      Consider this , we will add the backTo route:

    Check if the shouldPostTasksInAdminsRoom is true, then add adminRoom as the backTo route, otherwise the concierge chat.
    for example for the createWorkspace task:

                              workspaceSettingsLink: `${environmentURL}/${ROUTES.WORKSPACE_INITIAL.getRoute(onboardingPolicyID, `/r/${shouldPostTasksInAdminsRoom ? adminsChatReportID :  conciergeChatReportID}`)}`,

    Or directly we can use targetChatReportID, which is found considering the shouldPostTasksInAdminsRoom

    2. For the description part, we have to use the reportID of each task as the backTo route
    let's say if user opens the createWorkspace task, and then they click on the Check it out link, the reportID of the current task report should be the backTo route

    For that instead of generating the reportID inside the buildOptimisticTaskReport, we can generate the reportID, before calling the buildOptimisticTaskReport here:

    const currentTask = buildOptimisticTaskReport(

    as :

             const reportID =  generateReportID()

    and then use this reportID as the backTo route in the description call-to-action link, for ex in the createWorkspace task:

    workspaceSettingsLink: `${environmentURL}/${ROUTES.WORKSPACE_INITIAL.getRoute(onboardingPolicyID)}`,

                             workspaceSettingsLink: `${environmentURL}/${ROUTES.WORKSPACE_INITIAL.getRoute(onboardingPolicyID, `/r/${reportID}`)}`,

    and then pass the same reportID to the buildOptimisticTaskReport, and inside the buildOptimisticTaskReport use it if exists:

    reportID: generateReportID(),

    as:

            reportID:reportID ?? generateReportID(),

    3. Additionally these routes don't support the backTo route currently, we will add that as well:

    ROUTES.POLICY_ACCOUNTING.getRoute
    ROUTES.WORKSPACE_MORE_FEATURES.getRoute
    ROUTES.REPORT_WITH_ID.getRoute
    ROUTES.WORKSPACE_CATEGORIES.getRoute
    ROUTES.WORKSPACE_MEMBERS.getRoute

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    No need

    What alternative solutions did you explore? (Optional)

  15. mountiny commented on Mar 20, 2025

    @mountiny
    Contributor

    As mentioned in the thread, this is not a bug actually, the in app button acts as UP action so it takes you up in the stack.

    The device back or browser history back will take you back to the concierge chat

  16. melvin-bot commented on Mar 25, 2025

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions