Conversation
|
THANK YOU! Can't wait to use it. While watching your video, I noticed the typed word wasn't highlighted in the preview window. I suggest to highlight the word too and not only the line! Also, about |
|
@gustavotrott I have a UX problem with that: |
|
Nice. This is the sort of experience I'd like to see for ALL modals as it's very similar to Helix. I wanted to do something like this for #43961 , but already a stretch to get a new modal. If you get any traction on this, I'd love to build this sort of thing into my PR. |
|
Testing this out now. @davidbonan First impression - this is a good feature, it seems to be a very popular request. Your implementation fits into the codebase pretty cleanly and seems high quality. Thank you for doing this! My only concerns are about UX inconsistency and elegance. Are there any opportunities to make this fit in better with the rest of Zed. I'm going to spend some time this morning exploring this. @baldwindavid I took a look at your PR too. It seems like, once we land this, you should restructure your PR to make use of some of the same code for previewing buffers, and make the modals look consistent. |
|
@maxbrunsfeld Thanks for the feedback. Could you provide one or two concrete examples of what you’re looking for in terms of UX consistency or elegance ? |
|
Just streaming out feedback as I test:
|
|
I pushed up one small change to prevent the result count header from briefly disappearing (causing vertical shifts) when searching. Can you address the latency issue, streaming in the results? Do you have thoughts on how that should work, or if there are any issues with adding that? |
|
@yara-blue this overlaps pretty heavily with the telescope design stuff we were talking to @danilo-leal and @mattermill about. |
|
Just off the top of my head some recent PRs, discussions, and issues are related:
I think that all of these are driving towards a request of an experience similar to the one in this quick search PR. This is basically how everything is presented in Helix. Not that we need to copy Helix, but I do think it would be beneficial to take a holistic approach to this. This PR seems like a great one to polish up to set the tone for future pickers. |
|
@maxbrunsfeld
|
|
Are you streaming the results in now? |
Yes in line 1558 you can see the stream process |
|
Thanks for explaining; I’ll manually test and review again |
|
@davidbonan The new UI looks great, streaming is looking good. I hit a problem when using it in the Could you test that scenario when you get a chance? Searching in a large repo like WebKit, Chromium or Linux |
|
hey @davidbonan nice work!, it might be worth us working together on this tbh, i've been working on basically the same things but with a focus on modular sources #44942. if not i understand but just a thought? |
1749ee2 to
a7dfbac
Compare
Updates the quick search modal to use dynamic sizing based on viewport dimensions and minimum constraints. This ensures the modal adapts better to different screen sizes and avoids being too small on larger screens. It also replaces fixed pixel values with a ratio for the left panel width.
Adapts the quick search modal layout to use a vertical layout when the viewport width is below a certain threshold, improving usability on smaller screens. This change also refactors the rendering logic for better readability and maintainability.
Enhances quick search navigation by automatically expanding collapsed file headers when navigating through the list.
This change addresses an issue where double-clicking an item in quick search wasn't correctly triggering the navigation. It ensures that the selected index is properly updated and the confirmation action is executed, leading to the intended navigation.
a2a6184 to
23e6715
Compare
Updates the quick search functionality to directly consume the search results receiver (`rx`) instead of relying on the `project` object, streamlining the data flow and improving efficiency.
Allows other UI tasks to run between search result batches to improve responsiveness.
Adds a spinner and text label to indicate when Quick Search is actively searching for results. This provides visual feedback to the user that the search is in progress.
@osiewicz Wow, the cancellation mechanism greatly improves the speed of searching in “search on input” mode. |
This comment was marked as spam.
This comment was marked as spam.
|
Manually testing this one more time, now that #45406 has landed. |
|
@davidbonan The UI is looking really good; I'm liking the larger size. It looks like we are starting and stopping language servers as we page through the different preview buffers. I think that there is some way of opening a buffer without starting language servers. We do that for instance when a buffer only appears as an excerpt in a multi-buffer. I think we should do that here. One other question - what do you think should happen when you click with the mouse on a certain spot in the preview buffer? Right now it puts your cursor there, and transfers focus to the preview buffer, and you can actually edit. If you edit, it opens that buffer in a tab below the modal, but the modal stays open. I think that's a bit odd. Maybe we should make the buffer read-only in this view. I also wonder if we should even keep the modal open if you click to the preview buffer. Maybe at that moment, we should just immediately open the buffer in a tab, and put the cursor at the location where you clicked. Thoughts? |
Yeah, classic multi-buffers are lazy with regards to spawning language servers. The main API for it is |
I think that would actually be a shame. Being able to edit the file directly inside the modal is extremely useful. I rely on this all the time in JetBrains editors. For example, when I need to make the same change across several different files, I just use quick search and apply the edits right there, jumping between files and adjusting each one without breaking the flow. Automatically closing the modal on click would also feel quite awkward and not very practical. Sometimes I just want to select some text in the preview to copy a snippet of code. With that behavior, it would immediately open the file in a tab, which is not what I want in that moment. I would much rather depend on a double click or pressing Enter to explicitly open the file. I am not sure what the best solution is to allow editing inside the Quick Search modal, but the current behavior in Zed where multiple files open stacked and are directly editable works really well for me. Having that same capability inside the Quick Search modal would be even better. If it is possible to reuse an approach similar to what already exists for editing inside Project Search, that would be great. Otherwise, not allowing edits there would feel like a clear downgrade. |
|
We can allow editing, but then we shouldn’t also open the file in the workspace below the modal. And I guess we would need to auto-save the buffer when you change the search query after editing in there, because otherwise the buffer might be dropped without saving your changes. |
|
Thanks for the feedback on the feature |
|
Just my two cents: If the quick search modal lets you edit, how is that really different from global search with multi-buffer? Feels like the same thing, just shown differently. I always thought quick search was meant for quickly finding and inspecting something, not editing. |
|
I really like this, but instead of a popup window, it would be nice if the found files show on the left (where project_panel, git_panel etc go) and the content for each shown in the main screen. |
Read the issue #8279 and you will understand the difference. |
|
Is there a keyboard shortcut to open all the results in multibuffer? |
|
I have a small suggestion after using this feature: I think this could make repeated navigation a bit smoother. |
|
This is looking really good so far! I made some changes to respect OpenExcerpts shortcuts in the quick search preview. I pushed them to davidbonan-quick-search-open-excerpts if you could review, or allow edits from maintainers. |
@mattermill Normally it’s already activated @maxbrunsfeld Before applying the changes or revert changes requested in the comments, I would like to have confirmation from the Zed team on what is wanted |



Summary
Implements a quick search modal for project-wide searching.
Features
This modal allows users to quickly search for files and content within the project. It includes a picker for displaying search results and a preview editor for showing the selected result.
Enregistrement.de.l.ecran.2025-12-10.a.12.04.48.mov
Performances tested on large codebase (monorepo and zed project).
Related issue #8279
Release Notes: