-
Notifications
You must be signed in to change notification settings - Fork 240
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
Replace "Sign Out" with an account dialog #2233
Conversation
2e2252c
to
dea854c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to look at the failing agent test.
If you have time and are so inclined, you can now e2e test the isDotCom/or not paths in e2e cribbing from here: https://github.com/sourcegraph/cody/blob/main/vscode/test/e2e/local-embeddings.test.ts#L18-L20
I think the agent tests just needed a replay archive update, I have pushed one to your branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving but double check #2233 (comment)
@dominiccooney this is awesome! I started on an e2e test for this, but couldn't get Playwright to work nicely with the dialogs :( |
CLOSE #2663 & #2664 A bug was introduced in #2233 where we added a requirement for `primaryEmail` during auth, resulting in uncaught error that stopped the extension from starting. For Enterprise instances, emails are not always required to set up an account. This PR includes the following changes to fix the issue above: - update authStatus and graphQL query to reflect that `primaryEmail` and `displayName` fields are optional - add tests for the above change - use username instead of displayName for enterprise instances as username is a required field - replace replace getEnterpriseCurrentUserInfo and getDotComCurrentUserInfo with the new getCurrentUserInfo - update agent tests with the changes above ## Test plan <!-- Required. See https://sourcegraph.com/docs/dev/background-information/testing_principles. --> 1. Log into Cody using an enterprise soucegraph (e.g. S2) token associated with a user that doesn't have emails set up for their account. 2. Try reloading VS Code ### Before Unable to start Cody on reload https://github.com/sourcegraph/cody/assets/68532117/85ad63ef-c422-45a4-b4f8-640d5e11ecf3 ### After https://www.loom.com/share/b9049f54cb0f48da87fc630c84cc736e?sid=0e1b3677-9c3e-4c28-84b5-846f95ad4a16 https://github.com/sourcegraph/cody/assets/68532117/dd2a54f9-dfdf-4ff2-b789-a032dc6b3b1d
Replaces the "Sign Out" option with a new Account dialog that gives you visibility of what user you're signed in as, which server, and what plan.
Notes:
Fixes #1520
Test plan