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

cody: auto signin with app #53908

Merged
merged 10 commits into from
Jun 22, 2023
Merged

cody: auto signin with app #53908

merged 10 commits into from
Jun 22, 2023

Conversation

abeatrix
Copy link
Contributor

@abeatrix abeatrix commented Jun 22, 2023

Sign in user automatically when:

  • cody is able to find app token
  • app is running
  • not signed into another instance when cody starts

it also stores the token from the local file to secret storage automatically when found

Test plan

See Loom:

Cody.App.__.Editor.Auth.Flow.-.app.json.mp4
  1. Add Cody.experimental.app.connect = true in your vs code user settings.json
  2. start app and and get token from app
  3. create the app.json file manually (mimic the file that will be created by app when it's ready)
  4. reload VS Code, you should now be signed in automatically (you will see email verification error which will be removed next week)

@cla-bot cla-bot bot added the cla-signed label Jun 22, 2023
@sourcegraph-bot
Copy link
Contributor

sourcegraph-bot commented Jun 22, 2023

📖 Storybook live preview

@chwarwick
Copy link
Contributor

Yesterday's app release includes the app.json file

I tested against that version and it was very smooth.

One nit was when App was installed but not running, it properly told me, but the start app option was the last one, felt like that should have been since it knew that I had app.
Screenshot 2023-06-22 at 7 51 53 AM

When pressing the Open App button I landed here in app which I was surprised by @marekweb is this the generate a new token page? Maybe we can adjust that deep link because I don't think that should be necessary
Screenshot 2023-06-22 at 7 54 39 AM

Copy link
Contributor

@chwarwick chwarwick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested against the latest app version and 👍 it was really smooth just opened right up and ready to go.

The "open app if not running" flow requires a click in App which I don't think should be necessary, so there is probably something there to work out maybe App needs another deep link that just returns right back to the extension.

@@ -0,0 +1,34 @@
export const LOCAL_APP_LOCATIONS: LocalAppPaths = {
darwin: [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a reminder we should add the linux paths here too

@abeatrix
Copy link
Contributor Author

@chwarwick the login page you're seeing is the old one so it has three options. The new login page is hidden behind a flag but if you set Cody.experimental.app.connect to true in your vs code user settings and reload vs code again, you should be able see the new page with only app as an option 😀

Co-authored-by: Marek <marek@sourcegraph.com>
@abeatrix abeatrix merged commit 6e83ce4 into main Jun 22, 2023
22 of 23 checks passed
@abeatrix abeatrix deleted the bee/cody-appjson branch June 22, 2023 22:01
sanderginn pushed a commit that referenced this pull request Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants