Commit Graph
672 Commits
Author SHA1 Message Date
Antonio Scandurra 1f47ff85de Move more window-specific methods from AppContext to WindowContext 2023-04-14 10:29:35 +02:00
Nathan Sobo dfc87bdf43 wip 2023-04-12 10:28:53 -06:00
Antonio Scandurra 5f04261450 WIP 2023-04-12 15:55:43 +02:00
1205cd55ea Add copilot crate
Refactor HTTP and github release downloading into util
Lazily download / upgrade the copilot LSP from Zed

Co-authored-by: Max <max@zed.dev>
Co-Authored-By: Antonio <antonio@zed.dev>
2023-03-28 09:41:59 -07:00
Julia 25bc7cd3b6 Invoke npm from downloaded Node 2023-03-27 00:00:16 -04:00
Julia 543aebed40 Initial running of servers on downloaded Node 2023-03-27 00:00:16 -04:00
Max Brunsfeld c2feb41fa9 Update wrong assertions after fixing missing event in FakeFs 2023-03-21 11:26:13 -07:00
Max BrunsfeldandMikayla Maki 1e3f3b5cfa Add logging and metric for time spent hashing auth tokens
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2023-03-17 14:32:13 -07:00
Max BrunsfeldandMikayla Maki 721c1cc9f3 Reduce scrypt work factor to speed up websocket authentication
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2023-03-17 14:31:39 -07:00
Max BrunsfeldandAntonio Scandurra 9d604c0573 Return a 400, not a 500 when token validation fails
Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2023-03-17 13:56:12 -07:00
Max BrunsfeldandAntonio Scandurra 2c2bcf87f0 Lookup access tokens by id when authenticating a connection
This avoids the cost of hashing an access token multiple times,
to compare it to all known access tokens for a given user.

Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2023-03-17 11:13:50 -07:00
Max Brunsfeld 80b128a0ed Log the delay when retrying a transaction 2023-03-16 13:07:38 -07:00
Max BrunsfeldandAntonio Scandurra dbc4ebbe87 Introduce a delay before retrying a transaction after a serialization failure
Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2023-03-16 13:07:38 -07:00
Antonio Scandurra 58437c6d35 Fix seed binary 2023-03-14 12:37:56 +01:00
Antonio Scandurra 1830d984c1 Create user record automatically when someone logs in on the website
Now that we are moving out of the private alpha, we should let everyone
in when they try to log into zed.dev.
2023-03-14 12:25:04 +01:00
Max BrunsfeldandAntonio Scandurra 9342332495 Fix failure to see screenshare tracks that were started prior to joining a call
Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2023-03-13 11:15:22 -07:00
Antonio ScandurraandMax Brunsfeld 3c81933fbc Leave room on quit
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-03-13 17:52:10 +01:00
Mikayla Maki ccf4c95ae3 Merge pull request #2199 from zed-industries/welcome-experience
Welcome experience
2023-03-10 10:48:30 -08:00
Antonio Scandurra 7761594ab5 Increase the amount of max connections to the database 2023-03-10 10:10:59 +01:00
Mikayla Maki 3519bf902a re-add spaces removed by new setting 2023-03-09 00:45:05 -08:00
Antonio Scandurra ee56948b99 Introduce Kubernetes liveness probe to ensure database works 2023-03-09 09:17:55 +01:00
Mikayla Maki 877240d746 Add blank pane experience 2023-03-08 17:56:39 -08:00
Antonio Scandurra 406cc54e69 Limit the number of parallel messages handled for any given connection 2023-03-08 17:04:01 +01:00
JuliaandNathan Sobo 58a3095769 Update db followers table when user leaves a project
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-03-07 18:56:03 -05:00
Julia ed625dc83f Update collab integration test to new reconnect timeout 2023-03-07 12:23:18 -05:00
JuliaandAntonio Scandurra c86117f852 Increase reconnect timeout
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2023-03-03 13:10:08 -08:00
Max Brunsfeld 61cfa0751a adjust buffer-formatting assertion to reflect final newline addition 2023-02-28 21:52:00 -08:00
Julia aae083923c Differentiate between follow state on a per-project basis 2023-02-24 00:07:17 -05:00
Antonio Scandurra bbbd79a3a2 Fix error when deleting rooms containing projects on refresh
A foreign key violation was causing the server to never delete stale
rooms during `Database::refresh_room` due to having one or more project
records referencing the room.
2023-02-23 15:54:35 +01:00
Antonio Scandurra 10881ed0a1 Fix compilation errors after restructuring room_transaction 2023-02-23 15:17:22 +01:00
Antonio Scandurra 088d3901e9 Merge branch 'main' into call-ui-follow-up 2023-02-23 15:15:46 +01:00
Antonio Scandurra 38a12ff77e Tear down peer when signing out 2023-02-23 14:47:02 +01:00
Antonio Scandurra 42bf6ae38b Merge pull request #2200 from zed-industries/fix-slow-project-join
Hold room lock through the entirety of a `room_transaction`
2023-02-23 09:11:58 +01:00
JuliaandMax Brunsfeld f9f5fc38d1 Be more specific about clearing (leader, follower) row
Previously anyone unfollowing someone would clear all other rows for
other followers leading to an incorrect state, fix and test

Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-02-22 15:29:20 -05:00
Max Brunsfeld 9032b8297a Retrieve room id from the project when following/unfollowing
Previously, we were accidentally using the project id as the room id.
2023-02-22 11:34:55 -05:00
Julia fa56590cd7 Following face piles finally take their first breath 2023-02-22 11:21:23 -05:00
JuliaandMax Brunsfeld 62ea8909c1 Fix deadlock in db get_room
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-02-22 11:21:23 -05:00
Julia bd88f47816 Initial tracking of unfollows on collab server 2023-02-22 11:21:23 -05:00
JuliaandAntonio Scandurra a3d474af23 Begin tracking follow states on collab server
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2023-02-22 11:21:23 -05:00
Antonio Scandurra ea07c26aac Hold room lock through the entirety of a room_transaction
Previously, when the host repeatedly sent `UpdateWorktree` messages,
new guests attempting to join a project would observe a severe slowdown
caused by a database serialization error (e.g., the coherence of the data
would get violated midway through `Database::join_project` due to worktree
entries being mutated as the user joined). Writing entries is pretty fast,
whereas reading all of them for a project can take more than 100ms.
Transactions that failed due to a serialization error are retried, but the guest
would keep retrying until the host finished writing because the guest's read
was slow.

This commit changes the semantics of `room_transaction` to acquire a room
lock before even starting the transaction and holding it all the way after
commit (storing it, as before, in the `RoomGuard`). This ensures that a fast
writer (the host) can't starve a slow reader (the guest), allowing the latter
to make progress by temporarily pausing writes by the former.
2023-02-22 16:04:29 +01:00
Julia 5082654241 Enforce rustfmt on CI & clean up some let-else format errors 2023-02-20 13:27:35 -05:00
Max Brunsfeld 0a4662923b Make Project::save_buffer and ::save_buffers into methods 2023-02-20 09:42:44 -08:00
Max Brunsfeld 2b92a8f06d Unify save and save_as for local worktrees
This fixes state propagation bugs due to missing RPC calls in save_as.
2023-02-17 17:21:48 -08:00
Max Brunsfeld 05e8e2f835 Move the save and save_as code paths close together 2023-02-17 17:21:48 -08:00
Max BrunsfeldandNathan Sobo 8656190d0b Respect UpdateBufferFile messages on guest buffers without file
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2023-02-17 12:38:04 -08:00
Antonio Scandurra c656fa9e61 Avoid creating more than one room when inviting multiple people at once
Previously, when initiating a call by calling multiple people, only
the first person would get the call while all the others would briefly
show a "pending" status but never get the call.

This would happen because `ActiveCall` was trying to a create a different
room for each person called, because the original room creation hadn't finished
and so a `ModelHandle<Room>` wasn't being store in the active call.

With this commit, only one room can be created at any given time and further
invites have to wait until that room creation is done.
2023-02-14 12:03:30 +01:00
Antonio Scandurra d18709d6fc Fix test that wasn't properly verifying disconnection from livekit 2023-02-14 10:46:29 +01:00
Mikayla Maki edb2d2cd3f Removed old experiments settings and staff mode flag, added new StaffMode global that is set based on the webserver's staff bit 2023-01-27 15:43:12 -08:00
Kay Simmons cf0966d8ea Merge pull request #2090 from zed-industries/workspace-window-position-persistence
Workspace window position persistence
2023-01-27 15:24:01 -08:00
Kay Simmons 05498336cc Merge pull request #2105 from zed-industries/fix-focus-stealing-when-collaborating
Limit focus grabbing in followed pane
2023-01-27 15:23:43 -08:00