Skip to content

[Due for payment 2026-10-27] [$175] Onboarding - #admins room opens in RHP after joining a workspace with the Join my company workspace intent #104093

Closed

Description

@melvin-bot

Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature
Related: #103652

Action Performed:

  1. Sign up with a private-domain email that has a joinable workspace.
  2. Skip validation.
  3. Select Join my company workspace.
  4. Validate the account.
  5. Select a workspace to join.

Expected Result:

The #admins room does not open in the RHP after you join the workspace.

Actual Result:

The #admins room opens in the RHP.

Why:

The person joins an existing workspace. Its setup tasks may already be done and its settings already changed. The #admins room is the wrong place for them to start, so we should not open it.

Reported in Slack.

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

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 15, 2026
  2. MelvinBot commented on Oct 15, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    When you tap Join now on a workspace that has auto-join turned on and uses the Submit plan, finishOnboarding takes the old Employer/Submit exit path. It checks only the workspace and never checks your onboarding intent (BaseOnboardingWorkspaces.tsx:146-147, L181-L184).

    That path does three things (navigateAfterOnboarding.ts:171-173):

    • sets the side panel variant to RHP_ADMINS_ROOM
    • navigates to Expenses
    • opens the side panel

    With that variant, the side panel shows the active workspace's #admins room (SidePanelContextProvider.tsx:88-95). It does this only when canEditWorkspaceSettings passes, and on a Submit workspace an editor passes that check.

    [Payment due @abzokhattab] Add the join-workspace onboarding intent and Concierge follow up tasks added the Join my company workspace intent. It did not exclude that intent from this branch.

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

    In finishOnboarding, turn off the Submit flow when you are joining with the Join my company workspace intent. To do that, add !isJoiningCompanyWorkspace to shouldUseSubmitFlow. The intent then falls through to navigateAfterOnboardingWithMicrotaskQueue, which lands on Home and keeps the side panel closed.

    Next to the existing Employer test in tests/ui/WorkspaceOnboarding.tsx, add a UI test. It should check that joining an auto-join Submit workspace with the Join intent does not set RHP_ADMINS_ROOM and does not navigate to Expenses. The Employer test must keep passing.

    What alternative solutions did you explore? (Optional)

    You could limit the Submit flow to the Employer intent only. That would also change the existing flow with no intent (LOOKING_AROUND), so it needs a product decision first.

    Investigation details
    • The skip-validation step doesn't cause this. The validated path also ends in finishOnboarding, and the branch depends only on automaticJoiningEnabled && policyType === SUBMIT. The PR's Test 1 probably didn't show #admins because its test workspace wasn't an auto-join Submit workspace. I haven't confirmed this.
    • The backend doesn't supply the variant. The App sets it on the client in navigateToSubmitWorkspaceAfterOnboarding. The backend decides only your role and active workspace after you join.
    • Edge case: if the server already stored an RHP variant for a micro-size company, handleRHPVariantNavigation could still open the side panel. That's unlikely here because the join flow doesn't set company size.
    • I didn't reproduce this in a browser, because it needs a private-domain account with a joinable auto-join Submit workspace.

    Possibly related: [HOLD UX discussion][$175] Close the side panel after onboarding for non-manage-team intents changes the same Employer/Submit exit path.


    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/104093) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.

  3. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Oct 15, 2026
  4. j3ffffff commented on Oct 15, 2026

    @j3ffffff
  5. melvin-bot commented on Oct 15, 2026

    @melvin-bot
    Author

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

  6. changed the title [-]Onboarding - #admins room opens in RHP after joining a workspace with the Join my company workspace intent[/-] [+][$175] Onboarding - #admins room opens in RHP after joining a workspace with the Join my company workspace intent[/+] on Oct 15, 2026
  7. melvin-bot commented on Oct 15, 2026

    @melvin-bot
    Author
  8. abzokhattab commented on Oct 15, 2026

    @abzokhattab
    Contributor

    Reassigning as it's a part of the Bottom-Up Submit Plan project

  9. camesenin commented on Oct 15, 2026

    @camesenin

    Proposal

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

    When a user signs up and joins an existing workspace using the Join my company workspace onboarding intent (CONST.ONBOARDING_CHOICES.JOIN_WORKSPACE), if the workspace has automatic joining enabled and uses the Submit plan, the app unexpectedly navigates to Expenses and opens the workspace's #admins room in the Right Hand Panel (RHP / Concierge Anywhere). Since the user is joining an already established company workspace, opening the #admins room in the RHP is irrelevant and disruptive.

    What is the root cause of that problem?

    In src/pages/OnboardingWorkspaces/BaseOnboardingWorkspaces.tsx (lines 146–147, 181–184):

    const isJoiningSubmitPolicy = policy.policyType === CONST.POLICY.TYPE.SUBMIT;
    const shouldUseSubmitFlow = policy.automaticJoiningEnabled && isJoiningSubmitPolicy;
    ...
    if (shouldUseSubmitFlow) {
        navigateToSubmitWorkspaceAfterOnboardingWithMicrotaskQueue(policy.policyID, shouldUseNarrowLayout);
        return;
    }
    1. shouldUseSubmitFlow only checks whether policy.automaticJoiningEnabled and policy.policyType === CONST.POLICY.TYPE.SUBMIT are truthy. It fails to check onboardingIntent or isJoiningCompanyWorkspace (onboardingIntent === CONST.ONBOARDING_CHOICES.JOIN_WORKSPACE).
    2. When a user joins an existing Submit workspace via the join intent, shouldUseSubmitFlow evaluates to true and invokes navigateToSubmitWorkspaceAfterOnboardingWithMicrotaskQueue.
    3. In src/libs/navigateAfterOnboarding.ts (lines 171–173), navigateToSubmitWorkspaceAfterOnboarding unconditionally sets setOnboardingRHPVariant(CONST.ONBOARDING_RHP_VARIANT.RHP_ADMINS_ROOM) and calls SidePanelActions.openSidePanel(!shouldUseNarrowLayout), forcing the #admins room to open.
    4. When PR [Payment due @abzokhattab] Add the join-workspace onboarding intent and Concierge follow up tasks #103652 introduced the JOIN_WORKSPACE intent, it did not exclude it from shouldUseSubmitFlow.

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

    1. In src/pages/OnboardingWorkspaces/BaseOnboardingWorkspaces.tsx:
      Gate shouldUseSubmitFlow so that it never applies when joining a company workspace:
      const isJoiningSubmitPolicy = policy.policyType === CONST.POLICY.TYPE.SUBMIT;
    - const shouldUseSubmitFlow = policy.automaticJoiningEnabled && isJoiningSubmitPolicy;
    + const shouldUseSubmitFlow = !isJoiningCompanyWorkspace && policy.automaticJoiningEnabled && isJoiningSubmitPolicy;
    1. When isJoiningCompanyWorkspace is true, shouldUseSubmitFlow is false, falling through cleanly to navigateAfterOnboardingWithMicrotaskQueue:
      navigateAfterOnboardingWithMicrotaskQueue(
          isSmallScreenWidth,
          isBetaEnabled(CONST.BETAS.DEFAULT_ROOMS),
          conciergeReportID,
          reportNameValuePairs,
          policy.automaticJoiningEnabled ? policy.policyID : undefined,
          undefined,
    -     false,
    +     isJoiningCompanyWorkspace,
      );

    Passing isJoiningCompanyWorkspace as shouldPreventOpenAdminRoom guarantees that the #admins room is never resolved as the target report across screen layouts, landing the member on Home with the side panel closed.

    What alternative solutions did you explore? (Optional)

    • Restricting shouldUseSubmitFlow strictly to onboardingIntent === CONST.ONBOARDING_CHOICES.EMPLOYER: Rejected to prevent unintended side effects on legacy flows (LOOKING_AROUND). Explicitly checking !isJoiningCompanyWorkspace is surgical and directly addresses the regression from PR [Payment due @abzokhattab] Add the join-workspace onboarding intent and Concierge follow up tasks #103652.
    • Suppressing the RHP variant inside SidePanelContextProvider.tsx: Rejected because treating the symptom inside the side panel provider leaves improper navigation calls firing in the onboarding lifecycle.

    What specific scenarios should we cover in automated tests?

    In tests/unit/pages/OnboardingWorkspacesTest.tsx (or tests/unit/libs/navigateAfterOnboarding.test.ts):

    1. User joins an auto-join Submit workspace with intent JOIN_WORKSPACE: Verify navigateToSubmitWorkspaceAfterOnboardingWithMicrotaskQueue is not called, setOnboardingRHPVariant(CONST.ONBOARDING_RHP_VARIANT.RHP_ADMINS_ROOM) is not invoked, and the side panel remains closed.
    2. User creates/joins a Submit workspace with intent EMPLOYER: Verify navigateToSubmitWorkspaceAfterOnboardingWithMicrotaskQueue continues to execute normally.

    Contributor details
    Your Expensify account email: [email protected]
    Upwork Profile Link: https://www.upwork.com/freelancers/~0170d6b02e9440e604

  10. melvin-bot commented on Oct 15, 2026

    @melvin-bot
    Author

    ✅ Contributor details stored successfully. Thank you for contributing to Expensify!

  11. 7 remaining items

  12. changed the title [-][$175] Onboarding - #admins room opens in RHP after joining a workspace with the Join my company workspace intent[/-] [+][Due for payment 2026-10-27] [$175] Onboarding - #admins room opens in RHP after joining a workspace with the Join my company workspace intent[/+] on Oct 20, 2026
  13. melvin-bot commented on Oct 20, 2026

    @melvin-bot
    Author

    @abzokhattab

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.14-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-10-27. 🎊

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]

  14. melvin-bot commented on Oct 23, 2026

    @melvin-bot
    Author

    @abzokhattab Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  15. abzokhattab commented on Oct 24, 2026

    @abzokhattab
    Contributor

    Should this be closed or kept open for payment? I'm not sure how our project payments work. @hungvu193 @carlosmiceli @garrettmknight

  16. added
    Skip PaymentSkips all the payment process steps for an issue. Use it for fixed-price projects.
    on Oct 26, 2026
  17. garrettmknight commented on Oct 26, 2026

    @garrettmknight
    Contributor

    We'll handle this with the Submit project payment.

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.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorSkip PaymentSkips all the payment process steps for an issue. Use it for fixed-price projects.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions