ForLoveOfCats and Mikayla
8ba2f77148
One big cleanup pass of clippy lints
...
Co-authored-by: Mikayla <mikayla@zed.dev >
2022-08-10 16:51:01 -07:00
Antonio Scandurra
bc8bec8261
Assign 5 invites to users who redeem an invite code
2022-08-01 14:58:28 +02:00
Antonio Scandurra
316a534a16
Allow querying active user counts for people that have collaborated
2022-07-18 10:29:10 +02:00
Antonio Scandurra
2cbb0ae843
Expose max number of project collaborators in Db::get_top_user_activity
2022-07-18 08:58:09 +02:00
Max Brunsfeld
1363d2c502
Add admin API for counting users with a given amount of activity
2022-07-15 16:46:44 -07:00
Antonio Scandurra
f1ffcb626a
Fix panics in database tests
2022-07-05 17:59:40 +02:00
Antonio Scandurra
d3b9eca791
Merge branch 'main' into user-timeline
2022-07-04 09:23:16 +02:00
Antonio Scandurra
4d3c708387
Add simulate_random_delay to every implemented method in FakeDb
2022-07-01 12:05:29 +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 and Max Brunsfeld
5eaa45363d
Order by total duration in Db::get_top_users_activity_summary
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2022-06-29 18:28:43 +02:00
Antonio Scandurra and Nathan Sobo
639cd71a3b
Record worktree extensions every 5 minutes
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-06-29 16:58:19 +02:00
Antonio Scandurra
a52de770b1
Increase coalesce threshold in Db::get_user_activity_timeline
2022-06-29 14:26:02 +02:00
Max Brunsfeld
1d10e45282
🎨 Tweak some names dealing with user activity
...
* Rename `project_activity_summary` to `top_users_activity_summary`
to make clearer the distinction between it and the per-user summary.
* Rename `user_activity_summary` to `user_activity_timeline`, since
its output is structured a bit differently than the courser-grained
"summary" returned by the top-user query.
* Rename `ActivityDuration` -> `ActivityPeriod`
2022-06-28 15:37:56 -07:00
Antonio Scandurra and Max Brunsfeld
5cc5e15f4d
Implement Db::summarize_user_activity
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2022-06-28 15:11:34 -07:00
Nathan Sobo
4da3005b5c
Allow users with no invites to be fetched from the API
2022-06-24 09:57:52 -06:00
Antonio Scandurra
b0eb692760
WIP
2022-06-24 17:21:58 +02:00
Max Brunsfeld and Antonio Scandurra
30d75620f1
Fix error when worktree has no file extensions
...
Co-authored-by: Antonio Scandurra <me@as-cii.com >
2022-06-21 11:02:13 -07:00
Antonio Scandurra
db77601aa2
Expose project metadata via GET /project_metadata
2022-06-21 18:06:31 +02:00
Antonio Scandurra
c90e8c08a6
Accept a datetime range when querying project activity
2022-06-21 14:03:10 +02:00
Antonio Scandurra
95a629d200
Unregister project from db when user disconnects or manually does so
2022-06-21 10:37:34 +02:00
Antonio Scandurra
7acebc4eb8
Register projects in the database and record worktree extensions
2022-06-21 10:29:26 +02:00
Max Brunsfeld
44160869eb
Add an API that returns the most active users and the projects where they've been active
2022-06-20 19:46:37 -07:00
Antonio Scandurra
76da93d260
Merge branch 'main' into users-api
2022-06-14 11:14:16 +02:00
Antonio Scandurra
49d7b4bc12
Allow specifying query, limit and page when hitting /api/users
...
This is needed to introduce pagination and search in our admin panel.
2022-06-13 17:30:01 +02:00
Antonio Scandurra
fe1a861bf3
Expose a new POST /api/bulk_users API to create many users at once
...
This API will accept a vector of JSON entries containing the GitHub login,
the email address and the invite count. If that user already exist, the
invite count will be updated to the new one.
2022-06-13 15:18:18 +02:00
Nathan Sobo
6ed503fe6e
Implement get_invite_code_for_user on test db
2022-05-23 18:07:23 -06:00
Nathan Sobo and Max Brunsfeld
51a61cc485
Don't assign invite code when updating count from 0 to 0
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2022-05-23 17:28:05 -06:00
Nathan Sobo
7a8ff5abd7
Accept an optional email address when creating new users
2022-05-20 20:25:21 -06:00
Antonio Scandurra and Nathan Sobo
b751156cd7
Rename first_connection to connected_once
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-05-20 17:35:00 +02:00
Antonio Scandurra
d8ee4378c9
Send a ShowContacts message the first time a user connects to collab
2022-05-20 15:47:14 +02:00
Nathan Sobo and Antonio Scandurra
a3bbabaaac
Add ability to get the user for an invite code in collab API
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2022-05-19 12:35:07 -06:00
Nathan Sobo and Antonio Scandurra
3d7e912c6b
Enable descriptive HTTP errors to be returned from DB layer
...
For now, we only use this when redeeming an invite code.
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2022-05-19 11:55:55 -06:00
Nathan Sobo
d1b7a249b4
WIP
2022-05-19 11:09:44 -06:00
Nathan Sobo and Antonio Scandurra
7e2d1fefc4
Add ability to update invite count to collab API
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2022-05-18 10:23:08 -06:00
Nathan Sobo and Antonio Scandurra
cfb31067a5
Add invite codes / counts to users table
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2022-05-18 09:56:37 -06:00
a5fd664b00
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
Max Brunsfeld
334f246df3
Include every user in their own list of contacts
2022-05-10 14:05:07 -07:00
Antonio Scandurra and Nathan Sobo
b00338195e
Make user fuzzy search case-insensitive
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-05-10 17:30:09 +02:00
Max Brunsfeld and Nathan Sobo
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
0533a0bd3c
Allow users to remove contact relationships that they initiated
2022-05-09 16:31:30 -07:00
Nathan Sobo and Max Brunsfeld
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
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
93dae88cac
WIP: Fix compile errors by commenting stuff out
2022-05-07 14:04:13 -06:00
Nathan Sobo
4f06dca78b
WIP: Update contacts based on deltas rather than snapshots
2022-05-06 20:50:59 -06:00
Max Brunsfeld and Nathan Sobo
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 and Nathan Sobo
274c4c244c
Implement persistence for contacts
...
Co-authored-by: Nathan Sobo <nathan@zed.dev >
2022-05-06 13:33:23 -07:00
Max Brunsfeld
35fea43089
Adjust fuzzy search to avoid filtering based on edit distance threshold
2022-05-05 12:43:38 -07:00
Nathan Sobo
6050e0ead7
Add fuzzy_search_users to Db trait, PostgresDb
2022-05-05 09:58:18 -06:00
Nathan Sobo and Antonio Scandurra
1fe964ac16
Start moving from logging to tracing on collab server
...
Install some spans. Probably more work to do here.
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2022-04-28 09:45:59 -06:00