-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add account switcher component in the Accounts webview tab (#6159)
## Changes That PR: 1. Fixes webview crashes when switching accounts with Account tab open 2. Add `Switch Account` button on the Accounts tab when `accountSwitchingInWebview` capability is enabled in client. ## Test plan Testing with jetbrains `main`: **Fixes https://linear.app/sourcegraph/issue/QA-150** 1. Open Accounts tab 3. Click Cody icon, then `Manage Accounts` 4. Switch the account 5. Account tab should re-render properly (after a 1-2s delay) showing new account details **Testing with jetbrains [migrated to webview account management](sourcegraph/jetbrains#2382 Account switching: 1. Open Accounts tab 2. Click Switch Account 3. Select account you want to switch to from the list 4. Account tab should re-render properly (after a 1-2s delay) showing new account details Signing out: 1. Open Accounts tab 2. Click Sign Out 3. You should be moved to the Sign In panel Account adding: 1. Open Accounts tab 2. Click 'Switch Account', and then 'Add another account' 3. Type url of your endpoint 4. You should be redirected to the web page to confirm adding the token 5. Account should be added and displayed as active Note: If wrong endpoint is provided web redirection will fail, but no error is displayed in the UI. This definitely can be improved. Account adding with token: 1. Open Accounts tab 2. Click 'Switch Account', and then 'Add another account' 3. Type url of your endpoint 4. Click 'Access Token (optional)' 5. Type incorrect access token and click 'Add and Switch' 6. You should get error saying `Invalid access token.` 7. Type correct access token and click 'Add and Switch' 9. Account should be added and displayed as active ![image](https://github.com/user-attachments/assets/cbd9e85d-8075-45ec-a4ba-2b3a68c07fdb) ![image](https://github.com/user-attachments/assets/10b6d94f-c15d-4fe3-ae70-5b968bb8d251) ![image](https://github.com/user-attachments/assets/0d617e8b-0cc4-48d2-98b7-8e5d548f3f6c) ![image](https://github.com/user-attachments/assets/0ad531f2-5880-4d7a-a66d-31abc2112a79)
- Loading branch information
Showing
14 changed files
with
441 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.