Skip to content

Make copilot::SignIn open sign-in modal when needed#30239

Merged
mgsloan merged 2 commits intomainfrom
make-copilot-signin-open-sign-in-modal-when-needed
May 8, 2025
Merged

Make copilot::SignIn open sign-in modal when needed#30239
mgsloan merged 2 commits intomainfrom
make-copilot-signin-open-sign-in-modal-when-needed

Conversation

@mgsloan
Copy link
Contributor

@mgsloan mgsloan commented May 8, 2025

Also:

  • Makes sign out show status notifications and errors.
  • Reinstall now prompts for sign-in after start.

Addresses some of #29250, but not all of it.

Release Notes:

  • N/A

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label May 8, 2025
.detach_and_log_err(cx);
}
});
cx.observe_new(|workspace: &mut Workspace, _window, _cx| {
Copy link
Contributor

Choose a reason for hiding this comment

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

We should also open model when calling reinstall, as currently it only restarts the lsp and does nothing. Whenever the lsp is restarted the user is logged out and then need to login again.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point! For me LSP restarting does not cause a log out. However, it seems to work gracefully to run the sign in code after reinstall (no prompt for me). A prompt should now appear if necessary.

@mgsloan mgsloan enabled auto-merge (squash) May 8, 2025 14:39
@mgsloan mgsloan merged commit e9a756b into main May 8, 2025
21 checks passed
@mgsloan mgsloan deleted the make-copilot-signin-open-sign-in-modal-when-needed branch May 8, 2025 14:52
lj3954 pushed a commit to lj3954/zed that referenced this pull request May 9, 2025
…#30239)

Also:

* Makes sign out show status notifications and errors.
* Reinstall now prompts for sign-in after start.

Addresses some of zed-industries#29250, but not all of it.

Release Notes:

- N/A
@imumesh18
Copy link
Contributor

Hey @mgsloan sorry to tag you here. Can this be cherry picked for both stable and preview. It will solve quite of a lot issues coming from people on discord and github.

@mgsloan
Copy link
Contributor Author

mgsloan commented May 9, 2025

/cherry-pick v0.185.x

gcp-cherry-pick-bot bot pushed a commit that referenced this pull request May 9, 2025
Also:

* Makes sign out show status notifications and errors.
* Reinstall now prompts for sign-in after start.

Addresses some of #29250, but not all of it.

Release Notes:

- N/A
@mgsloan
Copy link
Contributor Author

mgsloan commented May 9, 2025

/cherry-pick v0.186.x

gcp-cherry-pick-bot bot pushed a commit that referenced this pull request May 9, 2025
Also:

* Makes sign out show status notifications and errors.
* Reinstall now prompts for sign-in after start.

Addresses some of #29250, but not all of it.

Release Notes:

- N/A
mgsloan added a commit that referenced this pull request May 9, 2025
…0239) (#30350)

Cherry-picked Make `copilot::SignIn` open sign-in modal when needed
(#30239)

Also:

* Makes sign out show status notifications and errors.
* Reinstall now prompts for sign-in after start.

Addresses some of #29250, but not all of it.

Release Notes:

- N/A

Co-authored-by: Michael Sloan <michael@zed.dev>
mgsloan added a commit that referenced this pull request May 9, 2025
…0239) (#30349)

Cherry-picked Make `copilot::SignIn` open sign-in modal when needed
(#30239)

Also:

* Makes sign out show status notifications and errors.
* Reinstall now prompts for sign-in after start.

Addresses some of #29250, but not all of it.

Release Notes:

- N/A

Co-authored-by: Michael Sloan <michael@zed.dev>
morgankrey added a commit that referenced this pull request Dec 22, 2025
Now I have enough context to generate the documentation update summary:

---

## Documentation Update Summary

### Changes Made
| File | Change | Related Code |
| --- | --- | --- |
| `docs/src/ai/edit-prediction.md` | Updated GitHub Copilot sign-in instructions to describe the new popup window flow with device code display, copy button, and "Connect to GitHub" button | PR #30239 (`e9a756b5fc`) |
| `docs/src/ai/edit-prediction.md` | Updated Codestral setup instructions to direct users to Settings Editor → Edit Predictions instead of Agent Panel | PR #44505 (`0283bfb049`) |

### Rationale
These documentation updates reflect two UI changes in Zed:

1. **Copilot Sign-in Flow**: The sign-in process was redesigned from a simple status bar prompt to a dedicated popup window (`CopilotCodeVerification`) that displays the device code with copy functionality and a "Connect to GitHub" button. The window auto-closes on successful authorization. The previous documentation was too vague ("follow the setup instructions").

2. **Codestral Configuration**: Edit prediction providers can now be configured through the graphical Settings Editor rather than requiring users to navigate to the Agent Panel settings view. This provides a more discoverable and consistent configuration experience.

### Review Notes
- **Keyboard shortcuts**: The Codestral section now includes platform-specific shortcuts (`Cmd+,` / `Ctrl+,`). Reviewers should verify these match the current keybindings.
- **Consistency**: Both changes improve documentation specificity by describing exact UI elements rather than generic "follow instructions" language.
- **No skipped changes**: All planned updates from Phase 4 were successfully applied.
- **Formatting verified**: File passes Prettier 80-character line width check.

---

### Condensed Version (for commit message)

```
docs: Update edit prediction provider setup instructions

- Copilot: Document new popup sign-in flow with device code display
- Codestral: Direct to Settings Editor instead of Agent Panel

Reflects UI changes from PRs #30239 and #44505.
```

Triggered by: PR #44505

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants