# agent_ui: Match project name in archive-view search \(\#58214\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/df9c9f055e55c891e627ffe17cce51ac9e20c648)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: df9c9f055e55c891e627ffe17cce51ac9e20c648

Requested commit: df9c9f055e55c891e627ffe17cce51ac9e20c648

Commit: df9c9f055e55c891e627ffe17cce51ac9e20c648

Tree: 233fd6e5153eb74d8d82bc76d2f38ed55db788f0

Author: KevinLaveto

Committer: GitHub

## Message

```
agent_ui: Match project name in archive-view search (#58214)

Summary:

When you have a lot of projects open, finding a thread from a specific
project in the archive ("Search all threads") view is slower than it
should be — the filter only matches the thread title, so you have to
remember or scan titles to find what belongs to which project. Folder
names are a quicker mental handle than thread titles, especially across
many projects.

This PR makes the archive filter also try matching the basename of each
of the thread's worktree paths. Title matches still take precedence and
get the highlight positions; project-name matches just include the row.
Same `fuzzy_match_positions` contiguous substring matcher already used
for titles, so the matching feel is consistent.

Example: typing `my-laravel-project` now surfaces every thread that
lives
under a project named `my-laravel-project`, regardless of title.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments — N/A
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior — small extension to an
existing filter branch; manually verified.
- [x] Performance impact has been considered and is acceptable — per-row
path-basename check only runs when the title didn't match.

Release Notes:

- Improved the archive "Search all threads" view so you can filter by
project name, not just by thread title — handy when many projects are
open.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
```

## Parents

- [e044074eb2f9125f240424bd15e95da29d49d0b0](https://git.cafe/gitcafe/zed/commit/e044074eb2f9125f240424bd15e95da29d49d0b0?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/df9c9f055e55c891e627ffe17cce51ac9e20c648?format=markdown)
