Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable switching from New to Old Dot on web when copiloted in #59306

Open
dangrous opened this issue Mar 28, 2025 · 5 comments
Open

Enable switching from New to Old Dot on web when copiloted in #59306

dangrous opened this issue Mar 28, 2025 · 5 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Reviewing Has a PR in review Weekly KSv2

Comments

@dangrous
Copy link
Contributor

Problem

Currently we disabled switching to/from new/old dot when logged in as a copilot, since the functionality wasn't enabled. It is now!

Why is this important?

Allows full functionality for our users

Solution

Remove the blocks for both flows.

Discussed in Slack, but we are sending a new URL param, delegatorEmail, to the /transition route if the user needs to be re-logged in as a delegate once logged into the base account. We need to pick that up and call Delegate.connect with that info, and, once that's complete, land the user in the correct location.

Test cases:

  • Copilot into an account in Old Dot - go to New Dot - return to Old Dot - switch back to original account
  • Copilot into an account in New Dot - go to Old Dot - return to New Dot - switch back to original account
  • Copilot into an account in Old Dot - go to New Dot - switch back to original account - return to Old Dot
  • Copilot into an account in New Dot - go to Old Dot - switch back to original account - return to New Dot
@dangrous dangrous added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Mar 28, 2025
Copy link

melvin-bot bot commented Mar 28, 2025

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

@thelullabyy
Copy link
Contributor

Proposal

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

Enable switching from New to Old Dot on web when copiloted in

What is the root cause of that problem?

Currently we disabled switching to/from new/old dot when logged in as a copilot, since the functionality wasn't enabled

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

  1. Remove this code block:

    if (isActingAsDelegate) {
    setIsNoDelegateAccessMenuVisible(true);
    return;
    }

  2. Remove these block components:

<DelegateNoAccessWrapper accessDeniedVariants={[CONST.DELEGATE.DENIED_ACCESS_VARIANTS.DELEGATE]}>

<DelegateNoAccessWrapper accessDeniedVariants={[CONST.DELEGATE.DENIED_ACCESS_VARIANTS.DELEGATE]}>

<DelegateNoAccessWrapper accessDeniedVariants={[CONST.DELEGATE.DENIED_ACCESS_VARIANTS.DELEGATE]}>

<DelegateNoAccessWrapper accessDeniedVariants={[CONST.DELEGATE.DENIED_ACCESS_VARIANTS.DELEGATE]}>

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

  • Don't need a test

What alternative solutions did you explore? (Optional)

@ZhenjaHorbach
Copy link
Contributor

@thelullabyy
Thanks for your proposal
But sorry
This is not Help Wanted issue and I'm already working on it
And as part of this issue, we need to update the switch logic from OD to ND while preserving the active copilot if necessary

@thelullabyy
Copy link
Contributor

@ZhenjaHorbach Thanks for your information!

@ZhenjaHorbach
Copy link
Contributor

Not overdue
the PR is in progress

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Overdue Daily KSv2 labels Mar 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

4 participants