Commit graph

13469 commits

Author SHA1 Message Date
Sharun
0c4679f892
bugfix: fix LineEnding for windows 2024-01-25 03:16:42 -05:00
gmorenz
dd07d2f8a2
Update cocoa to crates.io version (#6452)
https://github.com/servo/core-foundation-rs/pull/457 was released in
cocoa 0.25, so this patch dependency on github can be removed.

Release Notes:

- N/A
2024-01-25 10:04:29 +02:00
Conrad Irwin
1c2859d72b
collab errors (#4152)
One of the complaints of users on our first Hack call was that the error
messages you got when channel joining failed were not great.

This aims to fix that specific case, and lay the groundwork for future
improvements.

It adds two new methods to anyhow::Error

* `.error_code()` which returns a value from zed.proto (or
ErrorCode::Internal if the error has no specific tag)
* `.error_tag("key")` which returns the value of the tag (or None).

To construct errors with these fields set, you can use a builder API
based on the ErrorCode type:

* `Err(ErrorCode::Forbidden.anyhow())`
* `Err(ErrorCode::Forbidden.message("cannot join channel").into())` - to
add any context you want in the logs
* `Err(ErrorCode::WrongReleaseChannel.tag("required", "stable").into())`
- to add structured metadata to help the client handle the error better.


Release Notes:

- Improved error messaging when channel joining fails.
2024-01-24 23:23:58 -07:00
Conrad Irwin
01424a62ea Allow prompts to have detail, and use for good
Make channel panel errors louder
2024-01-24 23:15:37 -07:00
Sean Aye
5fcc75be1f
gpui: Add hello world example (#6465)
Added hello world example to the gpui crate copied from https://gpui.rs

Release Notes:

- N/A
2024-01-25 01:03:53 -05:00
Conrad Irwin
cf3b2ba146
Fix panic from unwrapping a relativize() (#6459)
Release Notes:

- Fixed a panic that could occur finding a git repository.
2024-01-24 23:03:41 -07:00
Joseph T. Lyons
f9170cb239 Remove references to community repo 2024-01-25 00:30:26 -05:00
Conrad Irwin
320088f1fa Fix panic from unwrapping a relativize() 2024-01-24 20:56:39 -07:00
Conrad Irwin
df420c3767 Better naming 2024-01-24 20:48:29 -07:00
Conrad Irwin
4bcd3494b7 Try to send typed errors back and forth
TEMP

TEMP

First pass of structured errors

Improved error handling for channel joining failures
2024-01-24 20:32:39 -07:00
Conrad Irwin
865369882e
Fix circular locking in prompts (#6456)
Sometimes Cocoa calls app delegate methods (notably the display link)
while we're calling Cocoa methods. This causes a deadlock unless we
are careful to run cocao methods while we're not holding our internal
locks

Release Notes:

- Fixed a crash when opening the MacOS Save As dialogue.
2024-01-24 20:10:32 -07:00
Conrad Irwin
a181dc8d58
Use the correct snapshot when calculating mouse positions (#6453)
Release Notes:

- Fixed a panic in calculating remote cursor positions
2024-01-24 19:44:02 -07:00
Conrad Irwin
249a6da54a Fix circular locking in prompts
Sometimes Cocoa calls app delegate methods (notably the display link)
while we're calling Cocoa methods. This causes a deadlock unless we
are careful to run cocao methods while we're not holding our internal
locks
2024-01-24 19:40:01 -07:00
Conrad Irwin
f185aca25a Use the correct snapshot when calculating mouse positions 2024-01-24 19:10:53 -07:00
Max Brunsfeld
6ed7cc7833
Simplify language server startup (#6449)
These are just some small refactorings of our language-server-starting
code, motivated by another change that I decided to bail on:
https://github.com/zed-industries/zed/pull/6448.
2024-01-24 17:36:50 -08:00
Joseph T. Lyons
10437794e4
Remove unused dependency (#6435)
[[PR Description]]

The `color` crate is not actually used by the `zed` crate, despite being
listed as a dependency. This PR removes it.
2024-01-24 16:19:04 -05:00
Julia
569bb687be
Prevent channel from vertically growing when containing facepile (#6439)
Previously at UI font size of 20
 - User-less channel: 28 px tall
 - Occupied channel: 30 px tall
 
Now, still at UI font size 20:
 - User-less channel: 30 px tall
 - Occupied channel: 30 px tall

Release Notes:

- Fixed an issue where a channel would grow in height while showing
participant avatars.
2024-01-24 16:17:25 -05:00
Julia
9bc968eabb Prevent channel from vertically growing when containing facepile 2024-01-24 15:57:12 -05:00
Conrad Irwin
4ac3095a15
chat mentions for newly joined users (#5099)
Release Notes:

- Added chat mentions for everyone in the call
2024-01-24 13:33:23 -07:00
Julian Braha
5907bb5b55 Remove unused dependency 2024-01-24 20:29:29 +00:00
Conrad Irwin
28b2c89254
Fix crash in feedback modal (#6431)
After the general release we saw a number of crashes due to a SEGFAULT
inside the
System::new() method apparently relating to refreshing the user list.

As we do not need the user list, and the similar code in the telemtry
create is not crashing,
do less work for now.

Release Notes:

- Fixed a crash when opening the feedback modal
2024-01-24 13:25:22 -07:00
Chase Weaver
cf3b4b0ba7
Fix: Comment shortcut in Svelte files now respects if the line(s) are HTML vs JS/TS (#5860)
Release Notes:

- Fixed: When using the comment shortcut, previously HTML or JS/TS would
all prefix lines with `// `. This PR brings the comments inline with
what is expected (`// ` for JS/TS, `<!-- ... -->` for HTML). Fixes
[#4578](https://github.com/zed-industries/zed/issues/4578).
2024-01-24 12:24:49 -08:00
Mikayla Maki
71ec781215
Fix RUSTSEC-2018-0017 (#5338)
[[PR Description]]

This replaces the `tempdir` crate with `tempfile`, which resolves
[RUSTSEC-2018-0017](https://rustsec.org/advisories/RUSTSEC-2018-0017).
2024-01-24 12:19:05 -08:00
Joseph T. Lyons
40dbe15b2a Update all links point to community 2024-01-24 15:11:17 -05:00
Conrad Irwin
334dc620ea Fix crash in feedback modal 2024-01-24 13:00:12 -07:00
Conrad Irwin
482c01aaf3
Ensure chat opens when guests join shared projects (#6425)
This was broken because the panel was created before being added to a
dock. Invert the control order and add `starts_open()` to the Panel
trait (which lets us simplify how this worked for the ProjectPanel too)

Release Notes:

- Improved Chat visibility when joining a call as a guest
2024-01-24 12:45:04 -07:00
Conrad Irwin
c56debc705 clippy 2024-01-24 12:40:24 -07:00
Conrad Irwin
e7db5d0638 Use run_until_parked instead of condition
Avoids spurious failures when the CI server is going slow
2024-01-24 12:28:45 -07:00
Conrad Irwin
a860ca6a3c Fix tests that were toggling the panel shut 2024-01-24 12:22:12 -07:00
Conrad Irwin
2a11c22760 Ensure chat opens when guests join shared projects
This was broken because the panel was created before being added to a
dock. Invert the control order and add `starts_open()` to the Panel
trait.
2024-01-24 12:06:03 -07:00
Mikayla Maki
4599fa840d
Revert "Ensure that notify observations are sent during Window::draw()" (#6152)
Reverts zed-industries/zed#4236

This causes an infinite loop when opening the language server logs
2024-01-24 10:56:45 -08:00
Pseudomata
da01c1a83b
Open bug reports in zed-industries/zed (#5862)
It looks like bug reports are being moved from
`zed-industries/community` to `zed-industries/zed`. This PR updates the
`feedback` crate to update the GitHub URL to reflect this change.
2024-01-24 13:51:43 -05:00
Mikayla Maki
a7368904f3
Revert "Ensure that notify observations are sent during Window::draw()" 2024-01-24 10:50:52 -08:00
Conrad Irwin
e072c96003 Fix tests 2024-01-24 11:35:10 -07:00
Conrad Irwin
9693e14809 Merge branch 'main' into chat-mentions-for-newly-joined-users 2024-01-24 11:31:27 -07:00
Patrick Dubroy
291f353085
Fix registers link in README.md (#5389)
It looked to me that `registers` was intended to be a link here...if I'm
wrong, feel free to ignore :-)

Release Notes:

- N/A
2024-01-24 13:21:08 -05:00
Julian Braha
08d2ba72d6 Add missing .unwrap() 2024-01-24 18:19:03 +00:00
Conrad Irwin
c5ad1728f9 Clippy 2024-01-24 11:18:17 -07:00
Julian Braha
85f5e7d0bb Fix formatting with cargo-fmt 2024-01-24 18:10:11 +00:00
Julian Braha
fd6f71d287 Replace tempdir crate with tempfile 2024-01-24 17:58:09 +00:00
Conrad Irwin
c1df166700 Allow completions of everyone in the call 2024-01-24 10:51:46 -07:00
Max Brunsfeld
c81d318098 Start work on allowing mentions for all users in call 2024-01-24 09:45:26 -08:00
Conrad Irwin
489ef23b76
Show hovered cursors less flickerily (#4242)
Now when hovering on a cursor it'll stay around for 2 seconds

Release Notes:

- Improved hovering over collaborators' cursors.
2024-01-24 10:20:34 -07:00
Joseph T. Lyons
a4897e00b4 v0.121.x dev 2024-01-24 10:54:33 -05:00
Antonio Scandurra
4665b9afb6
Improve startup time (#4248)
Since our last measurements, startup time in Zed had regressed quite
significantly. This was due to several issues:

- We were loading IBMPlex, which we're not really using in the UI.
- Images were being parsed in the foreground, thus blocking the main
thread
- Language models (for semantic index and assistant) were being loaded
in the foreground, thus blocking the main thread
- Interaction with the keychain was blocking the main thread

In addition to these, with this pull request we will now deserialize the
items for a pane in parallel, as opposed to doing so sequentially.

All combined, when running the zed binary directly this brings startup
time from ~350ms to ~210ms on my machine.

Release Notes:

- Improved startup time.
2024-01-24 15:39:05 +01:00
Antonio Scandurra
25a7eb27d2 Move interaction with keychain off the main thread 2024-01-24 14:53:05 +01:00
Thorsten Ball
2ce24dc746
Fix tab bar button's focus handling lagging behind (#4247)
This fixes https://github.com/zed-industries/community/issues/2442 for
me.

Previously, the tab bar buttons would stay when the chat panel was
opened (and received focus) until something else was drawn (or caused a
render?)

With this change, the tab bar buttons are only shown if the pane was
focus.

I'm not sure about the side-effects of this, but the toolbar still seems
to work fine.

### Before


https://github.com/zed-industries/zed/assets/1185253/24b56e51-467b-4a09-909f-72ee6f76f32c

### After



https://github.com/zed-industries/zed/assets/1185253/18865f49-d00e-453a-8a38-aee15f06beb8



### Release Notes:

- (Added|Fixed|Improved) ...
([#<public_issue_number_if_exists>](https://github.com/zed-industries/community/issues/<public_issue_number_if_exists>)).
2024-01-24 14:21:39 +01:00
Mikayla Maki
b9218ae80b
Add module documentation to GPUI and make gpui.rs example compile (#4241)
[[PR Description]]

Release Notes:

- N/A
2024-01-24 05:19:15 -08:00
Piotr Osiewicz
0d0c85a5ee Fix typo in comment 2024-01-24 14:03:12 +01:00
Piotr Osiewicz
fe2cb9f9ca fixup! pane: Another stab at focus flickers in tab bar 2024-01-24 14:01:17 +01:00