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

Spec out the new Cody App flow for new onboarding #958

Closed
3 tasks done
chenkc805 opened this issue Sep 7, 2023 · 13 comments
Closed
3 tasks done

Spec out the new Cody App flow for new onboarding #958

chenkc805 opened this issue Sep 7, 2023 · 13 comments
Assignees
Labels

Comments

@chenkc805
Copy link

chenkc805 commented Sep 7, 2023

Subtasks

  1. cla-signed team/iam
    thenamankumar
@chenkc805
Copy link
Author

@taylorsperry do you have the Figma for what the Cody app signup flow is? CC: @toolmantim

@toolmantim
Copy link
Contributor

toolmantim commented Sep 7, 2023

Thanks for creating the issue!

I've just gone and created the designs for this here:
https://www.figma.com/file/INGthyKM1cYki5H02JPDpW/VS-Code-Beta-2-%3C%3E-App-Onboarding?type=design&node-id=0-1&mode=design

cc @dominiccooney @thenamankumar

@taylorsperry
Copy link
Contributor

This looks great!!

@thenamankumar thenamankumar self-assigned this Sep 12, 2023
@thenamankumar
Copy link
Member

I am taking this up!

@chenkc805
Copy link
Author

chenkc805 commented Sep 14, 2023

Removing all other assignees to just @thenamankumar for clarity

Answering Naman's question here:

  1. When the user opens the App some other time later, do they see Cody Chat or the settings page or nothing?
  2. What if embeddings for 1 repo are in progress, and then they open another repo in VS Code and clicked on "Install App" for that repo. How do we show the progress status of two repos now?
  3. We also have an embedding limit in the App. How do we communicate that they have already reached the limit?
  4. What if they were on an old feature branch checked out locally when they clicked on "Install App," but now they went back to main. The embeddings are not updated, how do we communicate that they are stale?
  5. Based on the designs if we want that on first install, the App should automatically start indexing the repo opened in VS Code, we will need to save that somewhere in the filesystem, and then App will read that file and always start indexing the repos on restart/install.
  6. Is there a way for users to delete embeddings if they hit the limit, do we show them the current settings page? Where is that in the flow.

I'm going to organize my response based on the type of question:

  • For usability questions (1, 2): For (1), I think they should see the settings page, since the Cody App as a client is going away in the near future. @taylorsperry can you confirm if you're aligned with this decision? For (2), I don't think they should see "Install App" if they've already installed the app and in the process of embedding a repo. In this case, users shouldn't be able to embed another repo if they already have 1 repo being embedded at the moment. They have to wait until their repo is finished embedding to embed another one.
  • For embeddings behavior in the App (3, 4, 6): Would it suffice to answer to keep the behavior as it is today? For example, for (4) I assume we're already running into this edge case where the branch the user is on doesn't match the branch that they generated embeddings on. Whatever we're doing there (maybe it's nothing), I could see us continuing to do what we're already doing

CC @toolmantim for viz.

@toolmantim
Copy link
Contributor

toolmantim commented Sep 14, 2023

For 1+2, I have moved the VS Code designs into https://www.figma.com/file/INGthyKM1cYki5H02JPDpW/VS-Code-Beta-2-%3C%3E-App-Onboarding?type=design&node-id=0-1&mode=design so we can look at everything in the one place, as well as put in the previous version of the VS Code design that @chenkc805 @dominiccooney and I went through before we simplified it. I assume you may not have seen some of this @thenamankumar?

We also have an embedding limit in the App. How do we communicate that they have already reached the limit?

I don't think this is an actual hard limit at all… it's only enforced by the App during the welcome onboarding. Once you're through that, you can add as many as you like until dotcom starts returning quota exhausted errors.

What if they were on an old feature branch checked out locally when they clicked on "Install App," but now they went back to main. The embeddings are not updated, how do we communicate that they are stale?

I'm not 100% sure of what the cloning behaviour of App is, but I don't think it creates embedding directly from the local repo, but makes it's own clone (maybe from origin?) But I think this is an existing problem with App already, that isn't in scope to change for this release?

In general though I agree w/ @chenkc805, 3-6 sounds like existing behaviour things that we could leave as-is for now while we focus on the core onboarding experience.

@toolmantim
Copy link
Contributor

What if embeddings for 1 repo are in progress, and then they open another repo in VS Code and clicked on "Install App" for that repo. How do we show the progress status of two repos now?

They'd see this:
https://www.figma.com/file/INGthyKM1cYki5H02JPDpW/VS-Code-Beta-2-%3C%3E-App-Onboarding?type=design&node-id=53-468&mode=design&t=Ujl75QIN2V6zciwU-4

They would have to click Open App, manually add the repository, wait for it to be indexed in Cody App, go back to VS Code, and hit "Reload".

They would be using the Settings page of Cody App to see the indexing status.

(fyi there's a pretty bad usability bug in Cody App where it takes up to 1 minute for indexing to kick off after adding an additional repository — which confuses a lot of users because it just appears nothing is happening for a whole minute. If we could kick off this background job immediately instead of waiting for the policy to trigger it after a minute, that would be a huge win for user confidence)

@dominiccooney
Copy link
Contributor

dominiccooney commented Sep 15, 2023

Decisions:

  • Don't hide Cody Chat UX in App

To do:

Credential sharing, initial repo embeddings

  • VS Code, seeing app.json is missing, will author a file vscode.json with a dotcom access token and a list of repositories to index
  • App, if the user has not signed in, finds a vscode.json, it will pick up the access token from that and advance the wizard to index repositories

Embeddings in general:

  • App will support a deep link to index a repository specified in the querystring and will show you the ongoing sync progress or trigger a new sync with a "return to VS Code" button
  • On embeddings complete screen, after user clicks back to VS Code, App should go to Local Repositories page (App will be open)

Nice to have:

  • App: Add the word "Settings" to app next to the cog
  • VS Code uses GraphQL to display repo indexing status

@chenkc805 chenkc805 changed the title Spec out the new app flow for new onboarding Spec out the new Cody App flow for new onboarding Sep 18, 2023
dominiccooney added a commit that referenced this issue Sep 20, 2023
Currently always reflects configuration changes by overwriting the whole
file.

Part of #958 

## Test plan

Manual test:

1. Start VScode
2. Sign in with dotcom
3. `cat ~/Library/Application Support/com.sourcegraph.cody/vscode.json`

The access token and root of the current workspace should appear in the
file, like this:

```
{"dotcomAccessToken":"sgp_etcetc","repoPaths":["/Users/foo/bar"],"redirect":"vscode://sourcegraph.cody-ai/etc"}
```

<!-- Required. See
https://docs.sourcegraph.com/dev/background-information/testing_principles.
-->
@chenkc805
Copy link
Author

chenkc805 commented Sep 22, 2023

@dominiccooney @thenamankumar I linked all the relevant PRs that I know about at the top of this issue to consolidate all the work into 1 place. Can you confirm that this is the right list of issues and that I'm not missing any?

@chenkc805
Copy link
Author

@thenamankumar @toolmantim did we ever align on whether we're going with "end-to-end flow (current)" or "end-to-end flow proposed (v2)" in the Figma?

IMO I think "proposed (v2)" is better because a nice confirmation screen + legal text is helpful to show the user what we're doing. I think it'll feel surprising (in a bad way) to the user if we go with flow 1.

@toolmantim
Copy link
Contributor

v2! 🙌🏼

@chenkc805
Copy link
Author

@thenamankumar can we close this?

@vdavid
Copy link
Contributor

vdavid commented Oct 30, 2023

I guess we can then

@vdavid vdavid closed this as completed Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants