Commit Graph
266 Commits
Author SHA1 Message Date
Max Brunsfeld 1082d2d506 Ensure a deterministic order to project activity summaries 2022-08-15 15:23:12 -07:00
Max Brunsfeld ad53de55a0 Add bootstrap script, avoid hard-coding zed team members 2022-08-15 13:25:31 -07:00
K Simmons 3dce18540e clippy fixes for focus change 2022-08-10 16:51:01 -07:00
ForLoveOfCatsandMikayla fbea44bc5c One big cleanup pass of clippy lints
Co-authored-by: Mikayla <mikayla@zed.dev>
2022-08-10 16:51:01 -07:00
Keith Simmons 4c746f43b5 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 07cab9f3c1 Fix failing tests 2022-08-10 16:26:53 -07:00
Mikayla Maki 8843ef5449 Added env toml so readme db instructions are correct 2022-08-10 15:07:02 -07:00
K Simmons 20770e7240 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 ac140c478e Handle RPC requests for type definitions on server and host 2022-08-04 15:10:46 -07:00
Antonio Scandurra 9921462d21 Assign 5 invites to users who redeem an invite code 2022-08-01 14:58:28 +02:00
Max BrunsfeldandMikayla Maki 669d716519 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 dcd12f677b Show symbols located in visible paths before ones located externally 2022-07-26 14:48:18 +02:00
Max Brunsfeld bda456a5d1 Start work on new text input handling in Editor 2022-07-20 16:45:27 -07:00
Antonio Scandurra 45a6d04eb4 Allow querying active user counts for people that have collaborated 2022-07-18 10:29:10 +02:00
Antonio Scandurra 9925cfd6f3 Expose max number of project collaborators in Db::get_top_user_activity 2022-07-18 08:58:09 +02:00
Max Brunsfeld dad538b510 Allow the web client to specify activity bucket durations 2022-07-15 16:46:44 -07:00
Max Brunsfeld e817042e8d Add admin API for counting users with a given amount of activity 2022-07-15 16:46:44 -07:00
Max Brunsfeld 7248048413 Move all default settings from source code into the JSON file 2022-07-12 11:35:19 -07:00
Antonio Scandurra 810a5d5318 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 985d005da4 Don't prompt guest to save when closing window after disconnection 2022-07-12 09:05:39 +02:00
Isaac Clayton 6a1f649d6a Fix minor issues pointed out in the review 2022-07-11 15:54:03 +02:00
Isaac Clayton 0b85613a86 Done! Finish transition to async, very close to merging 2022-07-07 16:21:20 +02:00
Isaac Clayton 69b1324a93 Further unpropogate async 2022-07-07 16:16:58 +02:00
Antonio Scandurra a1fadb916f Add integration test to exercise formatting via external command 2022-07-07 11:53:32 +02:00
Antonio Scandurra 384ba2bd2e Fix panics in database tests 2022-07-05 17:59:40 +02:00
Antonio Scandurra a90a086c3e Transmit new line ending when buffer is reloaded 2022-07-05 08:01:14 +02:00
Max Brunsfeld bf20993000 Rename NewlineStyle -> LineEnding 2022-07-04 12:47:40 -07:00
Antonio Scandurra f356219cd2 Detect buffer newline style and honor it when saving 2022-07-04 17:40:26 +02:00
Antonio Scandurra e8850d498c Merge branch 'main' into user-timeline 2022-07-04 09:23:16 +02:00
Antonio Scandurra d9fe8f56bc Add simulate_random_delay to every implemented method in FakeDb 2022-07-01 12:05:29 +02:00
Antonio Scandurra 08b828696a 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 2a30ec4924 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 c18607bf40 Split worktree updates when a peer joins an already-shared project 2022-06-30 16:49:56 +02:00
Antonio Scandurra f174a355bf Split worktree updates and only send 256 entries at a time 2022-06-30 14:06:41 +02:00
Antonio ScandurraandMax Brunsfeld 1f1370a11e 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 1ada2ebacb Record worktree extensions every 5 minutes
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-06-29 16:58:19 +02:00
Antonio Scandurra 6ea7ada031 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 2bff764afa Register project activity for offline projects as well 2022-06-29 14:55:04 +02:00
Antonio Scandurra b3e73bb201 Increase coalesce threshold in Db::get_user_activity_timeline 2022-06-29 14:26:02 +02:00
Max Brunsfeld 04d2c7f36a Add rest API for user activity timeline 2022-06-28 15:40:48 -07:00
Max Brunsfeld 9d3cddede7 🎨 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 0f4d80e35a Implement Db::summarize_user_activity
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-06-28 15:11:34 -07:00
Antonio Scandurra 7787ac3b6c 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 ffb933f79a Merge pull request #1237 from zed-industries/jump-to-definition
Mouse jump to definition
2022-06-27 15:20:07 -07:00
Keith Simmons b2c6087d10 Working underline based on symbol origin 2022-06-24 15:05:35 -07:00
Nathan Sobo 5de8f54370 Allow users with no invites to be fetched from the API 2022-06-24 09:57:52 -06:00
Antonio Scandurra e9c59b3cff WIP 2022-06-24 17:21:58 +02:00
Antonio Scandurra a4fc945cee Gather metrics only when /metrics endpoint is retrieved 2022-06-24 09:28:52 +02:00
Antonio Scandurra 4359c804ad Don't trace message payload 2022-06-24 09:27:22 +02:00
Antonio ScandurraandNathan Sobo 4f4829ba11 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