The goal of this PR is to send up events that contain the duration of
keyboard activity within Zed. I built the `EventCoalescer`, which gets
called called each time a key is pressed, within any environment (in the
case of this PR, within "editor" and "terminal). The" `EventCoalescer`
holds a start and end DateTime and adjusts the end instant as events
come in, until a timeout from the last event is hit.
I did my best to keep this mechanism efficient (avoiding vectors to
store moments in time, avoiding spawning timers threads, etc.), because
I know this is going to be per keystroke, but its behind a lock on the
telemetry struck, since it has to know when the environment changes, in
which point, it will automatically end the activity period, even if
there is no timeout. Because we have to have access to it from different
parts of the system, we have to go through the lock, which worried me a
bit (@mikayla-maki's intuition is that it should be fine).
As for the event, I take the time between the durations reported by the
event coalescer and send that up to zed - the indention is to
reconstruct the start and end times on zed.dev, in the same way we use
the event offset times and the time on zed.dev to get the official event
timestamp, and avoid the issue of the user having their system clocks
set wrong.
I'd really appreciate it if @nathansobo or @maxbrunsfeld could check
this out.
Release Notes:
- N/A
Joseph T. Lyons
created
2e36b0b
Do not split on only external directories being drag and dropped
Those were not installing Rust but configuring it via rustup, and
those configurations were done on `stable` toolchain which is not what we use (see rust-toolchain.toml)
co-authored-by: Piotr <piotr@zed.dev>
Kirill Bulatov
and
Piotr
created
a5dd253
Properly require clippy installation, try to shuffle clippy arguments
Click to expand commit body
co-authored-by: Piotr <piotr@zed.dev>
Kirill Bulatov
and
Piotr
created
d088ace
Explicitly push a node in the dispatch tree when painting a new view
Antonio Scandurra
created
1200f59
Try to run clippy just for a single target
Also, it looks like using a u64 directly doesn't work well with Metal
shaders, so we unpack the u64 into two u32s.
Antonio Scandurra
created
0db7559
editor: extend diff hunk range for custom transform blocks. (#4012)
Click to expand commit body
Reported by Mikayla:

Note how the line with rust analyzer error does not have a git diff
hunk.
vs:

Release Notes:
- N/A
4496946
Remove remaining port related todos (#3994)
Click to expand commit body
TODO:
- [x] Audit all TODO comments in Zed source and mark port related ones
with a !
- [x] Resolve all todos written as `todo!`
Release Notes:
- N/A
Mikayla Maki
created
cb5d4ed
Handle reconnects to the livekit server in which local tracks are unpublished (#3992)
Click to expand commit body
Release notes:
* Fixed a bug where network interruptions could cause audio and screen
sharing to stop working without indicating that they were stopped, and
there was no way to restart the audio stream.
Although it's not super clear why this fails; in zed1 we used to have a
bounds
check. Restoring the bounds check for now, but leaving a debug_assert!
in case
a local reproduction happens.
Release Notes:
- Fix a panic that happened sometimes when rendering folds
As part of debugging the port of following tests we added an assertion
that the project was dropped. Now that we initialize the editor and
handle focus correctly in tests, the project is retained by
`refresh_document_highlights`. That doesn't affect the meaning of the
tests
Conrad Irwin
created
282184a
editor: Use inclusive ranges for git diff resolution. (#3999)
Click to expand commit body
The culprit was in display map which was resolving next valid point for
the editor, without regard for whether that point belongs to the same excerpt. We now make an end point a minimum of the end point passed in and the start of excerpt header, if there are any.
This bug existed in Zed1 as well.
Fixes: Diff markers in multibuffer search overlap with dividers between
excepts (shouldn't extend all the way into the divider region)
Release Notes:
- Fixed diff markers being drawn incorrectly near headers in multibuffer
views.
Welcome to the party!
[[PR Description]]
Release Notes:
- Added Channels for structured real-time collaboration (TODO: link)
Conrad Irwin
created
5dff458
Ensure focus_in and focus_out fire on window activation (#3993)
Click to expand commit body
Also:
- Rename cx.on_blur to cx.on_focus_lost
- Fix a bug where notify calls in focus handlers were ignored
- Fix a bug where vim would get stuck in the wrong mode when switching
windows
Release Notes:
- (preview only) vim: fix switching between multiple windows