Commit graph

2288 commits

Author SHA1 Message Date
Marshall Bowers
46ed9f2559
collab: Remove unused billing-related database code (#36282)
This PR removes a bunch of unused database code related to billing, as
we no longer need it.

Release Notes:

- N/A
2025-08-23 10:39:17 -04:00
Marshall Bowers
fc33185f87
collab: Remove GET /users/look_up endpoint (#36279)
This PR removes the `GET /users/look_up` endpoint from Collab, as it has
been moved to Cloud.

Release Notes:

- N/A
2025-08-23 10:39:17 -04:00
Marshall Bowers
fc5feabed4
collab: Remove Stripe code (#36275)
This PR removes the code for integrating with Stripe from Collab.

All of these concerns are now handled by Cloud.

Release Notes:

- N/A
2025-08-23 10:39:16 -04:00
Marshall Bowers
a17ed9335b
proto: Remove AcceptTermsOfService message (#36272)
This PR removes the `AcceptTermsOfService` RPC message.

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

Release Notes:

- N/A
2025-08-23 10:39:16 -04:00
Joseph T. Lyons
7b92861b55
Remove old telemetry events and transformation layer (#36263)
Successor to: https://github.com/zed-industries/zed/pull/25179

Release Notes:

- N/A
2025-08-23 10:39:16 -04:00
Marshall Bowers
f70c7f7dcd
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-23 10:39:16 -04:00
Marshall Bowers
bf34a61c8f
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-23 10:39:16 -04:00
Marshall Bowers
e940255a0a
Remove RPC messages pertaining to the LLM token (#36252)
This PR removes the RPC messages pertaining to the LLM token.

We now retrieve the LLM token from Cloud.

Release Notes:

- N/A
2025-08-23 10:39:16 -04:00
Marshall Bowers
4ef338cd77
collab: Increase minimum required version to connect (#36255)
This PR increases the minimum required version to connect to Collab.

Previously this was set at v0.157.0.

The new minimum required version is v0.198.4, which is the first version
where we no longer connect to Collab automatically.

Clients on the v0.199.x minor version will also need to be v0.199.2 or
greater in order to connect, due to us hotfixing the connection changes
to the Preview branch.

We're doing this to force clients to upgrade in order to connect to
Collab, as we're going to be removing some of the old RPC usages related
to authentication that are no longer used. Therefore, we want users to
be on a version of Zed that does not rely on those messages.

Users will see a message similar to this one, prompting them to upgrade:

<img width="1209" height="875" alt="Screenshot 2025-08-15 at 11 37
55 AM"
src="https://github.com/user-attachments/assets/59ffff3e-8f82-4152-84a8-776c691eaaee"
/>

> Note: In this case I'm simulating the error state, which is why I'm
signed in via Cloud while still not being able to connect to Collab.
Users on older versions will see the "Please update Zed to Collaborate"
message without being signed in.

Release Notes:

- N/A
2025-08-23 10:39:16 -04:00
Marshall Bowers
7acaec2070
collab: Remove endpoints for issuing notifications from Cloud (#36249)
This PR removes the `POST /users/:id/refresh_llm_tokens` and `POST
/users/:id/update_plan` endpoints from Collab.

These endpoints were added to be called by Cloud in order to push down
notifications over the Collab RPC connection.

Cloud now sends down notifications to clients directly, so we no longer
need these endpoints.

All calls to these endpoints have already been removed in production.

Release Notes:

- N/A
2025-08-23 10:39:15 -04:00
Kirill Bulatov
c353ca7550
Add release_channel data to request child spans (#35874)
Follow-up of https://github.com/zed-industries/zed/pull/35729

Release Notes:

- N/A
2025-08-23 10:38:15 -04:00
Abdelhakim Qbaich
79e587e120
git: Make inline blame padding configurable (#33631)
Just like with diagnostics, adding a configurable padding to inline
blame

Release Notes:

- Added configurable padding to inline blame

---------

Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Peter Tripp <petertripp@gmail.com>
2025-08-23 10:38:14 -04:00
Mikayla Maki
1485532c69
Move timing fields into span (#35833)
Release Notes:

- N/A
2025-08-23 10:38:14 -04:00
Kirill Bulatov
2db456c840
Actually update remote collab capabilities (#35809)
Follow-up of https://github.com/zed-industries/zed/pull/35682

Release Notes:

- N/A
2025-08-23 10:38:13 -04:00
Marshall Bowers
524b36fdfc
collab: Increase DATABASE_MAX_CONNECTIONS for Collab server (#35818)
This PR increases the `DATABASE_MAX_CONNECTIONS` limit for the Collab
server to 850 (up from 250).

Release Notes:

- N/A

Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
2025-08-23 10:38:12 -04:00
Kirill Bulatov
5cf41d11db
Batch diagnostics updates (#35794)
Diagnostics updates were programmed in Zed based off the r-a LSP push
diagnostics, with all related updates happening per file.

https://github.com/zed-industries/zed/pull/19230 and especially
https://github.com/zed-industries/zed/pull/32269 brought in pull
diagnostics that could produce results for thousands files
simultaneously.

It was noted and addressed on the local side in
https://github.com/zed-industries/zed/pull/34022 but the remote side was
still not adjusted properly.

This PR 

* removes redundant diagnostics pull updates on remote clients, as
buffer diagnostics are updated via buffer sync operations separately
* batches all diagnostics-related updates and proto messages, so
multiple diagnostic summaries (per file) could be sent at once,
specifically, 1 (potentially large) diagnostics summary update instead
of N*10^3 small ones.

Buffer updates are still sent per buffer and not updated, as happening
separately and not offending the collab traffic that much.

Release Notes:

- Improved diagnostics performance in the collaborative mode
2025-08-23 10:38:12 -04:00
Kirill Bulatov
ac47118f9f
Add release_channel into the span fields list (#35783)
Follow-up of https://github.com/zed-industries/zed/pull/35729

Release Notes:

- N/A

Co-authored-by: Marshall Bowers <marshall@zed.dev>
2025-08-23 10:38:11 -04:00
Marshall Bowers
4337920a2b
collab: Remove unused StripeBilling methods (#35740)
This PR removes some unused methods from the `StripeBilling` object.

Release Notes:

- N/A
2025-08-23 10:38:10 -04:00
Marshall Bowers
217ec79a0b
collab: Remove Stripe events polling (#35736)
This PR removes the Stripe event polling from Collab, as it has been
moved to Cloud.

Release Notes:

- N/A
2025-08-23 10:38:10 -04:00
Kirill Bulatov
f3acb41134
Add a way to distinguish metrics by Zed's release channel (#35729)
Release Notes:

- N/A

---------

Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
2025-08-23 10:38:10 -04:00
Kirill Bulatov
e30cf0c439
Use new language server info on remote servers (#35682)
* Straightens out the `*_ext.rs` workflow for clangd and rust-analyzer:
no need to asynchronously query for the language server, as we sync that
information already.
* Fixes inlay hints editor menu toggle not being shown in the remote
sessions

Release Notes:

- Fixed inlay hints editor menu toggle not being shown in the remote
sessions
2025-08-23 10:37:27 -04:00
Marshall Bowers
46e588c673
collab: Remove unused billing queries (#35679)
This PR removes some billing-related queries that are no longer used.

Release Notes:

- N/A
2025-08-23 10:37:27 -04:00
Marshall Bowers
883a455bb4
collab: Remove usage meters sync (#35674)
This PR removes the usage meters sync from Collab, as it has been moved
to Cloud.

Release Notes:

- N/A
2025-08-23 10:37:27 -04:00
Kirill Bulatov
59286a92f8
Stop sending redundant LSP proto requests (#35581)
Before, each time any LSP feature was used on client remote, it always
produced a `proto::` request that always had been sent to the host, from
where returned as an empty response.

Instead, propagate more language server-related data to the client,
`lsp::ServerCapability`, so Zed client can omit certain requests if
those are not supported.

On top of that, rework the approach Zed uses to query for the data
refreshes: before, editors tried to fetch the data when the server start
was reported (locally and remotely).
Now, a later event is selected: on each `textDocument/didOpen` for the
buffer contained in this editor, we will query for new LSP data, reusing
the cache if needed.

Before, servers could reject unregistered files' LSP queries, or process
them slowly when starting up.
Now, such refreshes are happening later and should be cached.

This requires a collab DB change, to restore server data on rejoin.

Release Notes:

- Fixed excessive LSP requests sent during remote sessions
2025-08-23 10:37:26 -04:00
Mikayla Maki
392ac44004
Add more information to our logs (#35557)
Add more logging to collab in order to help diagnose throughput issues.

IMPORTANT: Do not deploy this PR without pinging me.

Release Notes:

- N/A

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2025-08-23 10:37:25 -04:00
Michael Sloan
01d0865251
Rename remaining mentions of "inline completion" to "edit prediction" (#35512)
Release Notes:

- N/A
2025-08-23 10:37:24 -04:00
Antonio Scandurra
2d275bed4b
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-23 10:37:12 -04:00
Marshall Bowers
c3b19e8771
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-23 10:36:14 -04:00
Mikayla Maki
52351f5343
Add a field to MultiLSPQuery span showing the current request (#35372)
Release Notes:

- N/A
2025-08-23 10:36:14 -04:00
Mikayla Maki
c7495d9dad
Revert "Increase the number of parallel request handlers per connection" (#35435)
Reverts zed-industries/zed#35046

This made the problem worse ;-;

Release Notes:

- N/A
2025-08-23 10:36:13 -04:00
Anthony Eid
d29d89fad6
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-08-23 10:36:13 -04:00
Marshall Bowers
e3f3600731
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-08-23 10:36:13 -04:00
Marshall Bowers
a6e2763b40
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-08-23 10:36:12 -04:00
Marshall Bowers
2b189e1327
collab: Temporarily add back GET /user endpoint for local development (#35358)
This PR temporarily adds back the `GET /user` endpoint to Collab since
we're still using it for local development.

Will remove it again once we update the local development process to
leverage Cloud.

Release Notes:

- N/A
2025-08-23 10:36:12 -04:00
Antonio Scandurra
b0068d91d5
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-08-23 10:36:11 -04:00
Marshall Bowers
f28a728653
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-08-23 10:36:11 -04:00
Marshall Bowers
529d75216d
collab: Add kill switches for syncing data to and from Stripe (#35304)
This PR adds two kill switches for syncing data to and from Stripe using
Collab.

The `cloud-stripe-events-polling` and `cloud-stripe-usage-meters-sync`
feature flags control whether we use Cloud for polling Stripe events and
updating Stripe meters, respectively.

When we're ready to hand off the syncing to Cloud we can enable the
feature flag to do so.

Release Notes:

- N/A
2025-08-23 10:36:06 -04:00
Marshall Bowers
390103bb0d
collab: Remove GET /user endpoint (#35301)
This PR removes the `GET /user` endpoint, as it has been moved to
`cloud.zed.dev`.

Release Notes:

- N/A
2025-08-23 10:36:06 -04:00
Marshall Bowers
b07878b324
collab: Attach User-Agent to handle connection span (#35282)
This PR makes it so we attach the value from the `User-Agent` header to
the `handle connection` span.

We'll start sending this header in
https://github.com/zed-industries/zed/pull/35280.

Release Notes:

- N/A
2025-08-23 10:36:05 -04:00
Marshall Bowers
430b3598cc
collab: Remove POST /billing/subscriptions/sync endpoint (#35232)
This PR removes the `POST /billing/subscriptions/sync` endpoint, as it
has been moved to `cloud.zed.dev`.

Release Notes:

- N/A
2025-08-23 10:36:04 -04:00
Alvaro Parker
ca5d9ae675
git: Enable git stash in git panel (#32821)
Related discussion #31484

Release Notes:

- Added a menu entry on the git panel to git stash and git pop stash. 

Preview: 


![Screenshot-2025-06-17_08:26:36](https://github.com/user-attachments/assets/d3699ba4-511f-4c7b-a7cc-00a295d01f64)

---------

Co-authored-by: Cole Miller <cole@zed.dev>
2025-08-23 10:36:02 -04:00
Mikayla Maki
d60819e597
Increase the number of parallel request handlers per connection (#35046)
Discussed this with @ConradIrwin. The problem we're having with collab
is that a bunch of LSP requests take a really long time to resolve,
particularly `RefreshCodeLens`. But Those requests are sharing a limited
amount of concurrency that we've allocated for all message traffic on
one connection. That said, there's not _that_ many concurrent requests
made at any one time. The burst traffic seems to top out in the low
hundreds for these requests. So let's just expand the amount of space in
the queue to accommodate these long-running requests while we work on
upgrading our cloud infrastructure.

Release Notes:

- N/A

Co-authored-by: finn <finn@zed.dev>
2025-08-23 10:35:54 -04:00
Marshall Bowers
48a4593cc3
collab: Remove POST /billing/subscriptions/manage endpoint (#34986)
This PR removes the `POST /billing/subscriptions/manage` endpoint, as it
has been moved to `cloud.zed.dev`.

Release Notes:

- N/A
2025-08-23 10:35:53 -04:00
Marshall Bowers
0486c497b6
collab: Add POST /users/:id/update_plan endpoint (#34953)
This PR adds a new `POST /users/:id/update_plan` endpoint to Collab to
allow Cloud to push down plan updates to users.

Release Notes:

- N/A
2025-08-23 10:35:52 -04:00
Marshall Bowers
a361801e72
collab: Remove POST /billing/subscriptions endpoint (#34928)
This PR removes the `POST /billing/subscriptions` endpoint, as it has
been moved to `cloud.zed.dev`.

Release Notes:

- N/A
2025-08-23 10:35:51 -04:00
Marshall Bowers
3b9110bf00
collab: Remove unneeded caching of Stripe price IDs by meter ID (#34915)
This PR removes the caching of Stripe price IDs by meter ID on the
`StripeBilling` object, as we weren't actually reading them anywhere.

Release Notes:

- N/A
2025-08-23 10:35:51 -04:00
Marshall Bowers
3fb8b96fc8
collab: Remove unneeded caching of Stripe meters (#34900)
This PR removes the caching of Stripe meters on the `StripeBilling`
object, as we weren't actually reading them anywhere.

Release Notes:

- N/A
2025-08-23 10:35:50 -04:00
Bennet Bo Fenner
20b2e23c87
collab: Refresh the LLM token once the terms of service have been accepted (#34833)
Release Notes:

- N/A
2025-08-23 10:35:22 -04:00
Marshall Bowers
187f3ddd0b
collab: Remove unused billing preferences queries (#34830)
This PR removes some billing preferences queries that are no longer in
use.

Release Notes:

- N/A
2025-08-23 10:35:22 -04:00
Marshall Bowers
da7f0ae968
collab: Remove PUT /billing/preferences endpoint (#34825)
This PR removes the `PUT /billing/preferences` endpoint, as it has been
moved to `cloud.zed.dev`.

Release Notes:

- N/A
2025-08-23 10:35:22 -04:00