This Week at Zed Industries: #2
It's been 4 months since the last 'This week at Zed'. That's an order of magnitude better than 4 years, so I think we're getting the hang of this.
For today, let's check in on what folks are working on around
the office Slack
We've been getting a lot of feedback from users through our in-app feedback feature. Each week, I read through all of the feedback and look for the reoccurring themes to present to the team. This has been mostly fine, but to enable us to dig deeper and remove recency bias, Nathan and I began building a new tool that will help us parse the feedback and build reports using AI. We will be able to ask questions about specific things, like "What are Vim users wanting at the moment?" or "What are the most confusing aspects of Zed?" We're excited to see how this will help us digest feedback more efficiently.
Maintaining Zed's performance and stability is super important to us. This week, I've been tackling a pesky issue with our project search feature. On large searches, it could freeze the UI for seconds. Unacceptable. To fix this, Antonio and I reworked our file system handling. This code is extremely intricate, as it has to deal with unreliable file-system events, out-of-order queries, and the remote file systems of collaborators. On an extremely large project search, we could open hundreds of thousands of buffers and we had an operation that would occur for all buffers in a project. Removing this operation affected several core assumptions of the codebase. Thankfully our randomized integration tests can catch many of the new bugs before they become shipped regressions.
For my first 2 weeks at Zed, I've been poking at various corners of the editor, hoping to do any small tasks I can find. This week I added glob-based path filtering to the project search panel. Matching might be made more ergonomic at the cost of adding false positives, but we should revisit this after we think more about the files to exclude/include from the project search by default. The rest of the week was more complex: learning about GPUI's internals, events, key presses, and more about theming was an interesting mixture, but totally worth it in the end.
In parallel with project search filtering, I've also been working on shipping a setting to render whitespace characters, a feature I mentioned during my interview a month ago. This went surprisingly smoothly, thanks to Zed's collaboration capabilities: any time I got lost in the codebase, people would join my project, show me around and fix things in my local project along the way. Truly magnificent to look back and see how productive I was due to this support, let's see how it will work in the long run.
At the end of the week, Intel Mac brought us a surprise failure — a seg fault in the modal keyboard interaction PR I wrote. Thankfully, it was a quick fix. With all issues fixed, things are back to normal, leaving me with more corners to explore: the next stop will be CLI and file open modals if things go right.
This month, I'm integrating information from your git repositories into Zed. Last week we reworked our in-memory representation of the repository state so we can sync it over the wire, using branch name detection as a motivating use case. This week that approach has been expanded to add a live view of the current git status for each file in your project. Here's a screenshot of the current implementation:
Up next week: More ways of interacting with diff hunks :D
I've been knee-deep in Zed's theme system this week (continuing from the last couple of weeks). The goal for this work is to programmatically eliminate many of the contrast issues in the app today, consider the differences between dark and light themes more completely everywhere, and create a theme configuration that all themes will use and build on going forward. This work covers much of the Theme 1.0 Specification step in the Theme roadmap in our docs. Hopefully, I can share some work in progress on themes in next week's update!
That has been taking up much of my day the past few weeks, but outside Theme work, we've been discussing the Project Panel, Diagnostics in buffers, and Find and Replace this week, internally and with the community.
I've started posting some work in progress in our community Discord server. It has been great to get very early feedback from people, and hear about many ways you all use things in different ways than our team. I'm hoping to continue to do more of this build-in-public style work for some features going forward. Feel free to join us over there if you would like to see some of this work in progress, and share your thoughts.
Have a great weekend, everyone!
I recorded a podcast: Whiskey Web & Whatnot, in which I drank some delicious whiskey and talked about a range of topics both personal and technical. I then wrote some code with said whiskey in my bloodstream and it went surprisingly well! Another win for the Rust type system.
On the code front, Antonio and I have been revamping Zed's workspace to enable the project panel to be docked on either the left or the right. The terminals will now be grouped in a single panel, though you can still drag a panel into a workspace pane, and this new terminal panel will be able to be docked on the left, right, or bottom of the workspace. I'll post a deeper explanation when we ship it.
This is all in preparation to start work on integrating ChatGPT into Zed in the form of an assistant panel. We needed a place to put it!