When logging the edit environment, we were logging the newest
environment being sent into the EventCoalescer on the latest activity
log, when we should've been logging the environment that was associated
with the ended period within the EventCoalescer.
Release Notes:
- N/A
When logging the edit environment, we were logging the newest environment being sent into the EventCoalescer on the latest activity log, when we should've been logging the environment that was associated with the ended period within the EventCoalescer.
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
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>
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