diff --git a/crates/collab/migrations/20221219181850_project_reconnection_support.sql b/crates/collab/migrations/20221219181850_project_reconnection_support.sql new file mode 100644 index 0000000000..6efef5571c --- /dev/null +++ b/crates/collab/migrations/20221219181850_project_reconnection_support.sql @@ -0,0 +1,3 @@ +ALTER TABLE "worktree_entries" + ADD COLUMN "scan_id" INT8, + ADD COLUMN "is_deleted" BOOL; diff --git a/crates/collab/src/integration_tests.rs b/crates/collab/src/integration_tests.rs index 0c26486667..4d08205b81 100644 --- a/crates/collab/src/integration_tests.rs +++ b/crates/collab/src/integration_tests.rs @@ -6077,6 +6077,7 @@ async fn test_random_collaboration( let mut user_ids = Vec::new(); let mut op_start_signals = Vec::new(); let mut next_entity_id = 100000; + let mut can_disconnect = rng.lock().gen_bool(0.2); let mut operations = 0; while operations < max_operations { diff --git a/crates/rpc/proto/zed.proto b/crates/rpc/proto/zed.proto index 9528bd10b7..6da9d0a7fc 100644 --- a/crates/rpc/proto/zed.proto +++ b/crates/rpc/proto/zed.proto @@ -253,6 +253,15 @@ message ShareProjectResponse { uint64 project_id = 1; } +message ReshareProject { + uint64 id = 1; + repeated WorktreeMetadata worktrees = 2; +} + +message ReshareProjectResponse { + repeated Collaborator collaborators = 1; +} + message UnshareProject { uint64 project_id = 1; } @@ -273,6 +282,22 @@ message JoinProjectResponse { repeated LanguageServer language_servers = 4; } +message RejoinProject { + uint64 project_id = 1; + repeated RejoinWorktree worktrees = 2; +} + +message RejoinWorktree { + uint64 id = 1; + uint64 scan_id = 2; +} + +message RejoinProjectResponse { + repeated WorktreeMetadata worktrees = 1; + repeated Collaborator collaborators = 2; + repeated LanguageServer language_servers = 3; +} + message LeaveProject { uint64 project_id = 1; }