Commit Graph
2567 Commits
Author SHA1 Message Date
Antonio Scandurra a6a9aa6dc3 Uncomment randomized tests for contacts 2022-05-16 15:13:32 +02:00
Antonio Scandurra 1373403134 Delete commented-out code 2022-05-16 09:50:36 +02:00
Antonio Scandurra aa6d96a26d Initialize UserStore before client connects in integration tests
This fixes a failure in `test_contacts` where we were receiving the
initial `proto::UpdateContacts` message before `UserStore` had a chance
to register a message handler for it.
2022-05-16 09:48:24 +02:00
Keith Simmons 157de669ae Merge pull request #973 from zed-industries/selections-refactor
Pull selections out of editor into selections collection
2022-05-13 16:07:26 -07:00
Keith Simmons c95f74648a Rename selected_ranges and selected_display_ranges to remove redundant selected 2022-05-13 15:55:27 -07:00
Keith Simmons 2a984285a2 store buffer and display_map model handles on selections collection 2022-05-13 15:55:27 -07:00
Keith Simmons 851e04d46b Passing tests and removed local argument. Also pulled autoscroll argument out to change_selections 2022-05-13 15:55:27 -07:00
Keith Simmons 9b46bb0ee6 Move selection helpers to SelectionCollection, add update_anchor_selections, add a number of invariant preserving mutation functions to the MutableSelectionCollection 2022-05-13 15:55:17 -07:00
Max Brunsfeld 2afcbe8b63 Send RemoveProjectCollaborator to host in addition to ProjectUnshared 2022-05-13 15:04:48 -07:00
Max Brunsfeld 4f473eba7a Tell host to unshare project when last guest leaves 2022-05-13 14:57:55 -07:00
Antonio ScandurraandNathan Sobo b8383deda2 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 b3fc910632 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 8d00fab9b1 Start work on requesting to join projects
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-12 17:53:11 -07:00
Nathan Sobo a897e2318b Merge pull request #990 from zed-industries/more-tracing
Improve tracing support
2022-05-12 14:45:50 -06:00
Nathan Sobo e0cc0b833e Try to improve tracing messages when client disconnects 2022-05-12 13:05:05 -06:00
Nathan Sobo 9f2b29550d Include login in connection-related tracing spans/events
Also, include metadata on more events and add an event called "signing out" with all this metadata to make it easier to search for.
2022-05-12 12:06:06 -06:00
Nathan Sobo d96cc06c5b Remove commented method 2022-05-12 11:37:33 -06:00
0207fa49fc 💄
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-05-12 10:16:50 -06:00
Nathan SoboandAntonio Scandurra 4ba72c3243 Use tracing instead of log in collab and rpc crates
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-05-12 10:05:49 -06:00
Nathan SoboandAntonio Scandurra 925c002a90 WIP: Enhance tracing in Peer
- Add a bunch of events to Peer's async connection handling logic
- Use an EnvFilter to allow more control over the verbosity level of tracing on a per-module basis
- Wire up logging to emit trace events (we actually probably want to do this the other way around)

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-05-12 09:58:17 -06:00
Max Brunsfeld 00af7d0273 Merge branch 'main' into contact-panel-keyboard-nav 2022-05-11 17:45:44 -07:00
Max Brunsfeld d8c19a7a2b Fix bug where Contacts included projects for which the use was a guest 2022-05-11 16:49:56 -07:00
Max BrunsfeldandNathan Sobo 0a1ca3dfc5 Add notifications for accepted contact requests
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-11 11:39:01 -07:00
fe64f8e388 Add the ability to notify when a user accepts a contact request
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-05-11 18:51:40 +02:00
Antonio ScandurraandNathan Sobo 0aa63af210 Show badge when there are pending contact requests
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-11 17:39:03 +02:00
Antonio Scandurra 95202cc7f8 Show incoming request notification and implement dismissal 2022-05-11 15:13:37 +02:00
Max Brunsfeld da6edc7dfe Include every user in their own list of contacts 2022-05-10 14:05:07 -07:00
Antonio ScandurraandNathan Sobo 1bdbee8173 Make user fuzzy search case-insensitive
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-10 17:30:09 +02:00
Antonio ScandurraandNathan Sobo 6ba39d5f2d Seed first users from GitHub when running script/seed-db --github-users
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-10 17:19:39 +02:00
Antonio Scandurra 2a8b06dd3e Prevent users from fuzzy searching and adding themselves as contacts 2022-05-10 12:22:50 +02:00
Antonio Scandurra 606f7548a0 Maintain online status in contacts panel 2022-05-10 10:33:57 +02:00
Max BrunsfeldandNathan Sobo cbba405d6d Wait until contacts have been cleared when disconnecting
Also, use an mpsc for UpdateContacts messages, not a watch, since
the messages now represent changes instead of snapshots.

Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-09 17:23:39 -07:00
Max Brunsfeld 2e64ea4a2e Allow users to remove contact relationships that they initiated 2022-05-09 16:31:30 -07:00
Max Brunsfeld 0684665af5 Remove remaining code associated with .zed.toml files 2022-05-09 16:31:30 -07:00
Max Brunsfeld a56faf9bec 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
Nathan SoboandMax Brunsfeld 91656e3ee2 Update a user's contacts when they connect; fix test failures
The test failure we fixed doesn't seem directly related to the contact update. Maybe it just caused a failure to occur earlier than it would have in the sequence of seeds.

We fixed the test failure by responding to a user joining the project while holding the lock on the Store. This ensures that we don't send messages related to the project to that user until they've had a chance to setup event handlers after receiving the response.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-05-09 15:57:16 -06:00
Nathan SoboandMax Brunsfeld 52cce93287 Show requests in contacts panel
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-05-09 12:48:07 -06:00
Nathan SoboandMax Brunsfeld ab1ed218dd Wire up UI for requesting contacts and cancelling requests
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-05-09 11:24:05 -06:00
Antonio Scandurra 333488cc7a WIP 2022-05-09 17:06:21 +02:00
Antonio Scandurra 3d0970539a Forbid joining projects if users are not contacts 2022-05-09 15:51:54 +02:00
Antonio Scandurra 1ec45338ba Update contacts when peers join/leave and when project status changes 2022-05-09 15:08:18 +02:00
Antonio Scandurra a6103b0d39 Implement contact rejection 2022-05-09 10:02:14 +02:00
Nathan Sobo 25c3408fc5 Fully test contact request acceptance
* Be sure we send updates to multiple clients for the same user
* Be sure we send a full contacts update on initial connection

As part of this commit, I fixed an issue where we couldn't disconnect and reconnect in tests. The first disconnect would cause the I/O future to terminate asynchronously, which caused us to sign out even though the active connection didn't belong to that future. I added a guard to ensure that we only sign out if the I/O future is associated with the current connection.
2022-05-08 15:19:56 -06:00
Nathan Sobo f6146aecab Get basic test of accepting a contact request passing 2022-05-07 15:09:27 -06:00
Nathan Sobo 83742793ac WIP: Fix compile errors by commenting stuff out 2022-05-07 14:04:13 -06:00
Nathan Sobo a7a14c4542 WIP: Update contacts based on deltas rather than snapshots 2022-05-06 20:50:59 -06:00
Max BrunsfeldandNathan Sobo 62e1c9b13b Start work on RPC endpoints for dealing with contact requests
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-06 15:44:47 -07:00
Max BrunsfeldandNathan Sobo e7d4a2441b Implement persistence for contacts
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-06 13:33:23 -07:00
Antonio ScandurraandNathan Sobo 580797d5aa Refactor add_request_handler to respond via a Response struct
This also removes `add_sync_request_handler`.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-06 17:01:27 +02:00
Antonio ScandurraandNathan Sobo 90e87937bd Wait on RECEIVE_TIMEOUT in tests when testing disconnection
We were waiting for 3 seconds, but the timeout had changed in the meantime,
making some iterations of the tests fail.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-06 16:47:08 +02:00