Commit graph

2302 commits

Author SHA1 Message Date
Umesh Yadav
7e21d96aaf
Fix clippy::len_zero lint style violations (#36589)
Related: #36577

Release Notes:

- N/A

---------

Signed-off-by: Umesh Yadav <git@umesh.dev>
2025-08-23 10:39:26 -04:00
tidely
cae072e0a0
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-23 10:39:25 -04:00
Piotr Osiewicz
a3c89b42f0
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-23 10:39:25 -04:00
Marshall Bowers
0d31a81ee8
collab: Make stripe_subscription_id and stripe_subscription_status nullable on billing_subscriptions (#36536)
This PR makes the `stripe_subscription_id` and
`stripe_subscription_status` columns nullable on the
`billing_subscriptions` table.

Release Notes:

- N/A
2025-08-23 10:39:24 -04:00
Piotr Osiewicz
0d2f70ee8c
Another batch of lint fixes (#36521)
- **Enable a bunch of extra lints**
- **First batch of fixes**
- **More fixes**

Release Notes:

- N/A
2025-08-23 10:39:23 -04:00
Piotr Osiewicz
f61482151a
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-23 10:39:23 -04:00
Piotr Osiewicz
780d5c7d35
Auto-fix clippy::collapsible_if violations (#36428)
Release Notes:

- N/A
2025-08-23 10:39:22 -04:00
Marshall Bowers
7ada5cd48d
collab: Add orb_subscription_id to billing_subscriptions (#36455)
This PR adds an `orb_subscription_id` column to the
`billing_subscriptions` table.

Release Notes:

- N/A
2025-08-23 10:39:21 -04:00
Ben Kunkle
e099b0fae2
git: Suggest merge commit message in remote (#36430)
Closes #ISSUE

Adds `merge_message` field to the `UpdateRepository` proto message so
that suggested merge messages are displayed in remote projects.

Release Notes:

- git: Fixed an issue where suggested merge commit messages would not
appear for remote projects
2025-08-23 10:39:21 -04:00
Piotr Osiewicz
455a95c81d
Fix clippy::needless_borrow lint violations (#36444)
Release Notes:

- N/A
2025-08-23 10:39:20 -04:00
Marshall Bowers
7280220548
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-23 10:39:17 -04:00
Marshall Bowers
38abeeaa5b
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-23 10:39:17 -04:00
Marshall Bowers
ebf28e6ecf
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-23 10:39:17 -04:00
Marshall Bowers
ff463b0826
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-23 10:39:17 -04:00
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