Commit graph

2292 commits

Author SHA1 Message Date
Marshall Bowers
36184a71df
collab: Drop rate_buckets table (#36315)
This PR drops the `rate_buckets` table, as we're no longer using it.

Release Notes:

- N/A
2025-08-16 14:11:36 +00:00
Marshall Bowers
ea7bc96c05
collab: Remove billing-related tables from SQLite schema (#36312)
This PR removes the billing-related tables from the SQLite schema, as we
don't actually reference these tables anywhere in the Collab codebase
anymore.

Release Notes:

- N/A
2025-08-16 13:52:14 +00:00
Marshall Bowers
d1958aa439
collab: Add orb_customer_id to billing_customers (#36310)
This PR adds an `orb_customer_id` column to the `billing_customers`
table.

Release Notes:

- N/A
2025-08-16 13:48:38 +00:00
Marshall Bowers
5620e359af
collab: Make admin column non-nullable on users table (#36307)
This PR updates the `admin` column on the `users` table to be
non-nullable.

We were already treating it like this in practice.

All rows in the production database already have a value for the `admin`
column.

Release Notes:

- N/A
2025-08-16 13:09:14 +00:00
Marshall Bowers
e664a9bc48
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-15 22:58:10 +00:00
Marshall Bowers
b9c110e63e
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-15 22:01:41 +00:00
Marshall Bowers
239e479aed
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-15 20:49:56 +00:00
Marshall Bowers
7199c733b2
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-15 20:21:45 +00:00
Joseph T. Lyons
75f85b3aaa
Remove old telemetry events and transformation layer (#36263)
Successor to: https://github.com/zed-industries/zed/pull/25179

Release Notes:

- N/A
2025-08-15 15:37:52 -04: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
Marshall Bowers
75b832029a
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-15 13:26:21 -04:00
Marshall Bowers
257e0991d8
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-15 16:13:52 +00:00
Marshall Bowers
485802b9e5
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-15 14:46:06 +00:00
Kirill Bulatov
95547f099c
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-08 14:17:18 +00:00
Abdelhakim Qbaich
cdfb3348ea
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-08 01:35:07 +00:00
Mikayla Maki
913e9adf90
Move timing fields into span (#35833)
Release Notes:

- N/A
2025-08-07 23:07:33 +00:00
Kirill Bulatov
53b69d29c5
Actually update remote collab capabilities (#35809)
Follow-up of https://github.com/zed-industries/zed/pull/35682

Release Notes:

- N/A
2025-08-07 13:58:33 -04:00
Marshall Bowers
fa2ff3ce1c
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-07 10:26:08 -07:00
Kirill Bulatov
740686b883
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-07 14:45:41 +00:00
Kirill Bulatov
c397027ec2
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-07 12:56:10 +00:00
Marshall Bowers
b08e26df60
collab: Remove unused StripeBilling methods (#35740)
This PR removes some unused methods from the `StripeBilling` object.

Release Notes:

- N/A
2025-08-06 17:42:12 +00:00
Marshall Bowers
740597492b
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-06 16:53:43 +00:00
Kirill Bulatov
55b4df4d9f
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-06 18:47:44 +03:00
Kirill Bulatov
9caa9d042a
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-05 23:24:40 +00:00
Marshall Bowers
142efbac0d
collab: Remove unused billing queries (#35679)
This PR removes some billing-related queries that are no longer used.

Release Notes:

- N/A
2025-08-05 22:42:45 +00:00
Marshall Bowers
f27dc7dec7
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-05 22:07:18 +00:00
Kirill Bulatov
22473fc611
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-05 13:36:05 +00:00
Mikayla Maki
6c83a3bcde
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-05 01:37:10 +00:00
Michael Sloan
65018c28c0
Rename remaining mentions of "inline completion" to "edit prediction" (#35512)
Release Notes:

- N/A
2025-08-04 16:22:18 +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
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
Mikayla Maki
2b36d4ec94
Add a field to MultiLSPQuery span showing the current request (#35372)
Release Notes:

- N/A
2025-07-31 22:40:19 +00:00
Mikayla Maki
8e7f1899e1
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-07-31 17:31:29 -04: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
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
7695c4b82e
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-07-30 18:54:44 +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
f0927faf61
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-07-29 22:45:00 +00:00
Marshall Bowers
d2d116cb02
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-07-29 22:34:04 +00:00
Marshall Bowers
77dc65d826
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-07-29 17:06:27 +00:00
Marshall Bowers
ab90ed41da
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-07-28 20:22:54 +00:00
Alvaro Parker
07252c3309
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-07-25 23:15:54 +00:00
Mikayla Maki
13df1dd5ff
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-07-24 11:44:26 -07:00
Marshall Bowers
3d4266bb8f
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-07-23 23:30:00 +00:00
Marshall Bowers
14171e0721
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-07-23 14:30:08 +00:00
Marshall Bowers
056003860a
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-07-22 18:57:07 -04:00
Marshall Bowers
9e280d0905
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-07-22 17:42:07 +00:00