Commit Graph
77 Commits
Author SHA1 Message Date
Joseph T LyonsandMax Brunsfeld 383334633f Fix duplicate key error that occurs when a user joins that is already in the db
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-10-25 16:09:36 -04:00
Max Brunsfeld cedc0f64d5 Run migrations via a collab subcommand 2022-10-21 14:28:55 -07:00
9858906463 Return an optional response when creating users via invites
If the user already exists, we return none. This will allow the web frontend
to avoid reporting a "join alpha" user event but also not error.

Co-Authored-By: Max Brunsfeld <max@zed.dev>
Co-Authored-By: Joseph Lyons <joseph@zed.dev>
2022-10-20 10:52:34 -06:00
Max Brunsfeld b541ac313c Revert unnecessary logic for fetching invites' platform_unknown flag 2022-10-14 16:13:38 -07:00
Max Brunsfeld 3a4e802093 Include waitlist entries w/ unknown platform when summarizing and sending invites 2022-10-14 15:20:23 -07:00
Antonio Scandurra afaacba41f Merge remote-tracking branch 'origin/main' into room 2022-10-10 15:43:38 +02:00
Max Brunsfeld 5d09083a7d Identify users in amplitude via a separate 'metrics_id' UUID 2022-09-29 13:15:21 -07:00
1d1bd3975a Remove current user from contacts
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-28 11:33:38 +02:00
Max BrunsfeldandJoseph Lyons 1db75ca2cf Make device_id optional on signups table
This way, signup won't fail if for some reason, the
user's client-side JS doesn't provide an amplitude
device id.

Co-authored-by: Joseph Lyons <joseph@zed.dev>
2022-09-27 16:04:01 -07:00
Max BrunsfeldandJoseph Lyons 4784dbe498 Link signups to users in telemetry via a stored device_id
Co-authored-by: Joseph Lyons <joseph@zed.dev>
2022-09-26 12:49:04 -07:00
Max BrunsfeldandNathan Sobo dac0ce10e5 Return the metrics id from the signup-creation API
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-09-22 14:37:25 -07:00
Max Brunsfeld 7a049f1404 Fix error when loading users without github user ids from the db 2022-09-21 14:27:06 -07:00
Max Brunsfeld 20ec933e23 Proceed gracefully when someone signs up repeatedly 2022-09-21 14:27:06 -07:00
Max Brunsfeld 1877fc234b Update user retrieval API to take both github user id and github login 2022-09-20 15:41:00 -07:00
Max Brunsfeld 9886259b3a Start storing users' github user id 2022-09-20 09:44:56 -07:00
Max Brunsfeld e77263a3c7 Remove bulk user creation admin API 2022-09-19 14:34:37 -07:00
Max Brunsfeld 963ced1dd8 Preserve metrics_id from signup to user record 2022-09-19 14:19:00 -07:00
Max Brunsfeld 3dd8845bd8 Add waitlist summary API 2022-09-19 14:19:00 -07:00
Max Brunsfeld f8c7c925af Update APIs and DB interactions to reflect email confirmation step 2022-09-19 14:19:00 -07:00
Max BrunsfeldandNathan Sobo d85ecc8302 Add collab APIs for new signup flow
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-09-19 14:19:00 -07:00
Max Brunsfeld 51b98d548b Ensure a deterministic order to project activity summaries 2022-08-15 15:23:12 -07:00
ForLoveOfCatsandMikayla 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 ScandurraandMax 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 ScandurraandNathan 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 ScandurraandMax 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 BrunsfeldandAntonio 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 SoboandMax 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 ScandurraandNathan Sobo b751156cd7 Rename first_connection to connected_once
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-20 17:35:00 +02:00