This Week at Zed Industries: #8

June 23rd, 2023

Another productive week is in the books. We've been primarily focused on AI, collaboration, and performance.


I've been chipping away at polishing the assistant panel. Notable improvements include the addition of message splitting options and the introduction of multi-cursor support. Alongside Nathan, we also added the ability to save and load conversations with the assistant.

The week was also interspersed with lots of pairing sessions with Kirill on inlay hints, which he'll cover in his section.


I continued to work on our in-house analytics tool this week. I'm in the middle of writing some tests to hopefully fix some bugs relating to how we group feedback before attempting to send it off to OpenAI. I also wrote code to send page events over to ClickHouse, so we can build more comprehensive charts around how people are navigating and using the site.


This week I have mostly worked on making our theme definitions a bit less verbose together with Nate. Together with Mikayla we have made a great progress on voice collaboration, getting to a better handle of GPUI in the process. During the downtime, Kirill and I have also looked into Zed's build times, reducing them slightly. Notably, we have successfully reduced Zed's .dmg file size by over 10%. =)

Next week, my plan is to work together with Mikayla to bring voice collaboration across the finish line.


I continued work on optimizing Zed's system for watching and scanning the file system to maintain an in-memory representation of project folders. We now defer loading any directories that are gitignored or are located outside of your project directory (and referenced via symlinks in your project), until you open a buffer within them or expand them in the project panel. This work is almost done, but there are still a few details to handle. This should reduce Zed's memory usage and CPU usage from handling file system events, and speed up collaboration by reducing the number of files and directories that need to be synced.


This week, I finished wiring our voice support! And our designer Nate got to test drive it by accident :D. I also graduated from my undergrad this Sunday, and have been attendng DWeb camp this week. Next week, Piotr and I will be trying to ship voice collaboration to everyone and I should have more to say here!


I worked on improving inlay hint latency for big files and general reliability of the new code. Took me a couple of rewrites to accomodate the new hints cache to the right strategy. As a reward, hints coop mode started to work reliably and I now have tests to prove it. Things look promising to wrap up for the first public iteration of the feature: what's left is work on the hint visuals, documentation, and whatever small things we find along the way.


As it's my first week with Zed. I started off jumping in on the assistant panel with Nathan & Antonio to get a flavour for the initial functionality and UI, and working on persisted conversations. From there I've spent most of the week working on an embedding and indexing engine with Max. Im pretty impressed with the amount of progress we've made just this week alone and hopeful we may have a fully fleshed out semantic nav feature over the coming weeks.


Apart from wrapping up the work on re-installing broken language servers, Antonio and I paired on an annoying performance issue we've had for a while. We had noticed that scolling the editor and project panel was quite slow while rapidly moving the mouse. A quick profile revealed that we were spending a majoity of our time updating the mouse cursor style. As GPUI is intermediate mode, it doesn't work quite like retained UIs which typically update the cursor style only when the hovered widget changes. Instead we update the cursor whenever the mouse moves, which causes the system to do an expensive path rasterize of the cursor style on every frame that the mouse moves. Fixing this was as simple as only updating the cursor style when it doesn't match the current style.


I worked on Zed's new assistant panel, blog posts for upcoming features in the style of "Blog-post-driven development", where we write the announcement before we build the feature. I also paired with a new contractor here in Boulder to improve Vim mode.

Finally, I spent time thinking about GPUI's approach to UI styling after a long conversation with Derek Briggs, who will be starting with us next month. Currently, GPUI's elements are heavily inspired by Flutter, in which each element plays a very specific role. So we have elements like Flex, Stack, Align, Container etc. This probably works well in Dart, but in light of Rust's long compilation times, I want to explore an approach more similar to HTML and CSS, where we have a single type of element to which arbitrary styling can be applied with data at runtime. This way, we can get the basic structure in place, then adjust more of the styling as the application is running. I'm hoping this can improve our feedback loop when building out UI.

Thanks for reading!