Commit graph

2259 commits

Author SHA1 Message Date
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
Marshall Bowers
939f9fffa3
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-07-22 15:27:58 +00:00
Bennet Bo Fenner
589af59dfe
collab: Refresh the LLM token once the terms of service have been accepted (#34833)
Release Notes:

- N/A
2025-07-21 20:02:28 +02:00
Marshall Bowers
bf8aba566c
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-07-21 15:47:40 +00:00
Marshall Bowers
97af7e1bd9
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-07-21 15:29:16 +00:00
Piotr Osiewicz
88af35fe47
collab: Add screen selector (#31506)
Instead of selecting a screen to share arbitrarily, we'll now allow user
to select the screen to share. Note that sharing multiple screens at the
time is still not supported (though prolly not too far-fetched).

Related to #4666

![image](https://github.com/user-attachments/assets/1afb664f-3cdb-4e0a-bb29-9d7093d87fa5)

Release Notes:

- Added screen selector dropdown to screen share button

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Co-authored-by: Cole Miller <cole@zed.dev>
2025-07-21 13:44:51 +02:00
morgankrey
4bdac8026c
collab: Enable automatic tax calculation for all new subscriptions (#34720)
Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-07-18 21:42:48 +00:00
Marshall Bowers
750ceeb760
collab: Don't use screen-capture feature from gpui (#34725)
This PR removes the `screen-capture` feature from `gpui` when depending
on it in `collab`.

Release Notes:

- N/A
2025-07-18 16:28:58 +00:00
Marshall Bowers
f461290ac3
collab: Add POST /users/:id/refresh_llm_tokens endpoint (#34714)
This PR adds a new `POST /users/:id/refresh_llm_tokens` endpoint to
Collab so that we can refresh LLM tokens from Cloud.

Release Notes:

- N/A
2025-07-18 14:52:42 +00:00
Danilo Leal
c287397a18
Rename "CloseInactiveItems" action to "CloseOtherItems" (#34676)
This is following feedback from folks that were searching the "close
others" action, available in the tab's context menu, and not finding it
because it was actually named "close inactive", which was confusing. So,
this PR makes sure the tab's menu item and the action have consistent
naming.

Release Notes:

- Rename "CloseInactiveItems" action to "CloseOtherItems" for naming
consistency.
2025-07-17 21:40:02 -03:00
Cole Miller
237ce5c8e8
Report build SHA to Slack for Zed Nightly panics (#34665)
There can be a bunch of nightlies with the same version number and it's
helpful to know exactly which one reported a panic.

Release Notes:

- N/A
2025-07-17 21:38:45 +00:00
Marshall Bowers
1e60ebb2c6
collab: Remove GET /billing/usage endpoint (#34651)
This PR removes the `GET /billing/usage` endpoint, as it has been moved
to `cloud.zed.dev`.

Release Notes:

- N/A
2025-07-17 18:34:04 +00:00
Marshall Bowers
f43bcc1492
collab: Remove GET /billing/subscriptions endpoint (#34580)
This PR removes the `GET /billing/subscriptions` endpoint, as it has
been moved to `cloud.zed.dev`.

Release Notes:

- N/A
2025-07-16 22:04:53 +00:00
Marshall Bowers
048dc47d87
collab: Remove GET /billing/preferences endpoint (#34566)
This PR removes the `GET /billing/preferences` endpoint, as it has been
moved to `cloud.zed.dev`.

Release Notes:

- N/A
2025-07-16 17:55:01 +00:00
teapo
d7bb1c1d0e
lsp: Fix workspace diagnostics lag & add streaming support (#34022)
Closes https://github.com/zed-industries/zed/issues/33980
Closes https://github.com/zed-industries/zed/discussions/33979

- Switches to the debounce task pattern for diagnostic summary
computations, which most importantly lets us do them only once when a
large number of DiagnosticUpdated events are received at once.
- Makes workspace diagnostic requests not time out if a partial result
is received.
- Makes diagnostics from workspace diagnostic partial results get
merged.

There might be some related areas where we're not fully complying with
the LSP spec but they may be outside the scope of what this PR should
include.

Release Notes:

- Added support for streaming LSP workspace diagnostics.
- Fixed editor freeze from large LSP workspace diagnostic responses.
2025-07-15 18:41:45 +03:00
Marshall Bowers
a65c0b2bff
collab: Fix typo in log message (#34455)
This PR fixes a small typo in a log message.

Release Notes:

- N/A
2025-07-15 13:16:49 +00:00
Marshall Bowers
848a86a385
collab: Sync model overages for all active Zed Pro subscriptions (#34452)
Release Notes:

- N/A
2025-07-15 13:01:01 +00:00
vipex
00ec243771
pane: 'Close others' now closes relative to right-clicked tab (#34355)
Closes #33445

Fixed the "Close others" context menu action to close tabs relative to
the right-clicked tab instead of the currently active tab. Previously,
when right-clicking on an inactive tab and selecting "Close others", it
would keep the active tab open rather than the right-clicked tab.

## Before/After

https://github.com/user-attachments/assets/d76854c3-c490-4a41-8166-309dec26ba8a



## Changes

- Modified `close_inactive_items()` method to accept an optional
`target_item_id` parameter
- Updated context menu handler to pass the right-clicked tab's ID as the
target
- Maintained backward compatibility by defaulting to active tab when no
target is specified
- Updated all existing call sites to pass `None` for the new parameter

Release Notes:

- Fixed: "Close others" context menu action now correctly keeps the
right-clicked tab open instead of the active tab
2025-07-14 14:06:40 +03:00
Cole Miller
1b6e212eba
debugger: Fix endless restarts when connecting to TCP adapters over SSH (#34328)
Closes #34323
Closes #34313

The previous PR #33932 introduced a way to "close" the
`pending_requests` buffer of the `TransportDelegate`, preventing any
more requests from being added. This prevents pending requests from
accumulating without ever being drained during the shutdown sequence;
without it, some of our tests hang at this point (due to using a
single-threaded executor).

The bug occurred because we were closing `pending_requests` whenever we
detected the server side of the transport shut down, and this closed
state stuck around and interfered with the retry logic for SSH+TCP
adapter connections.

This PR fixes the bug by only closing `pending_requests` on session
shutdown, and adds a regression test covering the SSH retry logic.

Release Notes:

- debugger: Fixed a bug causing SSH connections to some adapters
(Python, Go, JavaScript) to fail and restart endlessly.
2025-07-12 11:27:18 -04:00
morgankrey
c09f484ec4
collab: Add ability to add tax ID during Stripe Checkout (#34246)
### 1. **Added Tax ID Collection Types**
- Created a new `StripeTaxIdCollection` struct with an `enabled` field
- Added `tax_id_collection` field to `StripeCreateCheckoutSessionParams`

### 2. **Updated the Stripe Client Interface**
- Modified the real Stripe client to handle tax ID collection conversion
- Updated the fake Stripe client for testing purposes
- Added proper imports across all affected files

### 3. **Enabled Tax ID Collection in Checkout Sessions**
- Both `checkout_with_zed_pro` and `checkout_with_zed_pro_trial` methods
now enable tax ID collection
- The implementation correctly sets `tax_id_collection.enabled = true`
for all checkout sessions

### 4. **Key Implementation Details**
- Tax ID collection will be shown to new customers and existing
customers without tax IDs
- Collected tax IDs will be automatically saved to the customer's
`tax_ids` array in Stripe
- Business names will be saved to the customer's `name` property
- The existing `customer_update.name = auto` setting ensures
compatibility with tax ID collection

Release Notes:

- N/A
2025-07-11 11:26:36 -04:00
Joseph T. Lyons
e6c41b577b
Add more admin to seed script (#34220)
Release Notes:

- N/A
2025-07-10 16:54:00 +00:00
Marshall Bowers
f4106ad404
collab: Send down new usage limits even when the user does not have any usage (#34217)
This PR fixes an issue where the plan usage limits in Zed would not get
updated immediately after the plan has changed.

Previously we were only sending down the usage—which contains the
limits—if there was a usage record in the database. This would be absent
if the user had just changed their plan.

We now always send down the usage in order to update the limits on the
client side.

Release Notes:

- N/A

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2025-07-10 15:52:19 +00:00
Joseph T. Lyons
60e9ab8f93
Delete access tokens on user delete (#34036)
Trying to delete a user record from our admin panel throws the following
error:

`update or delete on table "users" violates foreign key constraint
"access_tokens_user_id_fkey" on table "access_tokens"
Detail: Key (id)=(....) is still referenced from table "access_tokens".`

We need to add a cascade delete to the `access_tokens` table.

Release Notes:

- N/A
2025-07-08 10:08:17 -04:00
Kirill Bulatov
a6ee4a18c4
Fix remote binary bundling (#33845)
Follow-up of https://github.com/zed-industries/zed/pull/32937
Fixes remote server bundling:
https://github.com/zed-industries/zed/actions/runs/16043840539/job/45271137215#step:6:2079

Excludes `screen-capture` feature from Zed's default, use it only in the
components that need it.

Release Notes:

- N/A
2025-07-03 12:17:54 +00:00
Conrad Irwin
2a8121fbfc
Clean up project repositories / repository statuses too (#33803)
Co-authored-by: Cole Miller <cole@zed.dev>

Closes #ISSUE

Release Notes:

- N/A

---------

Co-authored-by: Cole Miller <cole@zed.dev>
2025-07-02 21:36:12 -06:00
Iha Shin (신의하)
5f70a9cf59
Query multiple LSPs for more types of requests (#29359)
This fixes an issue where lower-priority language servers cannot provide
contentful responses even when the first capable server returned empty
responses.

Most of the diffs are copypasted since the existing implementations were
also copypasted.

Release Notes:

- Improved Go to Definition / Declaration / Type Definition /
Implementation and Find All References to include all results from
different language servers
2025-07-02 20:51:19 +03:00
Antonio Scandurra
132bba8d8b
Never run transactions using serializable isolation (#33780)
We believe this is causing the database to execute certain queries very
slowly, and it's unclear whether we're actually benefitting from it.

Release Notes:

- N/A
2025-07-02 14:30:38 +00:00
Marshall Bowers
8d894dd1df
collab: Add logs to Stripe usage sync job (#33731)
This PR adds some additional logs to the Stripe usage sync job for
monitoring purposes.

Release Notes:

- N/A
2025-07-01 18:10:00 +00:00
Michael Sloan
2ff155d5a2
Fix language settings formatter regression - formatter list can be a single formatter not wrapped in an array (#33721)
Fixes a regression from #33635

Release Notes:

- N/A
2025-07-01 17:47:19 +00:00
Michael Sloan
5fafab6e52
Migrate to schemars version 1.0 (#33635)
The major change in schemars 1.0 is that now schemas are represented as
plain json values instead of specialized datatypes. This allows for more
concise construction and manipulation.

This change also improves how settings schemas are generated. Each top
level settings type was being generated as a full root schema including
the definitions it references, and then these were merged. This meant
generating all shared definitions multiple times, and might have bugs in
cases where there are two types with the same names.

Now instead the schemar generator's `definitions` are built up as they
normally are and the `Settings` trait no longer has a special
`json_schema` method. To handle types that have schema that vary at
runtime (`FontFamilyName`, `ThemeName`, etc), values of
`ParameterizedJsonSchema` are collected by `inventory`, and the schema
definitions for these types are replaced.

To help check that this doesn't break anything, I tried to minimize the
overall [schema
diff](https://gist.github.com/mgsloan/1de549def20399d6f37943a3c1583ee7)
with some patches to make the order more consistent + schemas also
sorted with `jq -S .`. A skim of the diff shows that the diffs come
from:

* `enum: ["value"]` turning into `const: "value"`
* Differences in handling of newlines for "description"
* Schemas for generic types no longer including the parameter name, now
all disambiguation is with numeric suffixes
* Enums now using `oneOf` instead of `anyOf`.

Release Notes:

- N/A
2025-06-30 21:07:28 +00:00
Conrad Irwin
a675ca7a1e
Remove into SelectionEffects from .change_selections (#33554)
In #32656 I generalized the argument to change selections to allow
controling both the scroll and the nav history (and the completion
trigger).

To avoid conflicting with ongoing debugger cherry-picks I left the
argument as an `impl Into<>`, but I think it's clearer to make callers
specify what they want here.

I converted a lot of `None` arguments to `SelectionEffects::no_scroll()`
to be exactly compatible; but I think many people used none as an "i
don't care" value in which case Default::default() might be more
appropraite

Closes #ISSUE

Release Notes:

- N/A
2025-06-27 14:31:31 -06:00
Conrad Irwin
6e762d9c05 Revert "Remove into SelectionEffects from .change_selections"
This reverts commit 28380d714d.
2025-06-27 14:06:17 -06:00
Conrad Irwin
28380d714d Remove into SelectionEffects from .change_selections
In #32656 I generalized the argument to change selections to allow
controling both the scroll and the nav history (and the completion
trigger).

To avoid conflicting with ongoing debugger cherry-picks I left the
argument as an `impl Into<>`, but I think it's clearer to make callers
specify what they want here.

I converted a lot of `None` arguments to `SelectionEffects::no_scroll()`
to be exactly compatible; but I think many people used none as an "i
don't care" value in which case Default::default() might be more
appropraite
2025-06-27 14:03:45 -06:00
Peter Tripp
e3ce0618a3
collab: Lookup avatars by GitHub ID instead of username (#33523)
Closes: https://github.com/zed-industries/zed/issues/19207

This will correctly show Avatars for recently renamed/deleted users and
for enterprise users where the username avatar url triggers a redirect
to an auth prompt. Also saves a request (302 redirect) per avatar.

Tested locally and avatars loaded as expected.

Release Notes:

- N/A
2025-06-27 09:40:50 -04:00