Antonio Scandurra
a1d0d2ccc4
Add tests for client authentication while a previous sign in is pending
2022-08-02 14:28:47 +02:00
Antonio Scandurra
aa09bc527f
Allow signing in again if authentication is pending or was unsuccessful
...
The local server that we spin up to receive OAuth callbacks isn't
called when an error occurs and it is non-trivial to do so with
next-auth. Besides, there could be cases where the user explicitly
closes the browser window before the callback can be invoked.
With this commit, the user can sign in even while an authentication
is still in progress. As opposed to waiting for at most 10 minutes
before killing the local HTTP server if we haven't received the callback,
we will repeatedly check for a response every second for 100 seconds.
This gives us a chance to determine whether a new authentication has started
in the meantime and, if so, abort the current authentication flow.
2022-08-02 14:16:14 +02:00
Antonio Scandurra
b91d44b448
Respond with a debug version of the error in rpc Client
2022-07-07 11:52:56 +02:00
Max Brunsfeld
c5351a1276
Ensure that usernames, user ids, and client ids match in random collaboration test
...
This makes the logs easier to interpret
2022-06-30 14:51:22 -07:00
Antonio Scandurra
48ff443d10
Remove stray log statement when contacts are updated
...
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-06-22 19:40:52 +02:00
Max Brunsfeld
6a2c5e0dc1
Show upgrade required message when reconnecting after a protocol change
...
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2022-06-21 10:26:34 -07:00
Antonio Scandurra
c90e8c08a6
Accept a datetime range when querying project activity
2022-06-21 14:03:10 +02:00
Antonio Scandurra
68093342e7
Broadcast only visible worktree root names
2022-06-14 15:15:23 +02:00
Antonio Scandurra
3a69943df3
Require that PartialEq
is implemented for Action
2022-06-06 09:18:44 +02:00
Max Brunsfeld
24aafde1e8
Avoid persisting project's state before it has been initialized
2022-06-03 16:40:16 -07:00
Max Brunsfeld
36a4d31b5b
Keep unregistered projects' ids until pending contact updates are done
2022-06-02 18:04:54 -07:00
Max Brunsfeld
b70396b8fb
Disconnect FakeServer when dropping it
...
This prevents memory leak errors in tests, due to parked tasks waiting
for RPC responses.
2022-06-02 17:32:43 -07:00
Max Brunsfeld
7ef9de32b1
Show private projects in the contacts panel
...
Introduce a ProjectStore that lets you iterate through all open projects.
Allow projects to be made public by clicking the lock.
2022-06-02 17:29:11 -07:00
Antonio Scandurra
0597c662e4
Show contacts panel the first time a new user connects to collab
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-20 17:33:09 +02:00
Nathan Sobo
eedb8ba59f
Add affordance to copy user's invite link if they have a code
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-05-19 17:57:46 -06:00
Antonio Scandurra
2d986c7968
Show guest only once even if they joined on two different windows
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-17 16:21:09 +02:00
Nathan Sobo
d821e7a4c1
Cancel join requests when the requester closes the window
2022-05-16 20:29:36 -06:00
Max Brunsfeld
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 Brunsfeld
f54d74eda9
Merge branch 'main' into contact-panel-keyboard-nav
2022-05-11 17:45:44 -07:00
Max Brunsfeld
0ba656aa0e
Improve layout and styling of contact notifications
...
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-11 14:20:05 -07:00
Max Brunsfeld
3bc9b8ec85
Add notifications for accepted contact requests
...
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-11 11:39:01 -07:00
Antonio Scandurra
97d3616ed9
Show incoming request notification and implement dismissal
2022-05-11 15:13:37 +02:00
Max Brunsfeld
297fa1af55
Avoid possible memory leak of FakeServer in tests
2022-05-10 21:45:12 -07:00
Max Brunsfeld
d0052ccfb5
Avoid panic when trying to fetch an invalid URL
2022-05-10 21:44:33 -07:00
Nathan Sobo
fe89de8b11
Dismiss contact request notification if request is cancelled
2022-05-10 18:50:18 -06:00
Nathan Sobo
3bca1c29e2
Present a blank notification upon receipt of a contact request
2022-05-10 18:33:39 -06:00
Antonio Scandurra
a121576545
WIP
2022-05-10 18:25:47 +02:00
Antonio Scandurra
93688cbe22
Fix bug when determining contact status
...
Users are sorted by login but we were binary-searching them by id.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-10 17:26:53 +02:00
Antonio Scandurra
52c36d3e3d
Maintain online status in contacts panel
2022-05-10 10:33:57 +02:00
Nathan Sobo
4e9924c717
Filter out empty projects in contacts panel
2022-05-09 20:57:41 -06:00
Max Brunsfeld
45b6a9df36
Avoid sending a GetUsers request for an emptly list of user ids
...
We don't actually need to return the users at this time. We just call this for its side effect.
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-09 18:03:24 -07:00
Max Brunsfeld
b8aba0972d
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
d7cba73ead
Decrement pending_contact_requests even if a request fails
2022-05-09 16:19:00 -07:00
Nathan Sobo
40f1427885
Show requests in contacts panel
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-05-09 12:48:07 -06:00
Nathan Sobo
e3ee19b123
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
e4f1952657
WIP
2022-05-09 17:06:21 +02:00
Nathan Sobo
9b1b61355a
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
5d20338f69
Get basic test of accepting a contact request passing
2022-05-07 15:09:27 -06:00
Nathan Sobo
4f06dca78b
WIP: Update contacts based on deltas rather than snapshots
2022-05-06 20:50:59 -06:00
Max Brunsfeld
8a3425477f
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 Brunsfeld
4620c7a1e5
Filter existing contacts when searching in the contacts panel
2022-05-05 15:04:50 -07:00
Max Brunsfeld
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
da3870ea31
Pass secret token when uploading crashes
2022-05-02 15:42:52 +02:00
Antonio Scandurra
0e1e5b7d55
Make following redirects explicit in HttpClient::get
2022-04-27 13:14:45 +02:00
Nathan Sobo
78afbb3599
Remove async-std and surf from client
...
Switch to isahc library. It's not as fancy, but it works and has a smaller footprint.
2022-04-26 21:19:15 -06:00
Nathan Sobo
2adb9fe472
Get zed.dev working with new collab backend
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-04-26 11:15:41 -06:00
Antonio Scandurra
fb87bacc7e
Merge branch 'main' into auto-update
2022-04-21 09:53:06 +02:00
Nathan Sobo
17195e615e
Merge pull request #781 from zed-industries/structured-logging
...
Introduce structured logging
2022-04-09 07:40:24 -06:00
Max Brunsfeld
ed2b690b9e
Merge branch 'main' into namespace-actions
2022-04-08 11:48:43 -07:00
Nathan Sobo
7e5a3f9f6b
Introduce structured logging
...
We're enabling the log crate feature everywhere, but only using it on the server for now.
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-04-08 10:06:51 -06:00