Skip to content

Show search results as they're found, with a spinner while it looks - #165

Merged
dhh merged 2 commits into
mainfrom
progressive-search
Nov 18, 2026
Merged

dhh merged 2 commits into
mainfrom
progressive-search

Conversation

@dhh

@dhh dhh commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

A search went through every folder below before showing anything, so in a big tree the window kept showing the folder searched, with no sign of work, for a long while.

It now shows a new search's matches as it finds them, a batch at most every tenth of a second, each put straight into its place in the folder's order, so the list grows without jumping and the cursor goes to the first match as soon as there is one. A new search starts from an empty list rather than the folder searched; the same search run again (the folder changed under it) leaves its matches up and swaps them only if they've changed. While it looks, a spinner turns in the search field and an empty list says Searching… rather than Nothing matches.

Searching /usr for gnome- showed 149 of its 258 matches at 250ms, where it showed none until 769ms. A new test checks the matches come in batches while the walk goes on, that they add up to the whole, and how the model shows a new search and the same one again.

🤖 Generated with Claude Code

A search went through every folder below before showing anything, so in
a big tree the window kept showing the folder searched, with no sign of
work, for a long while.

It now shows a new search's matches as it finds them, a batch at most
every tenth of a second, each put straight into its place in the
folder's order, so the list grows without jumping and the cursor goes to
the first match as soon as there is one. A new search starts from an
empty list rather than the folder searched; the same search run again
(the folder changed under it) leaves its matches up and swaps them only
if they've changed. While it looks, a spinner turns in the search field
and an empty list says Searching… rather than Nothing matches.

Searching /usr for gnome- showed 149 of its 258 matches at 250ms,
where it showed none until 769ms. A new test checks the matches come
in batches while the walk goes on, that they add up to the whole, and
how the model shows a new search and the same one again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The changes appear safe to merge.

Summary

Search results now appear in batches while a spinner shows that the search is still running.

  • Folder searches add matches as the walk finds them.
  • The search field and empty views show when a folder search is running.

Both previous findings are addressed. No new actionable issues were found in the changes since the previous review.

Reviews (2) · Last reviewed commit: "Tell a search's matches through quiet st..." · Reviewed by Greptile

Comment thread src/foldermodel.cpp Resolved
Comment thread src/foldermodel.cpp Resolved
…es from the selection

Matches were told only as another was found, so one found early, before
a long walk through folders with no more matches, stayed hidden until
the search ended. The time is now checked at every entry walked.

The same search run again (the folder changed under it) swapped in its
new matches but kept selecting those no longer found, so the selection's
count was off. It now keeps only what's still listed, as a re-read of a
folder does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dhh
dhh merged commit cb28edf into main Nov 18, 2026
2 checks passed
@dhh
dhh deleted the progressive-search branch November 18, 2026 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant