Commit graph

621 commits

Author SHA1 Message Date
Danilo Leal
bd4e943597
acp: Add onboarding modal & title bar banner (#36784)
Release Notes:

- N/A

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2025-08-26 16:59:12 -03:00
Mikayla Maki
91b2a84001
Add a few more testing features (#36778)
Release Notes:

- N/A

---------

Co-authored-by: Marshall <marshall@zed.dev>
2025-08-22 22:17:02 +00:00
Max Brunsfeld
f649c31bf9
Restructure persistence of remote workspaces to make room for WSL and other non-ssh remote projects (#36714)
This is another pure refactor, to prepare for adding direct WSL support.

###  Todo

* [x] Represent `paths` in the same way for all workspaces, instead of
having a completely separate SSH representation
* [x] Adjust sqlite tables
    * [x] `ssh_projects` -> `ssh_connections` (drop paths)
    * [x] `workspaces.local_paths` -> `paths`
    * [x] remove duplicate path columns on `workspaces`
* [x] Add migrations for backward-compatibility

Release Notes:

- N/A

---------

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
2025-08-22 14:10:45 -07:00
Anthony Eid
8204ef1e51
onboarding: Remove accept AI ToS from within Zed (#36612)
Users now accept ToS from Zed's website when they sign in to Zed the
first time. So it's no longer possible that a signed in account could
not have accepted the ToS.


Release Notes:

- N/A

---------

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
2025-08-22 11:45:47 -04:00
Ben Kunkle
eeaadc098f
Add GPU info to Sentry crashes (#36624)
Closes #ISSUE

Adds system GPU collection to crash reporting. Currently this is Linux
only.

The system GPUs are determined by reading the `/sys/class/drm` directory
structure, rather than using the exisiting `gpui::Window::gpu_specs()`
method in order to gather more information, and so that the GPU context
is not dependent on Vulkan context initialization (i.e. we still get GPU
info when Zed fails to start because Vulkan failed to initialize).

Unfortunately, the `blade` APIs do not support querying which GPU _will_
be used, so we do not know which GPU was attempted to be used when
Vulkan context initialization fails, however, when Vulkan initialization
succeeds, we send a message to the crash handler containing the result
of `gpui::Window::gpu_specs()` to include the "Active" gpu in any crash
report that may occur

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-08-21 19:59:42 -04:00
Julia Ryan
1b2ceae7ef
Use Tokio::spawn instead of getting an executor handle (#36701)
This was causing panics due to the handles being dropped out of order.
It doesn't seem possible to guarantee the correct drop ordering given
that we're holding them over await points, so lets just spawn on the
tokio executor itself which gives us access to the state we needed those
handles for in the first place.

Fixes: ZED-1R

Release Notes:

- N/A

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-08-21 17:19:57 +00:00
tidely
6ed29fbc34
Enforce style lints which do not have violations (#36580)
Release Notes:

- N/A
2025-08-20 14:07:37 +02:00
tidely
7bdc99abc1
Fix clippy::redundant_clone lint violations (#36558)
This removes around 900 unnecessary clones, ranging from cloning a few
ints all the way to large data structures and images.

A lot of these were fixed using `cargo clippy --fix --workspace
--all-targets`, however it often breaks other lints and needs to be run
again. This was then followed up with some manual fixing.

I understand this is a large diff, but all the changes are pretty
trivial. Rust is doing some heavy lifting here for us. Once I get it up
to speed with main, I'd appreciate this getting merged rather sooner
than later.

Release Notes:

- N/A
2025-08-20 12:20:13 +02:00
Piotr Osiewicz
cf7c64d77f
lints: A bunch of extra style lint fixes (#36568)
- **lints: Fix 'doc_lazy_continuation'**
- **lints: Fix 'doc_overindented_list_items'**
- **inherent_to_string and io_other_error**
- **Some more lint fixes**
- **lints: enable bool_assert_comparison, match_like_matches_macro and
wrong_self_convention**


Release Notes:

- N/A
2025-08-20 12:05:58 +02:00
Piotr Osiewicz
05fc0c432c
Fix a bunch of other low-hanging style lints (#36498)
- **Fix a bunch of low hanging style lints like unnecessary-return**
- **Fix single worktree violation**
- **And the rest**

Release Notes:

- N/A
2025-08-19 21:26:17 +02:00
Piotr Osiewicz
c4083b9b63
Fix unnecessary-mut-passed lint (#36490)
Release Notes:

- N/A
2025-08-19 14:20:01 +00:00
Piotr Osiewicz
8f567383e4
Auto-fix clippy::collapsible_if violations (#36428)
Release Notes:

- N/A
2025-08-19 13:27:24 +00:00
Marshall Bowers
33fbe53d48
client: Make Client::sign_in_with_optional_connect a no-op when already connected to Collab (#36449)
This PR makes it so `Client::sign_in_with_optional_connect` does nothing
when the user is already connected to Collab.

This fixes the issue where clicking on a channel link would temporarily
disconnect you from Collab.

Release Notes:

- N/A
2025-08-18 23:16:28 +00:00
Piotr Osiewicz
9e0e233319
Fix clippy::needless_borrow lint violations (#36444)
Release Notes:

- N/A
2025-08-18 21:54:35 +00:00
Marshall Bowers
50819a9d20
client: Parse auth callback query parameters before showing sign-in success page (#36440)
This PR fixes an issue where we would redirect the user's browser to the
sign-in success page even if the OAuth callback was malformed.

We now parse the OAuth callback parameters from the query string and
only redirect to the sign-in success page when they are valid.

Release Notes:

- Updated the sign-in flow to not show the sign-in success page
prematurely.
2025-08-18 19:57:28 +00:00
Marshall Bowers
2a9d4599cd
proto: Remove unused types (#36269)
This PR removes some unused types from the RPC protocol.

Release Notes:

- N/A
2025-08-15 19:46:23 +00:00
Marshall Bowers
b3cad8b527
proto: Remove UpdateUserPlan message (#36268)
This PR removes the `UpdateUserPlan` RPC message.

We're no longer using the message after
https://github.com/zed-industries/zed/pull/36255.

Release Notes:

- N/A
2025-08-15 19:21:04 +00:00
Marshall Bowers
bd1fda6782
proto: Remove GetPrivateUserInfo message (#36265)
This PR removes the `GetPrivateUserInfo` RPC message.

We're no longer using the message after
https://github.com/zed-industries/zed/pull/36255.

Release Notes:

- N/A
2025-08-15 18:27:31 +00:00
Anthony Eid
255bb0a3f8
telemetry: Reduce the amount of telemetry events fired (#36060)
1. Extension loaded events are now condensed into a single event with a
Vec of (extension_id, extension_version) called id_and_versions.
2. Editor Saved & AutoSaved are merged into a singular event with a type
field that is either "manual" or "autosave”.
3. Editor Edited event will only fire once every 10 minutes now.
4. Editor Closed event is fired when an editor item (tab) is removed
from a pane



cc: @katie-z-geer 

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-08-12 19:56:27 +00:00
Danilo Leal
024a5bbcd0
onboarding: Add some adjustments (#35887)
Release Notes:

- N/A
2025-08-08 16:40:41 -03:00
Marshall Bowers
315a92091b
Ensure Edit Prediction provider is properly assigned on sign-in (#35885)
This PR fixes an issue where Edit Predictions would not be available in
buffers that were opened when the workspace loaded.

The issue was that there was a race condition between fetching/setting
the authenticated user state and when we assigned the Edit Prediction
provider to buffers that were already opened.

We now wait for the event that we emit when we have successfully loaded
the user in order to assign the Edit Prediction provider, as we'll know
the user has been loaded into the `UserStore` by that point.

Closes https://github.com/zed-industries/zed/issues/35883

Release Notes:

- Fixed an issue where Edit Predictions were not working in buffers that
were open when the workspace initially loaded.

Co-authored-by: Richard Feldman <oss@rtfeldman.com>
2025-08-08 18:10:09 +00:00
Marshall Bowers
50482a6bc2
language_model: Refresh the LLM token upon receiving a UserUpdated message from Cloud (#35839)
This PR makes it so we refresh the LLM token upon receiving a
`UserUpdated` message from Cloud over the WebSocket connection.

Release Notes:

- N/A
2025-08-07 23:00:45 +00:00
Marshall Bowers
11efa32fa7
client: Only connect to Collab automatically for Zed staff (#35827)
This PR makes it so that only Zed staff connect to Collab automatically.

Anyone else can connect to Collab manually when they want to collaborate
(but this is not required for using Zed's LLM features).

Release Notes:

- N/A

---------

Co-authored-by: Richard <richard@zed.dev>
2025-08-07 22:14:25 +00:00
Marshall Bowers
106d4cfce9
client: Re-fetch the authenticated user when receiving a UserUpdated message from Cloud (#35807)
This PR wires up handling for the new `UserUpdated` message coming from
Cloud over the WebSocket connection.

When we receive this message we will refresh the authenticated user.

Release Notes:

- N/A

Co-authored-by: Richard <richard@zed.dev>
2025-08-07 21:44:53 +00:00
Richard Feldman
1907b16fe6
Establish WebSocket connection to Cloud (#35734)
This PR adds a new WebSocket connection to Cloud.

This connection will be used to push down notifications from the server
to the client.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-08-07 01:28:41 +00:00
Max Brunsfeld
f017ffdffc
Fix minidump endpoint configuration (#35646)
Release Notes:

- N/A
2025-08-05 10:07:30 -07:00
Antonio Scandurra
efba4364fd
Ensure client reconnects if an error occurs during authentication (#35629)
In #35471, we added a new `AuthenticationError` variant to the client
enum `Status`, but the reconnection logic was ignoring it when
determining whether to reconnect.

This pull request fixes that regression and introduces test coverage for
this case.

Release Notes:

- N/A
2025-08-05 09:33:33 +00:00
Julia Ryan
669c57b45f
Add minidump crash reporting (#35263)
- [x] Handle uploading minidumps from the remote_server
- [x] Associate minidumps with panics with some sort of ID (we don't use
session_id on the remote)
  - [x] Update the protobufs and client/server code to request panics
- [x] Upload minidumps with no corresponding panic
- [x] Fill in panic info when there _is_ a corresponding panic
- [x] Use an env var for the sentry endpoint instead of hardcoding it

Release Notes:

- Zed now generates minidumps for crash reporting

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2025-08-04 18:19:42 -07:00
Michael Sloan
899bc8a8fd
Fix edit prediction disablement with "disable_ai": true setting (#35513)
Even after #35327 edit predictions were still being queried and shown
after setting `"disable_ai": true`

Also moves `DisableAiSettings` to the `project` crate so that it gets
included in tests via existing use of `Project::init_settings(cx)`.

Release Notes:

- Fixed `"disable_ai": true` setting disabling edit predictions.
2025-08-04 15:45:11 +00:00
Antonio Scandurra
7217439c97
Don't trigger authentication flow unless credentials expired (#35570)
This fixes a regression introduced in
https://github.com/zed-industries/zed/pull/35471, where we treated
stored credentials as invalid when failing to retrieve the authenticated
user for any reason. This had the side effect of triggering the auth
flow even when e.g. the client/server had temporary networking issues.

This pull request changes the logic to only trigger authentication when
getting a 401 from the server.

Release Notes:

- N/A
2025-08-04 08:41:23 +00:00
Antonio Scandurra
f888f3fc0b
Start separating authentication from connection to collab (#35471)
This pull request should be idempotent, but lays the groundwork for
avoiding to connect to collab in order to interact with AI features
provided by Zed.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
2025-08-01 17:37:38 +00:00
Marshall Bowers
f7f90593ac
inline_completion_button: Replace UserStore with CloudUserStore (#35456)
This PR replaces usages of the `UserStore` in the inline completion
button with the `CloudUserStore`.

Release Notes:

- N/A
2025-08-01 03:25:23 +00:00
Marshall Bowers
8be3f48f37
client: Remove unused subscription_period from UserStore (#35454)
This PR removes the `subscription_period` field from the `UserStore`, as
its usage has been replaced by the `CloudUserStore`.

Release Notes:

- N/A
2025-08-01 03:10:16 +00:00
Marshall Bowers
72d354de6c
Update Agent panel to work with CloudUserStore (#35436)
This PR updates the Agent panel to work with the `CloudUserStore`
instead of the `UserStore`, reducing its reliance on being connected to
Collab to function.

Release Notes:

- N/A

---------

Co-authored-by: Richard Feldman <oss@rtfeldman.com>
2025-08-01 01:44:43 +00:00
Marshall Bowers
09b93caa9b
Rework authentication for local Cloud/Collab development (#35450)
This PR reworks authentication for developing Zed against a local
version of Cloud and/or Collab.

You will still connect the same way—using the `zed-local` script—but
will need to be running an instance of Cloud locally.

Release Notes:

- N/A
2025-08-01 00:55:17 +00:00
Marshall Bowers
410348deb0
Acquire LLM token from Cloud instead of Collab for Edit Predictions (#35431)
This PR updates the Zed Edit Prediction provider to acquire the LLM
token from Cloud instead of Collab to allow using Edit Predictions even
when disconnected from or unable to connect to the Collab server.

Release Notes:

- N/A

---------

Co-authored-by: Richard Feldman <oss@rtfeldman.com>
2025-07-31 22:12:04 +00:00
Anthony Eid
c6947ee4f0
onboarding ui: Add theme preview tiles and button functionality to basic page (#35413)
This PR polishes and adds functionality to the onboarding UI with a
focus on the basic page. It added theme preview tiles, got the Vim,
telemetry, crash reporting, and sign-in button working.

The theme preview component was moved to the UI crate and it now can
have a click handler on it.

Finally, this commit also changed `client::User.github_login` and
`client::UserStore.by_github_login` to use `SharedStrings` instead of
`Strings`. This change was made because user.github_login was cloned in
several areas including the UI, and was cast to a shared string in some
cases too.

Release Notes:

- N/A

---------

Co-authored-by: Remco Smits <djsmits12@gmail.com>
2025-07-31 18:40:41 +00:00
Marshall Bowers
558bbfffae
title_bar: Show the plan from the CloudUserStore (#35401)
This PR updates the user menu in the title bar to show the plan from the
`CloudUserStore` instead of the `UserStore`.

We're still leveraging the RPC connection to listen for `UpdateUserPlan`
messages so that we can get live-updates from the server, but we are
merely using this as a signal to re-fetch the information from Cloud.

Release Notes:

- N/A
2025-07-31 13:56:53 +00:00
Marshall Bowers
b90fd4287f
client: Don't fetch the authenticated user once we have them (#35385)
This PR makes it so we don't keep fetching the authenticated user once
we have them.

Release Notes:

- N/A
2025-07-31 03:37:02 +00:00
Marshall Bowers
fbc784d323
Use the user from the CloudUserStore to drive the user menu (#35375)
This PR updates the user menu in the title bar to base the "signed in"
state on the user in the `CloudUserStore` rather than the `UserStore`.

This makes it possible to be signed-in—at least, as far as the user menu
is concerned—even when disconnected from Collab.

Release Notes:

- N/A
2025-07-30 20:31:22 -04:00
Marshall Bowers
bb1a7ccbba
client: Add CloudUserStore (#35370)
This PR adds a new `CloudUserStore` for storing information about the
user retrieved from Cloud instead of Collab.

Release Notes:

- N/A
2025-07-30 18:43:10 -04:00
Marshall Bowers
bc6bb42745
Add cloud_api_client and cloud_api_types crates (#35357)
This PR adds two new crates for interacting with Cloud:

- `cloud_api_client` - The client that will be used to talk to Cloud.
- `cloud_api_types` - The types for the Cloud API that are shared
between Zed and Cloud.

Release Notes:

- N/A
2025-07-30 18:57:51 +00:00
Antonio Scandurra
45af1fcc2f
Always double reconnection delay and add jitter (#35337)
Previously, we would pick an exponent between 0.5 and 2.5, which would
cause a lot of clients to try reconnecting in rapid succession,
overwhelming the server as a result.

This pull request always doubles the previous delay and introduces a
jitter that can, at most, double it.

As part of this, we're also increasing the maximum reconnection delay
from 10s to 30s: this gives us more space to spread out the reconnection
requests.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-07-30 15:34:09 +00:00
Marshall Bowers
7be1f2418d
Replace zed_llm_client with cloud_llm_client (#35309)
This PR replaces the usage of the `zed_llm_client` with the
`cloud_llm_client`.

It was ported into this repo in #35307.

Release Notes:

- N/A
2025-07-30 00:09:14 +00:00
Marshall Bowers
f9224b1d74
client: Send User-Agent header on WebSocket connection requests (#35280)
This PR makes it so we send the `User-Agent` header on the WebSocket
connection requests when connecting to Collab.

We use the user agent set on the parent HTTP client.

Release Notes:

- N/A
2025-07-29 16:53:56 +00:00
Marshall Bowers
a8bdf30259
client: Fix typo in the error message (#35275)
This PR fixes a typo in the error message for when we fail to parse the
Collab URL.

Release Notes:

- N/A
2025-07-29 15:45:49 +00:00
Joseph T. Lyons
45ddf32a1d
Fix variable name in project type reporting (#35045)
Release Notes:

- N/A
2025-07-24 17:08:02 +00:00
Danilo Leal
29332c1962
ai onboarding: Add overall fixes to the whole flow (#34996)
Closes https://github.com/zed-industries/zed/issues/34979

Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <hi@aguz.me>
Co-authored-by: Ben Kunkle <Ben.kunkle@gmail.com>
2025-07-24 11:26:15 -03:00
Richard Feldman
96f9942791
Add setting to disable all AI features (#34896)
https://github.com/user-attachments/assets/674bba41-40ac-4a98-99e4-0b47f9097b6a


Release Notes:

- Added setting to disable all AI features
2025-07-22 11:32:39 -04:00
Danilo Leal
eaccd542fd
Add fast-follows to the AI onboarding flow (#34737)
Follow-up to https://github.com/zed-industries/zed/pull/33738.

Release Notes:

- N/A

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2025-07-22 02:09:05 -03:00