Commit Graph

13056 Commits

Author SHA1 Message Date
Conrad Irwin
898645681f Move settings subscription to dock
Reduces likelihood of panels being unable to move themselves
2024-01-13 22:41:26 -07:00
Conrad Irwin
e90ddba2c3 Default to Zed Sans for UI 2024-01-13 22:38:22 -07:00
Conrad Irwin
fee369bca1 Fix re-docking chat panel 2024-01-13 22:26:25 -07:00
Conrad Irwin
818cbb2415 Show a border when scrolled in chat 2024-01-13 22:19:21 -07:00
Conrad Irwin
c810af40d3 Fix multiple mentions in one message 2024-01-13 21:53:22 -07:00
Conrad Irwin
f6ef07e716 Make chat prettier (to my eyes at least) 2024-01-13 21:37:13 -07:00
Conrad Irwin
c2ff9fe2da Don't lose focus on default panel state 2024-01-13 14:32:24 -07:00
Mikayla Maki
89f0d1643e
Restore temp file initialization in telemetry code (#4043)
Release Notes:

- Fix 'open telemetry log' command to actually show the telemetry log.
2024-01-13 09:04:08 -08:00
Mikayla
4d6dfa319d
Don't open files unescessary in dev builds 2024-01-12 22:47:07 -08:00
Mikayla
1d7dc96135
Restore temp file initialization in telemetry code 2024-01-12 21:37:09 -08:00
Mikayla Maki
acb13738b8
Disable searches for '.' in the terminal. (#4042)
Release Notes:

- N/A A crash that could occur when searching for '.' in the terminal
with a large monitor.
2024-01-12 21:17:10 -08:00
Mikayla
78858d4d11
Disable searches for '.', so that users with large monitors don't accidentally crash the terminal when searching for dot files. 2024-01-12 21:12:02 -08:00
Mikayla
bb35805f9b
fmt 2024-01-12 21:02:01 -08:00
Mikayla
bfb59f1598
Remove last stale code 2024-01-12 20:59:19 -08:00
Mikayla
5897b18cfd
remove more commented code 2024-01-12 20:10:40 -08:00
Mikayla
3a836b8026
Remove some comments 2024-01-12 20:10:40 -08:00
Max Brunsfeld
51218811cf Don't initialize audio crate in integration tests
Otherwise, a lot of time is spent in Audio::play_sound
2024-01-12 17:29:33 -08:00
Nathan Sobo
d2c436dcdc
fix bounds checks (#4038)
Ensure we `panic()` instead of crash on graphics memory buffer overflow

Also bump the buffer size to 32Mb from 8Mb to make this rarer (but still
possible)

Release Notes: Fixes some crahes due to lack of graphics buffer spacae
2024-01-12 15:28:19 -08:00
Max Brunsfeld
c2cf28804a Don't run newly published audio tracks when deafened
Also, simplify the management of the muted and deafened state in Room.
2024-01-12 15:12:29 -08:00
Conrad Irwin
eafe0944e0 Some tweaks for chat panels 2024-01-12 16:01:51 -07:00
Julia
8014d9a643
Still paint group hover handler for invisible divs (#4039)
Fixes bug where tab close icon show on hover is inconsistent

Release Notes:

- Fixed a bug where a tab's close icon would not always appear on hover.
2024-01-12 17:52:24 -05:00
Max Brunsfeld
aa50f69940 Add LiveKit APIs for starting and stopping audio tracks 2024-01-12 14:46:17 -08:00
Julia
cdc227b32f Still paint group hover handler for invisible divs
Fixes bug where tab close icon show on hover is inconsistent
2024-01-12 17:44:15 -05:00
Conrad Irwin
50f3bbbc8b Open chat when joining a channel with guests
(and close it when leaving a channel again)
2024-01-12 15:08:14 -07:00
Conrad Irwin
aa5c6a8aa3 Update graphics memory assert to be more helpful 2024-01-12 14:35:50 -07:00
Mikayla
324d1d119b
Add some context to assert 2024-01-12 12:40:37 -08:00
Conrad Irwin
551fd9ba7e Boop 2024-01-12 12:40:09 -07:00
Max Brunsfeld
7dc28aad78 Forbid paste, undo, redo on read-only editors 2024-01-12 10:38:05 -08:00
Conrad Irwin
f0d490c671 Open chat panel for guests 2024-01-12 10:34:24 -07:00
Conrad Irwin
dc158f708f Update chat panel with current channel 2024-01-12 10:23:30 -07:00
Antonio Scandurra
f4a7f6f4c3 Fix warning 2024-01-12 18:06:18 +01:00
Conrad Irwin
981858ef3c Fix panic with many participants 2024-01-12 10:02:55 -07:00
Antonio Scandurra
817b641c17 Ensure editor elements invalidate their parent views on notify
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Conrad Irwin <conrad@zed.dev>
2024-01-12 17:36:11 +01:00
Marshall Bowers
bc09ce6ffc
Clean up some theme TODOs (#4034)
This PR cleans up some TODOs we had in the themes.

We won't be addressing these in the immediate term, so no need to have
them show up when folks are looking for TODOs to burn down before
launch.

I added some general notes as signposts until we're ready to revisit
this.

Release Notes:

- N/A
2024-01-12 10:37:18 -05:00
Antonio Scandurra
a32ad3f907 Fix editor tests 2024-01-12 14:50:42 +01:00
Antonio Scandurra
94293b3bf9 Merge remote-tracking branch 'origin/main' into cache
# Conflicts:
#	crates/gpui/src/window.rs
2024-01-12 14:31:13 +01:00
Max Brunsfeld
08a4307d71 Fix failure to write to keychain because of dropping a future 2024-01-11 16:22:34 -08:00
Max Brunsfeld
02029c945a Suppress unused field warning 2024-01-11 16:21:55 -08:00
Max Brunsfeld
43fbe6fedf
Temporarily avoid releasing livekit RemoteAudioTracks on drop (#4030)
This release call was added during the conversion to gpui2. I think it
is probably valid, but want to remove it on the off chance that it is
causing the crash that we're seeing in the `livekit.multicast` thread
when leaving a room.

Most likely, this is not going to fix anything, and is just introducing
a small memory leak, but it is a step back to how the app worked with
gpui 1.
2024-01-11 15:53:01 -08:00
Max Brunsfeld
9d50697caa Temporarily avoid releasing livekit RemoteAudioTracks on drop
This release call was added during the conversion to gpui2. I think
it is probably valid, but want to remove it on the off chance that
it is causing the crash that we're seeing in the `livekit.multicast`
thread when leaving a room.
2024-01-11 15:46:21 -08:00
Piotr Osiewicz
8d294211db settings.json: Suggest font names for buffer_font_family 2024-01-11 23:23:10 +01:00
Piotr Osiewicz
a1049546a2 gpui: Validate font contents at load time.
During layout of EditorElement we use 'm' character from current font to calculate sizes, panicking with fonts that do not have that character (e.g. Arabic fonts). It's not really EditorElement's fault, as it assumes that the font it's dealing with is gonna have that character available.
To prevent a crash, I added validation while loading a family that a given font contains the glyphs we're gonna use down the line.
2024-01-11 23:23:10 +01:00
Max Brunsfeld
258c2fdad4 Fix routing of leader updates from unshared projects
Previously, leader updates in unshared projects would be sent to
all followers regardless of project, as if they were not scoped
to any project.
2024-01-11 13:47:31 -08:00
Conrad Irwin
7c817642b8
Don't hold platform lock while calling user callbacks (#4027)
Inspired by a bug where using Edit -> Copy from the menu created a
deadlock.

Release Notes:

- Fix a deadlock when copying from Edit -> Copy
2024-01-11 14:26:34 -07:00
Conrad Irwin
a8b8be47e0 Don't hold platform lock while calling user callbacks
Inspired by a bug where using Edit -> Copy from the menu created a
deadlock.
2024-01-11 13:52:50 -07:00
Max Brunsfeld
cb11fb68cb
Avoid bright green separators when displaying untitled buffers in multi-buffers (#4024)
Release notes:

- Fixed unstyled excerpt separators when showing untitled buffers in
multi-buffers.
2024-01-11 12:19:55 -08:00
Mikayla
d2b15c90e8
collab 0.36.1 2024-01-11 11:00:42 -08:00
Mikayla Maki
e3c9c602f9
Whoops (#4011)
Fixes a spelling mistake I made in the database schema 😬

Release Notes:

- n/a
2024-01-11 10:57:08 -08:00
Conrad Irwin
4d66ade332
Fix multi-key shortcuts (#4025)
An old fix was ported over from gpui1, and the two fixes could not exist
side-by-side. Delete this code and let the keymap handle it

Release Notes:

- (Added|Fixed|Improved) ...
([#<public_issue_number_if_exists>](https://github.com/zed-industries/community/issues/<public_issue_number_if_exists>)).
2024-01-11 11:36:51 -07:00
Mikayla
91d3ba5390
Switch to non-destructive migration 2024-01-11 10:33:33 -08:00
Conrad Irwin
43183538a7
Stop following when project is unshared (#4010)
Before this change the views would continue to update in the background
of the "disconnected" dialogue, which was disconcerting.

[[PR Description]]

Release Notes:

- Fixed an edge-case where following didn't handle unshare correctly
2024-01-11 11:26:56 -07:00
Conrad Irwin
51cc6b1e1c
Guard against infinite loop in focus handling (#4023)
Release Notes:

- Fix an infinite loop in focus handling
2024-01-11 11:26:37 -07:00
Conrad Irwin
23fe720ca6 Fix multi-key shortcuts
An old fix was ported over from gpui1, and the two fixes could not exist
side-by-side. Delete this code and let the keymap handle it
2024-01-11 11:24:55 -07:00
Max Brunsfeld
5feae86900 Avoid bright green separators when displaying untitled buffers in multi-buffers 2024-01-11 09:55:16 -08:00
Piotr Osiewicz
a98d048905
gpui: Make TextSystem::line_wrapper non-fallible. (#4022)
Editors WrapMap could become desynchronised if user had an invalid font
specified in their config. Compared to Zed1, WrapMap ignored the
resolution failure instead of panicking. Now, if there's an invalid font
in the user config, we just fall back to an arbitrary default.


Release Notes:
- Fixed the editor panic in presence of invalid font name in the config
(fixes https://github.com/zed-industries/community/issues/2397)

---------

Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-01-11 18:52:00 +01:00
Piotr Osiewicz
af790d11ee Add test for new DeploySearch behaviour 2024-01-11 18:39:28 +01:00
Piotr Osiewicz
634a55257d project search: Do not open a new existing item in the current pane for DeploySearch
Fixes https://github.com/zed-industries/community/issues/2395 using the first approach suggested in the original post (focus the existing search without bringing it over to a pane).
2024-01-11 18:39:28 +01:00
Conrad Irwin
06493471aa Guard against infinite loop in focus handling 2024-01-11 10:38:08 -07:00
Joseph T. Lyons
a9fce19048 Return a single Option from EventCoalescer 2024-01-11 12:27:59 -05:00
Antonio Scandurra
11b433dc1c Move back to sorting entries in the depth map as we insert them 2024-01-11 18:24:07 +01:00
Joseph T. Lyons
06ce1af530 Only return environment when period ends 2024-01-11 11:30:22 -05:00
Joseph T. Lyons
f4c698ba27 Fix bug with improperly reported environment
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.
2024-01-11 11:24:55 -05:00
Antonio Scandurra
101cedb5f7 💄 2024-01-11 16:59:33 +01:00
Kirill Bulatov
35db07fff1
Show abs path matches in file finder (#4018)
Deals with https://github.com/zed-industries/community/issues/2158

Release Notes:

- Make File finder to show matching file for the abs path queries
2024-01-11 17:57:31 +02:00
Antonio Scandurra
cbbba41748 Reuse line layouts when reusing view 2024-01-11 16:57:06 +01:00
Kirill Bulatov
dd6e2df2a1 Show abs path matches in file finder 2024-01-11 17:49:46 +02:00
Kirill Bulatov
ba83623c84 Fix whitespace symbol colors in the editor, use zed1 one
co-authored-by: Marshall Bowers <marshall@zed.dev>
2024-01-11 17:43:49 +02:00
Kirill Bulatov
9bb50a5ded Restore hover action in the editor 2024-01-11 16:19:44 +02:00
Antonio Scandurra
18eaefd0ed Reuse cursor style when reusing a view tree 2024-01-11 15:03:34 +01:00
Kirill Bulatov
4fe0c473ca
Do not split on only external directories being drag and dropped (#4015)
Release Notes:

- Fixed drag and dropped folders opening an empty split pane
2024-01-11 15:23:53 +02:00
Joseph T. Lyons
75cb409d2e
Instrument edit events (#4006)
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
2024-01-11 08:19:29 -05:00
Kirill Bulatov
2e36b0b72a Do not split on only external directories being drag and dropped 2024-01-11 15:09:43 +02:00
Kirill Bulatov
348bc842ef
Enforce no dbg! and todo! in Rust code via clippy lints in the CI job (#4005)
Release Notes:

- N/A
2024-01-11 14:25:31 +02:00
Antonio Scandurra
50ccdf5c16 Reuse input handler when reusing a view tree 2024-01-11 13:22:59 +01:00
Kirill Bulatov
41bc49af36 Remove redundant install Rust steps
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>
2024-01-11 14:11:13 +02:00
Kirill Bulatov
a5dd2535f1 Properly require clippy installation, try to shuffle clippy arguments
co-authored-by: Piotr <piotr@zed.dev>
2024-01-11 13:56:28 +02:00
Antonio Scandurra
d088ace404 Explicitly push a node in the dispatch tree when painting a new view 2024-01-11 12:48:05 +01:00
Antonio Scandurra
142a8b68c8 Avoid casting view ids to u32
Also, it looks like using a u64 directly doesn't work well with Metal
shaders, so we unpack the u64 into two u32s.
2024-01-11 12:28:48 +01:00
Piotr Osiewicz
0db7559e96
editor: extend diff hunk range for custom transform blocks. (#4012)
Reported by Mikayla:

![image](https://github.com/zed-industries/zed/assets/24362066/b744d82e-328f-4554-becf-96f9fa92bfc8)
Note how the line with rust analyzer error does not have a git diff
hunk.
vs:

![image](https://github.com/zed-industries/zed/assets/24362066/e285af7a-b8ab-40e9-a9c6-b4ab8d6c4cd0)

Release Notes:
- N/A
2024-01-11 12:26:12 +01:00
Mikayla
6503dd51dd
enviroment -> environment 2024-01-10 22:57:58 -08:00
Joseph T. Lyons
0df4bfacc2 Increase debug mode queue size 2024-01-11 01:12:49 -05:00
Joseph T. Lyons
8a61d5059b Never send an an empty set of events 2024-01-11 01:12:30 -05:00
Conrad Irwin
f418bd907d Stop following when project is unshared
Before this change the views would continue to update in the background
of the "disconnected" dialogue, which was disconcerting.
2024-01-10 23:09:09 -07:00
Mikayla Maki
31689c09e5
Uncomment last tests (#4009)
With this, we're done all known things that need porting. 

Release Notes:

-
2024-01-10 20:00:14 -08:00
Mikayla
83163a0031
Reverse context arrays in child predicate test 2024-01-10 19:54:39 -08:00
Mikayla
38396d4281
Add remaining tests
co-authored-by: Conrad <conrad@zed.dev>
2024-01-10 19:39:43 -08:00
Mikayla
a5ca58354d
Fix first few asserts 2024-01-10 18:26:01 -08:00
Joseph T. Lyons
bddf827bc1 Add reminder for the future 2024-01-10 21:02:34 -05:00
Mikayla Maki
44969460cd
Remove remaining port related todos (#3994)
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
2024-01-10 17:31:05 -08:00
Max Brunsfeld
cb5d4edc4b
Handle reconnects to the livekit server in which local tracks are unpublished (#3992)
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.
2024-01-10 16:34:11 -08:00
Mikayla
1932a298cb
Add back ime_key 2024-01-10 16:29:00 -08:00
Max Brunsfeld
75fdaeb56f Detect when a track is unpublished due to reconnecting to livekit
Co-authored-by: Julia <julia@zed.dev>
2024-01-10 16:12:26 -08:00
Max Brunsfeld
2d1eb0c56c Expose a single updates stream from live_kit_client::Room
Co-authored-by: Julia <julia@zed.dev>
2024-01-10 16:10:52 -08:00
Conrad Irwin
b907f375a3
Fix fold-related panic (#4008)
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
2024-01-10 16:53:25 -07:00
Conrad Irwin
766a869208 Fix fold-related panic 2024-01-10 15:51:13 -07:00
Joseph T. Lyons
b4444bdfc0 Rename field in telemetry struct 2024-01-10 17:41:02 -05:00
Kirill Bulatov
2e9c9adfbe Remove active call data when it was accepted
That hopefully helps with call notifications sometimes not being closed

co-authored-by: Max <max@zed.dev>
2024-01-11 00:35:00 +02:00
Kirill Bulatov
7b3e7ee3cc Enfoce no dbg! and todo! in Rust code via clippy lints in the CI job 2024-01-11 00:26:46 +02:00
Antonio Scandurra
a4ef1bc096 Rename reuse_geometry to reuse_view 2024-01-10 23:06:10 +01:00
Joseph T. Lyons
9df29fb347 WIP 2024-01-10 17:04:26 -05:00