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

Clean up app-optional onboarding code #1229

Closed
Tracked by #632 ...
chenkc805 opened this issue Sep 28, 2023 · 4 comments · Fixed by #1399
Closed
Tracked by #632 ...

Clean up app-optional onboarding code #1229

chenkc805 opened this issue Sep 28, 2023 · 4 comments · Fixed by #1399
Assignees

Comments

@chenkc805
Copy link

chenkc805 commented Sep 28, 2023

Requirements:

  • Remove any experiment code
  • Remove old code that supported the old flow (tech debt cleanup)
@dominiccooney
Copy link
Contributor

We can do this after Oct 4.

@dominiccooney
Copy link
Contributor

We currently put web users on classic onboarding. Making Cody VScode work well on web is a larger topic, but the specific things which don't work with simplified onboarding:

  • The app setup prompts don't make sense because Cody App doesn't work with VScode web because we can't talk to localhost or the filesystem; the App → VScode redirect doesn't work with VScode web.
  • dotcom redirects need to accept a redirect URL instead of hard-coding CODY or CODY_INSIDERS → vscode://sourcegraph.cody-ai or vscode-insiders://... links. Cody VScode needs to generate that URL.

Note, you can sign in on web with Simplified Onboarding using "Sign In to Enterprise Instance", URL and access token, and enter https://sourcegraph.com .

Best path forward:

  • Do not display the Cody App toasts on VScode web.
  • Make the social login buttons work with VScode web redirects.
  • Make app also use simplified onboarding and delete classic onboarding.

dominiccooney added a commit that referenced this issue Oct 4, 2023
We want to make simplified onboarding the default. Move users who were
previously allocated to the control arm onto the simplified onboarding
experience by ignoring their cached arm.

The only users who use classic onboarding are users on web.

Part of #1229.

## Test plan

- Ensure `"testing.simplified-onboarding"` is not set in User Settings
JSON.
- Run VScode. Sign out of Cody if signed in. You should see the GitHub,
GitLab, Google sign in buttons.
@chenkc805
Copy link
Author

@chenkc805 to understand how many people use VSCode in the web vs in the stand-alone app

@dominiccooney
Copy link
Contributor

I've made a change in #1399 so that VScode Web can log in, but I'm not going to bother hiding the App setup toasts for Web. We don't really support web, and those toasts will go change anyway when we remove App.

dominiccooney added a commit that referenced this issue Oct 18, 2023
- Turn on "simplified" login for VScode Web, but with a simplified,
functional UX. See below.
- Remove the old login UI. There is very little error reporting in the
simplified UI; this adds a generic notification when authentication
fails.
- Update the tests to use "simplified" login.
- Remove the simplified login experiment code, and clean up the cached
experiment arm on startup.
- Add an "enable embeddings" dialog for Enterprise which does not
advertise App, and use the new chat input status widget everywhere.

Notes about login in VScode Web: VScode Web can not use vscode://...
links as-is, but needs to wrap them. Dotcom won't pass tokens to
arbitrary URLs. So we can't use the SSO provider login buttons as-is in
VScode Web without some work. This replaces those buttons with basic
instructions for pasting in tokens. Note, VScode Web is unsupported.
This is just a way to keep login barely functional.

Fixes #1229 

## Test plan

Automated tests:

```
pnpm test:integration && pnpm test:e2e
```

VScode web login manual test:

```
pnpm dev:web
open http://localhost:3000
```

Check the links to dotcom work; sign in by pasting an access token from
dotcom.

Enterprise enable embeddings popup manual test:

1. Run VScode Cody, click *Sign In to Enterprise Instance*
2. Pick *Sign In to Sourcegraph Enterprise Instance v5.1 and above*
3. Enter `https://sourcegraph.sourcegraph.com`
4. Follow the flow to grant a token; you should sign in.
5. *File, Open Folder* and open a clone of
https://github.com/sourcegraph/sourcegraph , the chat input status
indicator should show *Embeddings Enabled* etc.
6. Open a clone of https://github.com/ocaml/ocaml , the chat input
status indicator should show embeddings are *not* available, but should
*not* advertise App. Instead, it should have a link to these docs:
https://docs.sourcegraph.com/cody/explanations/code_graph_context#configuring-embeddings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants