Commit graph

363 commits

Author SHA1 Message Date
Mikayla Maki
52dbf2f9b8 add proto stuff 2022-10-02 18:01:37 -07:00
Mikayla Maki
512f817e2f Added proto messages for updating the head text 2022-10-01 18:18:35 -07:00
Mikayla Maki
a1299d9b68 Fixed 1 test 2022-09-30 17:34:14 -07:00
Mikayla Maki
af0974264c Refactored git repository code to seperate out repository entry tracking data and git2 mocking code.
Co-authored-by: Max <max@zed.dev>
Co-authored-by: Julia <julia@zed.dev>
2022-09-30 17:33:34 -07:00
Julia
c95646a298 WIP Start refactoring separation of concerns for repo metadata
Co-Authored-By: Max Brunsfeld <max@zed.dev>
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-30 18:25:25 -04:00
Julia
ce7f6dd082 Start a test for remote git data updating
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-09-30 15:51:32 -04:00
Antonio Scandurra
964a5d2db7 WIP: require sharing projects on a given Room 2022-09-30 18:21:47 +02:00
Antonio Scandurra
074b8f18d1 Rip out project registration and use sharing/unsharing instead 2022-09-30 12:23:57 +02:00
Antonio Scandurra
be8990ea78 Remove project join requests 2022-09-30 11:35:50 +02:00
Max Brunsfeld
5d09083a7d Identify users in amplitude via a separate 'metrics_id' UUID 2022-09-29 13:15:21 -07:00
Antonio Scandurra
b35e8f0164 Remove projects from contact updates
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-09-29 19:40:36 +02:00
Antonio Scandurra
e0db62173a Rename room crate to call
Also, rename `client::Call` to `client::IncomingCall`.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-09-29 17:24:31 +02:00
Nathan Sobo
8ff4f044b7 Start a call when clicking on a contact in the contacts popover
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2022-09-28 11:02:26 -06:00
Antonio Scandurra
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
Antonio Scandurra
80ab144bf3 Ring users upon connection if somebody was calling them before connecting
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-09-28 11:33:38 +02:00
Antonio Scandurra
6aa0f0b200 Leave room automatically on disconnection
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-09-28 11:33:38 +02:00
Antonio Scandurra
f0c45cbceb Remove projects from basic calls test for now 2022-09-28 11:33:38 +02:00
Antonio Scandurra
e55e7e4844 Leave room when Room entity is dropped 2022-09-28 11:33:38 +02:00
Antonio Scandurra
573086eed2 Always rely on the server to cancel the incoming call 2022-09-28 11:33:38 +02:00
Antonio Scandurra
df285def59 💄 2022-09-28 11:33:38 +02:00
Antonio Scandurra
bb9ce86a29 Introduce the ability of declining calls 2022-09-28 11:33:38 +02:00
Antonio Scandurra
f4697ff4d1 Prevent the same user from being called more than once 2022-09-28 11:33:38 +02:00
Antonio Scandurra
55b095cbd3 Implement joining a room and sending updates after people join/leave 2022-09-28 11:33:38 +02:00
Antonio Scandurra
4a9bf8f4fe Introduce call infrastructure
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-09-28 11:33:38 +02:00
Antonio Scandurra
ebb5ffcedc Introduce the ability of creating rooms on the server 2022-09-28 11:33:38 +02:00
Antonio Scandurra
0b1e372d11 Start sketching out an integration test for calls
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-09-28 11:33:38 +02:00
Antonio Scandurra
8fec7da799 WIP 2022-09-28 11:33:38 +02:00
Max Brunsfeld
f2ebb094a2 Remove unnecessary index drop in down migration 2022-09-27 16:58:03 -07:00
Max Brunsfeld
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 Brunsfeld
5d0b6a3da7 Merge branch 'main' into new-signup-flow 2022-09-27 15:35:05 -07:00
Max Brunsfeld
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 Brunsfeld
04baccbea6 Start work on a client-side telemetry system 2022-09-23 12:23:12 -07:00
Julia
f3395cf4fd Add editor action to manually invoke buffer format 2022-09-22 18:21:05 -04:00
Max Brunsfeld
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
758875305b Add on delete cascade to signups user_id column 2022-09-20 16:12:27 -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 Brunsfeld
d85ecc8302 Add collab APIs for new signup flow
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-09-19 14:19:00 -07:00
K Simmons
b88abcacac WIP dock split button and default item 2022-09-11 15:31:44 -07:00
Antonio Scandurra
9c9bf07e40 Create buffers for remote collaborators out of band
Previously, we would use `Project::serialize_buffer_for_peer` and
`Project::deserialize_buffer` respectively in the host and in the
guest to create a new buffer or just send its ID if the host thought
the buffer had already been sent.

These methods would be called as part of other methods, such as
`Project::open_buffer_by_id` or `Project::open_buffer_for_symbol`.
However, if any of the tasks driving the futures that eventually
called `Project::deserialize_buffer` were dropped after the host
responded with the buffer state but (crucially) before the guest
deserialized it and registered it, there could be a situation where
the host thought the guest had the buffer (thus sending them just the
buffer id) and the guest would wait indefinitely.

Given how crucial this interaction is, this commit switches to creating
remote buffers for peers out of band. The host will push buffers to guests,
who will always refer to buffers via IDs and wait for the host to send them,
as opposed to including the buffer's payload as part of some other operation.
2022-08-17 11:55:36 +02:00
Antonio Scandurra
75c9b90c76 Add failing unit test for buffer opening cancellation 2022-08-17 11:55:34 +02:00
Max Brunsfeld
51b98d548b Ensure a deterministic order to project activity summaries 2022-08-15 15:23:12 -07:00
Max Brunsfeld
776095caf0 Add bootstrap script, avoid hard-coding zed team members 2022-08-15 13:25:31 -07:00
K Simmons
9aa3f2d777 clippy fixes for focus change 2022-08-10 16:51:01 -07:00
ForLoveOfCats
8ba2f77148 One big cleanup pass of clippy lints
Co-authored-by: Mikayla <mikayla@zed.dev>
2022-08-10 16:51:01 -07:00
Keith Simmons
ec015d4607
Merge pull request #1422 from zed-industries/workspace-child-focus-pane-activation
Add on_child_focus and on_child_blur to View trait
2022-08-10 16:42:01 -07:00
K Simmons
d68f227ec4 Fix failing tests 2022-08-10 16:26:53 -07:00
Mikayla Maki
ee0e6a0109 Added env toml so readme db instructions are correct 2022-08-10 15:07:02 -07:00
K Simmons
4271eb3624 Event dispatch moved to MutableAppContext. No longer dispatches from presenter. Not currently handling key presses properly 2022-08-09 17:09:16 -07:00
Max Brunsfeld
7527850546 Handle RPC requests for type definitions on server and host 2022-08-04 15:10:46 -07:00
Antonio Scandurra
bc8bec8261 Assign 5 invites to users who redeem an invite code 2022-08-01 14:58:28 +02:00
Max Brunsfeld
fa5af4383d Introduce AutoindentMode parameter to Buffer::edit
This controls whether or not we preserve the relative indentation
of inserted text blocks.

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
2022-07-28 14:03:31 -07:00
Antonio Scandurra
8552ba15dc Show symbols located in visible paths before ones located externally 2022-07-26 14:48:18 +02:00
Max Brunsfeld
f985515141 Start work on new text input handling in Editor 2022-07-20 16:45:27 -07: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
69146fb318 Allow the web client to specify activity bucket durations 2022-07-15 16:46:44 -07:00
Max Brunsfeld
1363d2c502 Add admin API for counting users with a given amount of activity 2022-07-15 16:46:44 -07:00
Max Brunsfeld
ec8a493700 Move all default settings from source code into the JSON file 2022-07-12 11:35:19 -07:00
Antonio Scandurra
afc8e9050c
Merge pull request #1252 from zed-industries/plugin
Language Server WebAssembly Plugin Integration (Part 2)
2022-07-12 11:04:20 +02:00
Antonio Scandurra
b1e3b38cb3 Don't prompt guest to save when closing window after disconnection 2022-07-12 09:05:39 +02:00
Isaac Clayton
ec327a30c3 Fix minor issues pointed out in the review 2022-07-11 15:54:03 +02:00
Isaac Clayton
895747476f Done! Finish transition to async, very close to merging 2022-07-07 16:21:20 +02:00
Isaac Clayton
6585daccf9 Further unpropogate async 2022-07-07 16:16:58 +02:00
Antonio Scandurra
52b8efca1b Add integration test to exercise formatting via external command 2022-07-07 11:53:32 +02:00
Antonio Scandurra
f1ffcb626a Fix panics in database tests 2022-07-05 17:59:40 +02:00
Antonio Scandurra
eac76df0ac Transmit new line ending when buffer is reloaded 2022-07-05 08:01:14 +02:00
Max Brunsfeld
9804c683c0 Rename NewlineStyle -> LineEnding 2022-07-04 12:47:40 -07:00
Antonio Scandurra
3480b50920 Detect buffer newline style and honor it when saving 2022-07-04 17:40:26 +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
Antonio Scandurra
d36a4888db Ensure worktrees have been sent before responding with definitions
Changing the frequency at which we update worktrees highlighted a
problem in the randomized tests that was causing clients to receive
a definition to a worktree *before* observing the registration of
the worktree itself. This was most likely caused by #1224 because
the scenario that pull request enabled was the following:

- Guest requests a definition pointing to a non-existant worktree
- Server forwards the request to the host
- Host sends an `UpdateProject` message
- Host sends a response to the definition request
- Server observes the `UpdateProject` message and tries to acquire
  the store
- Given that we're waiting, the server goes ahead to process the
  response for the definition request, responding *before*
  `UpdateProject` is forwarded
- Server finally forwards `UpdateProject` to the guest

This commit ensures that, after forwarding a project request and getting a
response, we acquire a lock to the store again to ensure the project still
exists. This has the effect of ordering the forwarded request *after* any
message that was received prior to the response and for which we are still
waiting to acquire a lock to the store.
2022-07-01 11:45:30 +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
484af8c7c4 Split worktree updates when a peer joins an already-shared project 2022-06-30 16:49:56 +02:00
Antonio Scandurra
09bb3ddeb8 Split worktree updates and only send 256 entries at a time 2022-06-30 14:06:41 +02:00
Antonio Scandurra
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
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
09f4262fd4 Don't share a project unless it's online and we're allowing a request 2022-06-29 15:16:55 +02:00
Antonio Scandurra
e3cfc7b3ce Register project activity for offline projects as well 2022-06-29 14:55:04 +02:00
Antonio Scandurra
a52de770b1 Increase coalesce threshold in Db::get_user_activity_timeline 2022-06-29 14:26:02 +02:00
Max Brunsfeld
14d7375149 Add rest API for user activity timeline 2022-06-28 15:40:48 -07: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
5cc5e15f4d Implement Db::summarize_user_activity
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-06-28 15:11:34 -07:00
Antonio Scandurra
ca1d0a6e59 Ignore tokens that were not created via WorkDoneProgressCreate
With the new version of rust-analyzer, we were seeing stray `WorkDoneProgress::End`
messages that create an imbalance in the `pending_diagnostic_updates` that never
resolves. This was causing the diagnostic status bar item to never update because
we wouldn't emit `DiskBasedDiagnosticsStarted` nor `DiskBasedDiagnosticsFinished`.

This commit fixes the above situation by only acknowledging progress report for tokens
that have explicitly been created via the `WorkDoneProgressCreate` request, as stated
by the protocol.

In addition to that, we are replacing the `pending_diagnostic_updates: isize` with
a `has_pending_diagnostic_updates: bool`. We added it at some point to prevent a similar
issue where we would observe begin/end reports in a seemingly random order, which would cause
us to permanently display a `checking...` message in the status bar. I believe this commit
fixes that as well because the `isize` was just a less general solution for the same
underlying issue. As the protocol states: "the token provided in the create request should
only be used once (e.g. only one begin, many report and one end notification should be sent
to it)."
2022-06-28 10:08:43 +02:00
Keith Simmons
bc82d98ae5
Merge pull request #1237 from zed-industries/jump-to-definition
Mouse jump to definition
2022-06-27 15:20:07 -07:00
Keith Simmons
848445455d Working underline based on symbol origin 2022-06-24 15:05:35 -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
Antonio Scandurra
fc5517b6be Gather metrics only when /metrics endpoint is retrieved 2022-06-24 09:28:52 +02:00
Antonio Scandurra
a04adbcac1 Don't trace message payload 2022-06-24 09:27:22 +02:00
Antonio Scandurra
555847449b Use BTreeMap in Server so we release memory when maps are cleared
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-06-23 18:02:17 +02:00
Antonio Scandurra
f2d134917e Remove non-determinism from Peer caused by smol's timeout helper 2022-06-22 18:39:12 +02:00
Antonio Scandurra
071d940a88 Ensure receive timeout is triggered before waiting on disconnection 2022-06-22 18:02:42 +02:00
Antonio Scandurra
9b521d6097 Use Arc<Deterministic> to understand which await points are parking 2022-06-22 17:39:34 +02:00