cody icon indicating copy to clipboard operation
cody copied to clipboard

onboarding: add endpoint selection UI for non-VSCode IDEs

Open abeatrix opened this issue 1 year ago • 0 comments

CLOSE https://linear.app/sourcegraph/issue/CODY-3701/switch-account-button-does-not-work-in-visual-studio

This change adds a new UI flow for non-VSCode IDEs (e.g. JetBrains IDEs) that allows users to select a Sourcegraph instance from their previously used endpoints.

The key changes are:

  • Add a dropdown to select the Sourcegraph instance from the user's endpoint history
  • Add a button to sign in to the selected instance
  • Add a button to add a new Sourcegraph instance if the desired one is not in the history

The endpoint history is stored and retrieved using the getEndpointHistory() and handleEndpointAuthRequest() functions added in the auth.ts file.

This change ensures a smooth onboarding experience for users of non-VSCode IDEs by providing a familiar way to select and authenticate with their Sourcegraph instance.

The ConfigurationSubsetForWebview interface in protocol.ts has been updated to include the endpointHistory field.

Test plan

Updated

Auth

image

Account Tab

image

Old

Verify the new UI flow doesn't show up in VS Code.

Start Eclipse / JetBrains / Visual Studio with this branch:

  • Manually verify the new UI flow works as expected for non-VSCode IDEs
  • Ensure the existing VSCode IDE onboarding flow is not affected

image image

You can "Sign In" to the selected endpoint, or click "Add New Account" to switch to the regular Sign in page image

image

Changelog

  • Add endpoint selection UI for non-VSCode IDEs

abeatrix avatar Sep 10 '24 22:09 abeatrix