Commit Graph

753 Commits

Author SHA1 Message Date
Antonio Scandurra
fc7b01b74e Fix busy status when accepting a contact request
Previously, we would send an contact update when accepting a request
using the same `busy` status for both the requester and the responder.
This was obviously wrong and caused the requester to see their own
busy status as the newly-added responder contact's status.
2022-12-06 10:19:34 +01:00
Antonio Scandurra
744714b478 Remove unused UserId import from seed script 2022-12-06 09:07:25 +01:00
Antonio Scandurra
9a62150dce Merge branch 'main' into reconnections-2 2022-12-05 19:18:40 +01:00
Antonio Scandurra
7bbd97cfb9 Send diagnostic summaries synchronously 2022-12-05 19:07:06 +01:00
Antonio Scandurra
5443d9cffe Return project collaborators and connection IDs in a RoomGuard 2022-12-05 18:37:01 +01:00
Antonio Scandurra
be3fb1e985 Update sea-orm to fix bug on failure to commit transactions
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-12-05 18:36:25 +01:00
Antonio Scandurra
b97c35a468 Remove project_id foreign key from room_participants 2022-12-05 15:16:06 +01:00
Antonio Scandurra
eec3df09be Upgrade sea-orm 2022-12-05 14:56:01 +01:00
Antonio Scandurra
d3c411677a Remove random pauses to prevent the database from deadlocking 2022-12-05 12:03:45 +01:00
Antonio Scandurra
d97a8364ad Retry transactions if there's a serialization failure during commit 2022-12-05 10:49:53 +01:00
Antonio Scandurra
0ed731780a Remove duplication between transaction and room_transaction 2022-12-05 09:46:03 +01:00
Julia
11c1254e71
Merge pull request #1924 from zed-industries/simon-says-dont-move
Do not reorder tab opened by follower to end of item list
2022-12-04 13:00:07 -05:00
Kay Simmons
1cc3e4820a working serialized writes with panics on failure. Everything seems to be working 2022-12-03 16:06:01 -08:00
Mikayla Maki
992b94eef3 Rebased to main 2022-12-03 16:06:01 -08:00
Kay Simmons
d20d21c6a2 Dock persistence working!
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-12-03 16:06:01 -08:00
Kay Simmons
c1f7902309 wip 2022-12-03 16:06:01 -08:00
Mikayla Maki
4798161118 Distributed database pattern built.
Co-Authored-By: kay@zed.dev
2022-12-03 16:06:01 -08:00
Mikayla Maki
a5edac312e Moved to workspaces crate... don't feel great about it 2022-12-03 16:05:26 -08:00
Mikayla Maki
3451a3c7fe Rebase - Got Zed compiling and fixed a build error due to conflicting dependencies that cargo didn't catch :(
Co-Authored-By: kay@zed.dev
2022-12-03 16:04:10 -08:00
Julia
4bc1d77535 Fix tab following order test to wait for file open to propagate
Now it can actually repro the original bug

Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-12-02 16:09:37 -05:00
Antonio Scandurra
d96f524fb6 WIP: Manually rollback transactions to avoid spurious savepoint failure
TODO:
- Avoid unwrapping transaction after f(tx)
- Remove duplication between `transaction` and `room_transaction`
- Introduce random delay before and after committing a transaction
- Run lots of randomized tests
- Investigate diverging diagnostic summaries

Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-12-02 20:36:50 +01:00
Antonio Scandurra
1c30767592 Remove stale Error variant
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-12-02 19:20:51 +01:00
Antonio Scandurra
969c314315 Merge branch 'main' into reconnections-2 2022-12-02 19:09:33 +01:00
Antonio Scandurra
568de814aa Delete empty rooms 2022-12-02 16:56:41 +01:00
Antonio Scandurra
27f6ae945d Clear stale data on startup
This is a stopgap measure until we introduce reconnection support.
2022-12-02 16:30:00 +01:00
Antonio Scandurra
1b46b7a7d6 Move modules into collab library as opposed to using the binary
This ensures that we can use collab's modules from the seed script
as well.
2022-12-02 14:37:52 +01:00
Antonio Scandurra
7502558631 Make all tests pass again after migration to sea-orm 2022-12-02 14:22:36 +01:00
Antonio Scandurra
48b6ee313f Use i32 to represent Postgres INTEGER types in Rust 2022-12-02 13:58:54 +01:00
Antonio Scandurra
dec5f37e4e Finish porting remaining db methods to sea-orm 2022-12-02 13:58:23 +01:00
Julia
239a04ea5b Add test that should have exercised tab reordering while following
Except it doesn't, it passes both with and without the prior commit.
Investigate further
2022-12-02 00:31:16 -05:00
Antonio Scandurra
585ac3e1be WIP 2022-12-01 18:39:24 +01:00
Antonio Scandurra
29a4baf346 Replace i32 with u32 for database columns
We never expect to return signed integers and so we shouldn't use
a signed type. I think this was a limitation of sqlx.
2022-12-01 17:47:51 +01:00
Antonio Scandurra
cfdf0a57b8 Implement Database::update_project 2022-12-01 17:36:36 +01:00
Antonio Scandurra
944d6554de Implement Database::unshare_project 2022-12-01 16:26:13 +01:00
Antonio Scandurra
e3ac67784a Implement Database::project_guest_connection_ids 2022-12-01 16:23:29 +01:00
Antonio Scandurra
62624b81d8 Avoid using col_expr whenever possible
...and use the more type-safe `::set`.
2022-12-01 16:17:27 +01:00
Antonio Scandurra
256e3e8e0f Get basic calls working again with sea-orm 2022-12-01 16:17:24 +01:00
Antonio Scandurra
aebc6326a9 Implement Database::create_room 2022-12-01 15:22:20 +01:00
Antonio Scandurra
db1d93576f Go back to a compiling state, panicking on unimplemented db methods 2022-12-01 15:13:57 +01:00
Antonio Scandurra
d2385bd6a0 Start using the new sea-orm backed database 2022-12-01 14:41:59 +01:00
Antonio Scandurra
19d14737bf Implement signups using sea-orm 2022-12-01 11:58:07 +01:00
Antonio Scandurra
4f864a20a7 Implement invite codes using sea-orm 2022-12-01 11:10:51 +01:00
Antonio Scandurra
2375741bdf Implement db2::Database::fuzzy_search_users 2022-12-01 10:09:53 +01:00
Max Brunsfeld
d70996bb99 collab 0.2.5 2022-11-30 14:10:10 -08:00
Antonio Scandurra
4c04d512db Implement db2::Database::remove_contact 2022-11-30 17:39:17 +01:00
Antonio Scandurra
d1a44b889e Implement contacts using sea-orm
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-11-30 17:36:25 +01:00
Antonio Scandurra
04d553d4d3 Implement db2::Database::get_user_metrics_id 2022-11-30 15:06:04 +01:00
Antonio Scandurra
2e24d128db Implement access tokens using sea-orm 2022-11-30 14:47:03 +01:00
Antonio Scandurra
9e59056e7f Implement db2::Database::get_user_by_github_account 2022-11-30 14:18:46 +01:00
Antonio Scandurra
d9a892a423 Make some db tests pass against the new sea-orm implementation 2022-11-30 12:13:16 +01:00
Joseph T. Lyons
3a1cd6ed3a
Merge pull request #1913 from zed-industries/Add-column-to-signups-for-added-to-mailing-list
Add "added_to_mailing_list" column on signups table
2022-11-29 19:30:11 -05:00
Antonio Scandurra
b7294887c7 WIP: move to a non-generic test database struct
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
Co-Authored-By: Julia Risley <julia@zed.dev>
2022-11-29 19:20:11 +01:00
Joseph Lyons
049c0f8ba4 Order invites by creation time 2022-11-29 12:57:51 -05:00
Antonio Scandurra
11a39226e8 Start on a new db2 module that uses SeaORM 2022-11-29 16:49:04 +01:00
Antonio Scandurra
ac24600a40 Start moving towards using sea-query to construct queries 2022-11-29 13:55:08 +01:00
Antonio Scandurra
d525cfd697 Increase probability of creating new files in randomized test 2022-11-29 11:02:14 +01:00
Joseph Lyons
4436ec48eb Add "added_to_mailing_list" column on signups table 2022-11-29 02:13:13 -05:00
Antonio Scandurra
0a565c6bae 💄 2022-11-28 17:44:18 +01:00
Antonio Scandurra
cd0b663f62 Introduce per-room lock acquired before committing a transaction 2022-11-28 17:00:47 +01:00
Antonio Scandurra
b0e1d6bc7f Fix integration test incorrectly assuming a certain ordering 2022-11-28 13:57:15 +01:00
Antonio Scandurra
ae11e4f798 Check the correct serialization failure code when retrying transaction 2022-11-28 13:56:03 +01:00
Antonio Scandurra
4c1b4953c1 Remove version from Room
We won't need it once we add the per-room lock.
2022-11-18 20:18:48 +01:00
Antonio Scandurra
c3d556d9bd Don't take an Arc<Server> in message handlers 2022-11-18 11:45:42 +01:00
Max Brunsfeld
5020c70a04 collab 0.2.4 2022-11-17 11:44:29 -08:00
Antonio Scandurra
44bb2ce024 Rename Store to ConnectionPool 2022-11-17 19:03:59 +01:00
Antonio Scandurra
6c83be3f89 Remove obsolete code from Store 2022-11-17 18:46:39 +01:00
Antonio Scandurra
0a4517f97e WIP: Introduce a db field to Session
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-11-17 17:30:26 +01:00
Antonio Scandurra
c34a5f3177 Introduce a new Session struct to server message handlers
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-11-17 17:11:06 +01:00
Antonio Scandurra
4f39181c4c Revert "Don't replace newer diagnostics with older ones"
This reverts commit 71eeeedc05.
2022-11-17 16:57:40 +01:00
Antonio Scandurra
e7e45be6e1 Revert "Wait for previous UpdateFollowers message ack before sending new ones"
This reverts commit fe93263ad4.
2022-11-17 16:57:32 +01:00
Antonio Scandurra
8621c88a3c Use int8 for scan_id and inode in Postgres 2022-11-17 16:56:43 +01:00
Antonio Scandurra
7dae21cb36 🎨 2022-11-17 15:35:18 +01:00
Antonio Scandurra
0f4598a243 Fix seed script 2022-11-17 15:34:35 +01:00
Antonio Scandurra
6415809b61 Fix errors in Postgres schema 2022-11-17 15:34:12 +01:00
Antonio Scandurra
fe93263ad4 Wait for previous UpdateFollowers message ack before sending new ones 2022-11-17 14:12:00 +01:00
Antonio Scandurra
3b34d858b5 Remove unwrap from Server::share_project 2022-11-17 13:33:26 +01:00
Antonio Scandurra
71eeeedc05 Don't replace newer diagnostics with older ones 2022-11-17 12:21:51 +01:00
Antonio Scandurra
532a599239 Use Db::get_guest_connection_ids in other db methods 2022-11-17 11:38:00 +01:00
Nathan Sobo
9eee22ff0a Fix column name in query 2022-11-16 19:40:53 -07:00
Nathan Sobo
94fe93c6ee Move unshare_project to db module 2022-11-16 18:28:45 -07:00
Nathan Sobo
e5f05c9f3b Move leave_project from Store to db module 2022-11-16 17:45:47 -07:00
Nathan Sobo
bdb521cb6b Fix typo in query 2022-11-16 16:52:05 -07:00
Joseph Lyons
c613c98e37 Move comment to correct location 2022-11-16 17:28:50 -05:00
Antonio Scandurra
adf43c87dd Batch some of the new queries in Db
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-11-16 17:19:06 +01:00
Antonio Scandurra
faf265328e Wait for acknowledgment before sending the next diagnostic summary 2022-11-16 16:03:01 +01:00
Antonio Scandurra
9bc57c0c61 Move Store::start_language_server to Db 2022-11-16 15:48:26 +01:00
Antonio Scandurra
95369f92eb Move Store::update_diagnostic_summary to Db 2022-11-16 15:41:33 +01:00
Antonio Scandurra
117458f4f6 Send worktree updates after project metadata has been sent 2022-11-16 14:58:11 +01:00
Antonio Scandurra
eeb32fa888 Improve queries for composite primary keys 2022-11-16 11:07:39 +01:00
Antonio Scandurra
f9567ae116 Cascade deletes when project is deleted 2022-11-16 10:41:36 +01:00
Antonio Scandurra
c151c87e12 Correctly leave projects when leaving room 2022-11-16 10:36:48 +01:00
Antonio Scandurra
3190236396 Update worktree entry instead of erroring when it already exists 2022-11-16 08:57:19 +01:00
Joseph Lyons
c3cf056fc5 allow users to sign up multiple times without throwing a 500 2022-11-15 20:04:56 -05:00
Nathan Sobo
275f0ae492 collab 0.2.3 2022-11-15 15:45:04 -07:00
Nathan Sobo
fdf758e050 Once we email someone an invite, honor the invitation
Previously, we were waiting to decrement the invite_count until a user
confirmed their email address, which created weird situations where we would
email people only to have them get a 500 when trying to sign up. Now, we
decrement the invite_count upon sending the email and always honor the
invitation.

Co-Authored-By: Joseph Lyons <joseph@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-11-15 15:36:59 -07:00
Antonio Scandurra
0817f905a2 Fix syntax error in schema 2022-11-15 18:02:07 +01:00
Antonio Scandurra
ad67f5e4de Always use the database to retrieve collaborators for a project 2022-11-15 17:49:37 +01:00
Antonio Scandurra
e9eadcaa6a Move Store::update_worktree to Db::update_worktree 2022-11-15 17:18:28 +01:00
Antonio Scandurra
4b1dcf2d55 Always use strings to represent paths over the wire
Previously, the protocol used a mix of strings and bytes without any consistency.

When we go to multiple platforms, we won't be able to mix encodings of paths anyway.
We don't know this is the right approach, but it at least makes things consistent
and easy to read in the database, on the wire, etc. Really, we should be using entry
ids etc to refer to entries on the wire anyway, but there's a chance this is the
wrong decision.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-11-15 16:46:17 +01:00
Antonio Scandurra
974ef967a3 Move Store::join_project to Db::join_project
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-11-15 16:37:51 +01:00
Antonio Scandurra
be523617c9 Start reworking join_project to use the database 2022-11-15 11:44:26 +01:00
Antonio Scandurra
6cbf197226 Determine whether a contact is busy via the database 2022-11-15 10:41:21 +01:00
Antonio Scandurra
3e8fcb04f7 Finish implementing Db::update_project 2022-11-15 09:01:51 +01:00
Antonio Scandurra
42bb5f0e9f Add random delay after returning results from the database 2022-11-15 08:48:16 +01:00
Max Brunsfeld
6659dac2e5 Fix compile errors in seed script, ensure it is compiled on CI
Co-authored-by: Nate Butler <nate@zed.dev>
2022-11-14 11:12:25 -08:00
Antonio Scandurra
b9af2ae66e Switch to serializable isolation
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-11-14 19:39:12 +01:00
Antonio Scandurra
40073f6100 Wait for acknowledgment before sending the next project update 2022-11-14 15:32:49 +01:00
Antonio Scandurra
65c5adff05 Automatically decline call when user drops their last connection 2022-11-14 11:32:26 +01:00
Antonio Scandurra
59e8600e4c Implement Db::cancel_call 2022-11-14 11:12:23 +01:00
Antonio Scandurra
0310e27347 Fix query errors in Db::share_project 2022-11-14 10:53:11 +01:00
Antonio Scandurra
9902211af1 Leave room when connection is dropped 2022-11-14 10:13:36 +01:00
Antonio Scandurra
2145965749 WIP 2022-11-11 19:36:20 +01:00
Antonio Scandurra
11caba4a4c Remove stray log statement 2022-11-11 18:54:08 +01:00
Antonio Scandurra
9f39dcf7cf Get basic calls test passing again 2022-11-11 18:53:23 +01:00
Antonio Scandurra
1135aeecb8 WIP: Move Store::leave_room to Db::leave_room 2022-11-11 16:59:54 +01:00
Antonio Scandurra
a6198c9a1a
Merge pull request #1870 from zed-industries/fix-remote-abs-paths
Fix bug where absolute paths of worktrees were not being stored on the server
2022-11-11 15:28:17 +00:00
Antonio Scandurra
0d1d267213 Move Store::decline_call to Db::decline_call 2022-11-11 15:41:56 +01:00
Antonio Scandurra
c213c98ea4 Remove calls table and use just room_participants 2022-11-11 15:22:04 +01:00
Antonio Scandurra
cc58607c3b Move Store::join_room into Db::join_room 2022-11-11 14:43:40 +01:00
Antonio Scandurra
58947c5c72 Move incoming calls into Db 2022-11-11 14:28:26 +01:00
Antonio Scandurra
6871bbbc71 Start moving Store state into the database 2022-11-11 12:06:43 +01:00
Antonio Scandurra
28aa1567ce Include sender_user_id when handling a server message/request 2022-11-11 11:45:58 +01:00
Antonio Scandurra
f639c4c3d1 Add schema for reconnection support 2022-11-11 10:41:44 +01:00
Kay Simmons
3d5a3634cf
Merge pull request #1867 from zed-industries/drag-project-entry-to-pane
Drag project entry to pane
2022-11-10 17:25:22 -08:00
Max Brunsfeld
2d4deaafcd Use upstream sqlx git repository 2022-11-10 15:13:32 -08:00
Max Brunsfeld
c839ab2028 Add missing cfg(test) attribute to sqlite RowsAffected 2022-11-10 15:04:57 -08:00
Max Brunsfeld
5d17347a45 Use our fork of sqlx, for now 2022-11-10 14:58:05 -08:00
Max Brunsfeld
9ce3524eb8 Run db tests against both postgres and sqlite 2022-11-10 14:29:03 -08:00
Max Brunsfeld
dafdc4b4a5 Run tests with an in-memory sqlite database 2022-11-10 12:18:35 -08:00
Max Brunsfeld
05a6bd914d Get integration tests passing with sqlite
Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2022-11-10 11:03:52 -08:00
Nathan Sobo
fb03eb7a3c Store absolute path on server when sharing worktree
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-11-10 09:34:16 -07:00
Antonio Scandurra
1bb41b6f54 Go back to a compiling state and start running tests again 2022-11-10 15:24:49 +01:00
Antonio Scandurra
90d1d9ac82 WIP: add more trait bounds 2022-11-10 12:24:56 +01:00
Max Brunsfeld
bed06346d1 Total WIP - try making Db a generic struct instead of a trait 2022-11-09 19:28:06 -08:00
Max Brunsfeld
7e02ac772a Start work on using sqlite in tests 2022-11-09 19:26:29 -08:00
Max Brunsfeld
d14dd27cdc Use a real database in tests, but block on db calls
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-11-09 15:22:50 -08:00
Kay Simmons
738893c527 Split and move to pane working 2022-11-08 14:19:31 -08:00
Max Brunsfeld
18ff459014 collab 0.2.2 2022-11-04 10:04:14 -07:00
Max Brunsfeld
c411cb7eef collab 0.2.1 2022-11-02 10:27:26 -07:00
Antonio Scandurra
86057ab071
Merge pull request #1843 from zed-industries/call-randomized-test
Model calls in randomized collaboration test
2022-11-02 13:03:34 +00:00
Antonio Scandurra
d6d1e20f07 Ensure declining call doesn't accidentally leave a room 2022-11-01 18:48:08 +01:00
Antonio Scandurra
88d2e2e277 Introduce calls to randomized collaboration test 2022-11-01 15:44:00 +01:00
Antonio Scandurra
946c92667f Don't drop fake LSP adapter's receiver before simulate ends 2022-11-01 14:28:01 +01:00
Antonio Scandurra
f54f653d42 Don't return an error when failing to send AddProjectCollaborator
This can happen when a peer has disconnected but we haven't yet been
able to acquire a lock to the store to clean up the state associated
with it.
2022-11-01 11:21:40 +01:00
Antonio Scandurra
ef72c75fab Honor MAX_PEERS env variable in randomized test 2022-11-01 10:24:26 +01:00
Antonio Scandurra
c6e52dbef7 Fix hang due to acquiring rng lock twice 2022-11-01 09:35:53 +01:00
Antonio Scandurra
62547e87dd Prevent randomized test from failing if another guest disconnects 2022-11-01 09:27:51 +01:00
Antonio Scandurra
eb6b545eeb Fix outstanding compiler errors in randomized collaboration test 2022-11-01 08:40:31 +01:00
Antonio Scandurra
4c4ebbfa19 Start removing distinction between host and guest in random collab test 2022-11-01 08:40:08 +01:00
Julia
c4b21a0ab5 Add action to go to next/previous git diff in editor
Co-Authored-By: Kay Simmons <kay@zed.dev>
2022-10-28 15:08:13 -04:00
Max Brunsfeld
22db5bffe8 Update DO SSL certificate id in kube manifest 2022-10-26 16:19:19 -07:00
Max Brunsfeld
a61f3b715b Create preview channel 2022-10-26 16:19:19 -07:00
Antonio Scandurra
bb0f6e85a8 Assign a new language when remote buffer is renamed 2022-10-26 17:52:39 +02:00
Joseph T Lyons
383334633f Fix duplicate key error that occurs when a user joins that is already in the db
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-10-25 16:09:36 -04:00
Max Brunsfeld
c96c8fd782 collab 0.2.0 2022-10-24 17:06:54 -07:00
Max Brunsfeld
c80395fc18 Merge branch 'main' into auto-deploy-collab 2022-10-24 12:01:32 -07:00
Antonio Scandurra
484c8f7cbe Provide LiveKit environment variables on Kubernetes
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-10-24 17:03:18 +02:00
Antonio Scandurra
50c4783333 Add test for screen-sharing 2022-10-24 15:17:25 +02:00
Antonio Scandurra
9860dbbbea Set location on ActiveCall even before there's a room
We will automatically call `Room::set_location` once a room has been
assigned.
2022-10-24 15:07:25 +02:00
Antonio Scandurra
a8bd234aa4 Simplify room events 2022-10-24 10:53:44 +02:00
Antonio Scandurra
476020ae84 Show shared screen as a pane item 2022-10-24 10:04:08 +02:00
Max Brunsfeld
2f1ddc0d0f Improve deploy scripts 2022-10-21 15:50:14 -07:00
Max Brunsfeld
cedc0f64d5 Run migrations via a collab subcommand 2022-10-21 14:28:55 -07:00
Max Brunsfeld
9952f08cce Publish collab docker images on CI, deploy pre-built images 2022-10-21 14:24:43 -07:00
Antonio Scandurra
7e411ae098 Merge branch 'main' into screen-sharing
# Conflicts:
#	crates/collab/src/integration_tests.rs
#	crates/collab/src/main.rs
#	styles/src/styleTree/workspace.ts
2022-10-21 14:29:45 +02:00
Antonio Scandurra
1bbb7dd126 Leave Zed room when LiveKit room disconnects 2022-10-21 14:21:45 +02:00
Nathan Sobo
9858906463 Return an optional response when creating users via invites
If the user already exists, we return none. This will allow the web frontend
to avoid reporting a "join alpha" user event but also not error.

Co-Authored-By: Max Brunsfeld <max@zed.dev>
Co-Authored-By: Joseph Lyons <joseph@zed.dev>
2022-10-20 10:52:34 -06:00
Antonio Scandurra
5dc82d3df8 Delete all live-kit rooms when server is shut down 2022-10-20 14:34:05 +02:00
Nathan Sobo
69472f7823 Ensure we can send a second frame 2022-10-19 19:21:09 -06:00
Nathan Sobo
723fa83909 Use fake LiveKit server to test we can send frames when screen sharing 2022-10-19 19:14:55 -06:00
Max Brunsfeld
83e4e26989 Allow setting ZED_SERVER_URL to URL of a collab server 2022-10-19 13:27:14 -07:00
Antonio Scandurra
b6e5aa3bb0 Use live_kit_client::TestServer in integration tests
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-10-19 16:35:34 +02:00
Antonio Scandurra
219793afcc Merge remote-tracking branch 'origin/main' into screen-sharing 2022-10-19 10:04:56 +02:00
Max Brunsfeld
c410935c9c Allow impersonating users via the api token, bypassing oauth 2022-10-18 17:36:54 -07:00
Max Brunsfeld
5e57a33df7 Store entire Config struct on collab AppState 2022-10-18 13:58:03 -07:00
Max Brunsfeld
38bdf7ad92 Remove unused env vars from collab k8s manifest 2022-10-18 13:58:03 -07:00
Antonio Scandurra
6c322dc835 Clear out incoming call when removing last connection for a user
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-10-18 19:15:14 +02:00
Antonio Scandurra
0c0e8688ed Use PeerId in TestServer::disconnect_client
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-10-18 19:05:37 +02:00
Antonio Scandurra
6146923dbb WIP: Start on test to ensure incoming calls cancel upon recipient disconnection
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-10-18 18:45:50 +02:00
Antonio Scandurra
2c4f003897 Tell clients their peer id on connection in Hello message
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-10-18 18:42:55 +02:00
Antonio Scandurra
0491747eed Only leave room on connections that are associated with the active call
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-10-18 17:42:10 +02:00
Antonio Scandurra
48a1dd1588 Delete room when no participants are left 2022-10-18 14:59:12 +02:00
Mikayla Maki
5bb2edca8b Added absolute path info to remote worktrees (updated protocol version) 2022-10-17 15:27:46 -07:00
Mikayla Maki
1789dfb8b1 Fixed tests 2022-10-17 14:53:52 -07:00
Antonio Scandurra
499b8f5f55 WIP 2022-10-17 18:00:54 +02:00
Antonio Scandurra
81d83841ab WIP: Start integrating screen-sharing 2022-10-17 14:50:05 +02:00
Antonio Scandurra
cce00526b9 Remove participants from live-kit rooms when they leave zed rooms 2022-10-17 14:03:44 +02:00
Antonio Scandurra
c9225bb87c WIP: Start integrating with LiveKit when creating/joining rooms 2022-10-17 12:20:55 +02:00
Max Brunsfeld
b541ac313c Revert unnecessary logic for fetching invites' platform_unknown flag 2022-10-14 16:13:38 -07:00
Max Brunsfeld
3a4e802093 Include waitlist entries w/ unknown platform when summarizing and sending invites 2022-10-14 15:20:23 -07:00
Max Brunsfeld
2d3d07d4d7 Clear project's shared state upon every disconnection
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Antonio Scandurra <as-cii@zed.dev>
2022-10-14 10:17:59 -07:00
Antonio Scandurra
b8bc5a282e Allow inviting users to a project that was shared by someone else
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-10-13 18:48:14 +02:00
Antonio Scandurra
a5a60eb854 Log view name alongside error in ChildView 2022-10-13 15:44:01 +02:00
Max Brunsfeld
6cdf4e98fc Re-export basic text types from text and language crates
Also avoid production dependencies on fs and rope in collab
2022-10-12 15:48:19 -07:00
Max Brunsfeld
69dcfbb423 Send guests DiskBasedDiagnosticsFinished messages when they join a project
Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2022-10-12 13:49:09 -07:00
Max Brunsfeld
3c3671a193 Avoid sending stale diagnostics after sharing a worktree
Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2022-10-12 11:33:19 -07:00
Antonio Scandurra
ec19f0f8e9 Remove unnecessary async from Peer::add_connection 2022-10-12 15:32:39 +02:00
Antonio Scandurra
9adbab5d99 Fix opening a buffer after leaving and joining the same project
This bug existed prior to #1700 and was caused by not clearing the
buffers that were already shared with a peer that left and opened
a project using the same connection. When such peer would re-join
the project and open a buffer that it had opened previously, the
host assumed the peer had already seen that buffer and wouldn't bother
sending it again.
2022-10-12 10:31:06 +02:00
Mikayla Maki
41590ef64b
Merge branch 'main' into test-branch 2022-10-11 19:55:32 -07:00
Kay Simmons
81a3a22379
Merge pull request #1685 from zed-industries/vim-text-objects
Vim Text Objects and Numeric Repitions
2022-10-11 16:36:19 -07:00
Mikayla Maki
0beb97547e Finished refactoring out fs and rope 2022-10-11 15:25:54 -07:00
Max Brunsfeld
0e695eaae8 Wait for project sharing to complete in LSP status integration test 2022-10-11 12:15:54 -07:00
Antonio Scandurra
ee2587d3e5 Fix integration tests 2022-10-11 17:09:54 +02:00
Antonio Scandurra
4504b36c8f Show a different message when participant is active on unshared project
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-10-11 15:24:31 +02:00
Antonio Scandurra
8e7f96cebc Update contacts when automatically canceling calls 2022-10-11 11:55:15 +02:00
Antonio Scandurra
1d4bdfc4a1 Cancel calls automatically when caller hangs up or disconnects 2022-10-11 11:28:27 +02:00
Antonio Scandurra
bf488f2027 Show project root names when displaying incoming call notification 2022-10-11 10:59:36 +02:00
Nathan Sobo
b8c2acf0f2 Show worktree root names when sharing additional projects on a call
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2022-10-10 17:56:03 -06:00
Antonio Scandurra
d9d99e5e04 Fix seed script 2022-10-10 16:05:22 +02:00
Antonio Scandurra
afaacba41f Merge remote-tracking branch 'origin/main' into room 2022-10-10 15:43:38 +02:00
K Simmons
515c1ea123 Fixed some neovim test context issues, added repeated commands in vim mode, and ported some tests to use the neovim testing strategy 2022-10-08 21:52:07 -07:00
Antonio Scandurra
f9fb3f78b2 WIP: Render active call in contacts popover
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-10-07 17:01:48 +02:00
Antonio Scandurra
6fb5901d69 Ensure sharing the same project twice is idempotent 2022-10-07 14:47:06 +02:00
Antonio Scandurra
386de03f46 Fix room disconnection problems when creating room and sharing project 2022-10-07 14:39:11 +02:00
Antonio Scandurra
d7cea646fc Include a busy field in proto::Contact 2022-10-07 12:21:56 +02:00
Antonio Scandurra
669406d5af Leave room when client is the only participant 2022-10-07 11:58:49 +02:00
Antonio Scandurra
b479c8c8ba Move project sharing into Room 2022-10-07 10:14:17 +02:00
Antonio Scandurra
3d467a9491 Unset room on active call when disconnecting 2022-10-07 09:23:25 +02:00
Julia
d67fad8dca Extend a test to cover repos not at worktree root 2022-10-06 22:20:10 -04:00
Antonio Scandurra
95e08edbb8 Always include room id in protos
This is redundant, but it futures-proof the ability to talk about
multiple rooms at any given time and feels safer in terms of race
conditions.
2022-10-06 15:20:49 +02:00
Antonio Scandurra
4cb306fbf3 Implement call cancellation 2022-10-06 15:12:27 +02:00
Antonio Scandurra
2e84fc6737 Delete rooms without pending users or participants 2022-10-06 14:20:40 +02:00
Antonio Scandurra
55cc142319 Move incoming calls into ActiveCall 2022-10-06 09:50:26 +02:00
Antonio Scandurra
fa31c9659b Check room invariants in Store::check_invariants 2022-10-05 16:29:22 +02:00
Antonio Scandurra
5ef342f8c4 Enhance integration test to verify creating rooms while busy 2022-10-05 16:20:01 +02:00
Antonio Scandurra
5b811e4304 Add integration test verifying calls to busy users 2022-10-05 16:14:40 +02:00
Julia
836b536a90
Merge pull request #1632 from zed-industries/git-gutter
Tracking PR: Git gutter
2022-10-04 15:12:28 -04:00
Antonio Scandurra
fceba6814f Automatically share project when creating the room
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-10-04 19:25:48 +02:00
Antonio Scandurra
41240351d3 Simplify Collaborator to stop including the user
It can be retrieved from the `Room` and we're guaranteed to have
a room in order to have collaborators in a project.
2022-10-04 18:00:54 +02:00
Antonio Scandurra
456dde200c Implement Room::set_location 2022-10-04 11:46:01 +02:00
Julia
e6487de069 Rename head text to indicate that it's not always going to be from head
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-10-03 15:11:06 -04:00
Julia
a5c2f22bf7 Move git gutter settings out of editor settings
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-10-03 14:53:33 -04:00
Max Brunsfeld
4477f95ee6 Set staff user property in telemetry
Co-authored-by: Joseph Lyons <joseph@zed.dev>
2022-10-03 10:52:57 -07:00
Antonio Scandurra
1e45198b9f Emit event on Room when a user shares a new project 2022-10-03 17:12:07 +02:00
Antonio Scandurra
ad323d6e3b Automatically fetch remote participant users in Room 2022-10-03 16:09:49 +02:00
Antonio Scandurra
da6106db8e Prevent calls from users who aren't contacts 2022-10-03 15:54:20 +02:00
Antonio Scandurra
bec6b41448 Fix randomized integration test failure 2022-10-03 15:50:47 +02:00
Antonio Scandurra
6426037653 Adapt integration tests to always pass a room id to Project::share
Randomized test is failing, so we'll look into that next.
2022-10-03 15:44:11 +02:00
Mikayla Maki
0f1d71c38f
Merge branch 'main' into git-gutter 2022-10-02 18:03:50 -07:00
Mikayla Maki
56b4162023 Fix stray merge failure 2022-10-02 18:02:25 -07:00
Mikayla Maki
52dbf2f9b8 add proto stuff 2022-10-02 18:01:37 -07:00
Mikayla Maki
512f817e2f Added proto messages for updating the head text 2022-10-01 18:18:35 -07:00
Mikayla Maki
a1299d9b68 Fixed 1 test 2022-09-30 17:34:14 -07:00
Mikayla Maki
af0974264c Refactored git repository code to seperate out repository entry tracking data and git2 mocking code.
Co-authored-by: Max <max@zed.dev>
Co-authored-by: Julia <julia@zed.dev>
2022-09-30 17:33:34 -07:00
Julia
c95646a298 WIP Start refactoring separation of concerns for repo metadata
Co-Authored-By: Max Brunsfeld <max@zed.dev>
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-30 18:25:25 -04:00
Julia
ce7f6dd082 Start a test for remote git data updating
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-09-30 15:51:32 -04:00
Antonio Scandurra
964a5d2db7 WIP: require sharing projects on a given Room 2022-09-30 18:21:47 +02:00
Antonio Scandurra
074b8f18d1 Rip out project registration and use sharing/unsharing instead 2022-09-30 12:23:57 +02:00
Antonio Scandurra
be8990ea78 Remove project join requests 2022-09-30 11:35:50 +02:00
Max Brunsfeld
5d09083a7d Identify users in amplitude via a separate 'metrics_id' UUID 2022-09-29 13:15:21 -07:00