Commit Graph
427 Commits
Author SHA1 Message Date
Antonio Scandurra 339069b1d3 Cap MessageStream buffer size to 1MB
We temporarily let it grow when the message size exceed the limit,
but restore the buffer's capacity shortly after. This ensures that,
for each connection in its entire lifetime, we only ever use 1MB.
2022-05-31 11:16:32 +02:00
Antonio Scandurra 354488ebdf Don't eagerly populate copied subdirectory
This can race anyway with snapshot updates, so we just eagerly refresh
the root entry and wait for updates to come in to populate it.
2022-05-31 08:11:07 +02:00
Antonio Scandurra 20e1044d49 Merge branch 'main' into project-panel-with-new-mouse-events 2022-05-30 18:29:46 +02:00
Antonio Scandurra 88fdd8606a Eagerly populate child entries when copying a directory via RPC 2022-05-30 18:01:46 +02:00
Antonio Scandurra 3336bc6ab3 Implement copy paste for ProjectPanel 2022-05-30 14:52:34 +02:00
Max Brunsfeld e6be151a64 Emit the WorktreeRemoved event when removing a worktree from a project 2022-05-27 10:49:10 -07:00
Max Brunsfeld a1a4c70845 Emit an event when adding a worktree to a project 2022-05-27 10:48:47 -07:00
Antonio Scandurra 3ac6fc89c1 Pretty-print JSON of server snapshot 2022-05-26 09:34:39 +02:00
Antonio Scandurra ec88288d5e Bump chunk size to 256 2022-05-24 09:54:53 +02:00
Antonio Scandurra 85f228dade Fix logic error when streaming ignored entries
We were calling `next` twice, which led us to skip every other entry.
This commit also enhances the `test_share_project` integration test
to exercise this new streaming logic.
2022-05-24 09:03:05 +02:00
Antonio ScandurraandNathan Sobo 94e70bc1a6 WIP: log received updated_entries on remote worktree
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-23 19:39:24 +02:00
Antonio ScandurraandNathan Sobo c65dae8095 Correctly assign ignored status in refresh_entry
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-23 19:19:13 +02:00
Antonio Scandurra 23ca9dce2e WIP: stream ignored entries 2022-05-23 16:38:16 +02:00
Antonio Scandurra fe1498dc1d Fix worktree::Snapshot::entries(true) always being empty 2022-05-23 15:38:20 +02:00
Max Brunsfeld ef0b584532 Remove AppState from workspace actions
This allows those actions to be bound to keystrokes in the keymap.
Also, remove the WorkspaceParams struct, simplify how Workspaces are
constructed.
2022-05-19 14:37:26 -07:00
Antonio Scandurra 7b161b81b5 WIP: accept to join requests if user is already participating
There's a panic caused by `Store::check_invariants` that we still
need to figure out.
2022-05-17 13:21:20 +02:00
Nathan Sobo d821e7a4c1 Cancel join requests when the requester closes the window 2022-05-16 20:29:36 -06:00
Antonio ScandurraandNathan Sobo ed6ed99d8f Show the reason why a join request was declined
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-16 19:57:50 +02:00
Antonio Scandurra 47ce8ae05c Poll snapshot after refreshing entry 2022-05-16 11:50:21 +02:00
Antonio Scandurra b144995f27 Grab share state after retrieving metadata when refreshing entry 2022-05-16 11:46:49 +02:00
Max Brunsfeld 842bfae3af WIP - update worktree's scan_id when mutating it in the foreground 2022-05-13 17:03:48 -07:00
Antonio ScandurraandNathan Sobo 5789aeea24 Fix randomized test failure caused by unsharing while guest was joining
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-13 17:39:13 +02:00
Antonio ScandurraandNathan Sobo dd684d26a1 Make Project::share and Project::unshare private
This is still in-progress because randomized tests are failing.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-13 17:17:20 +02:00
Max BrunsfeldandNathan Sobo be51a58311 Start work on requesting to join projects
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-12 17:53:11 -07:00
Max BrunsfeldandNathan Sobo 3dee656490 Avoid panic when language server is dropped before being initialized in tests
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-09 18:05:10 -07:00
Max Brunsfeld 054d697fb7 Remove remaining code associated with .zed.toml files 2022-05-09 16:31:30 -07:00
Max Brunsfeld 2aec4ff234 Pick files directly from the Fs in simulate_host
Previously, the list of all existing files was maintained separately, but
it was not updated when a guest created a file.
2022-05-09 15:39:45 -07:00
Max BrunsfeldandNathan Sobo ea81737a88 Allow fuzzy-search for potential contacts in the contacts panel
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-05 14:14:44 -07:00
Antonio Scandurra 6212f2fe30 Wait for remote worktree to catch up with host before mutating entries
This ensures that entries don't randomly re-appear on remote worktrees
due to observing an update too late. In fact, it ensures that the remote
worktree has the same starting state of the host before preemptively applying
the fs operation locally.
2022-05-05 13:47:53 +02:00
Antonio Scandurra ecb847a027 Fix bugs in FakeFs::{remove_dir,rename} 2022-05-05 09:02:31 +02:00
Max Brunsfeld 4b1c46fa45 Allow deleting entries from the project panel 2022-05-04 18:00:23 -07:00
Max Brunsfeld 509ede0e80 Allow guests to create directories 2022-05-04 16:52:46 -07:00
Max Brunsfeld 40e0f10195 Allow creating directories from the project panel 2022-05-04 16:47:11 -07:00
Max BrunsfeldandNathan Sobo a2c22a5e43 Prevent eager snapshot mutations from being clobbered by background updates
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-04 15:10:39 -07:00
438e4e7a19 Allow guests to rename stuff
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-04 10:28:44 -07:00
Nathan SoboandAntonio Scandurra 470d693d5e Rename entries via the project to prepare for guest support
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-05-04 10:28:44 -07:00
Max BrunsfeldandNathan Sobo 657ea264cc Allow guests to create files from the project panel
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-04 10:28:44 -07:00
Max Brunsfeld 8291b8108d Update snapshot atomically when processing FS events 2022-05-04 10:28:44 -07:00
Max Brunsfeld 0ff39f1280 Select new files in the project panel after creating them 2022-05-04 10:28:44 -07:00
Max Brunsfeld a19766931d Rename entry atomically in LocalWorktree::rename 2022-05-04 10:28:44 -07:00
Max BrunsfeldandAntonio Scandurra 8fdc5c9be3 Improve the appearance of project panel filename editor
* Always layout single-line editors with a fixed height
* Preserve directory chevron when editing folder names
* Allow theming the filename editor

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2022-05-04 10:28:44 -07:00
Max Brunsfeld 333b4aaf4e Implement Rename command in project panel 2022-05-04 10:28:09 -07:00
Max Brunsfeld a217e2e64b Implement basic AddFile command in project panel 2022-05-04 10:28:09 -07:00
Max Brunsfeld d4492086b3 Abstract more local project setup inside Project::test helper 2022-05-04 10:28:09 -07:00
Keith Simmons d4bef67cf2 Merge pull request #929 from zed-industries/non-uniform-batched-edits
Allow batched edits where each range is associated with different insertion text
2022-04-29 16:14:38 -07:00
Keith Simmons b4b61b4bbc Consolidate edit and edit_batched functions 2022-04-28 16:52:04 -07:00
Keith Simmons 04fc1d5982 Building, but failing test WIP 2022-04-27 17:25:38 -07:00
Antonio Scandurra c955645bc0 Update share icon and swap its posiiton 2022-04-26 14:35:13 +02:00
Max Brunsfeld 45922603f8 Infer completions old ranges based on the syntax tree 2022-04-25 13:14:05 -07:00
Max Brunsfeld 8ddc7e6458 Respect lsp completions' 'insert_text' property when present
Fixes #839
2022-04-22 14:33:13 -07:00