Skip to content

Return Mail search results when the scope count times out - #314

Merged
mattt merged 2 commits into
mainfrom
mattt/mail-search-timeout
Oct 27, 2026
Merged

mattt merged 2 commits into
mainfrom
mattt/mail-search-timeout

Conversation

@mattt

@mattt mattt commented Oct 27, 2026

Copy link
Copy Markdown
Owner

A Mail search also counts the indexed messages in the selected mailbox, or in all mailboxes when none is selected, without the search filters. On a large Mail store, that count could take longer than the default 100 ms limit, so the search failed with "stopped at the time limit" even after the matching messages were found.

This PR updates Envelope to 0.5.0, which returns the page without the count when that happens. localIndex.indexedMessageCount is null in that case, and localIndex.description says that the count is unavailable. A search whose matching messages can't be fetched in time still fails.

Related to #312

mattt added 2 commits October 27, 2026 05:10
Envelope 0.5.0 returns a search page with a nil scope count
when the count passes the time limit, instead of throwing (#312).
Mail searches on a large store failed because the scope count
passed the time limit after the page was found (#312).
With Envelope 0.5.0, the search returns the page with a nil count.
Report the count as null, and say that it could not be counted.
@mattt
mattt merged commit 1f3798d into main Oct 27, 2026
2 checks passed
@mattt
mattt deleted the mattt/mail-search-timeout branch October 27, 2026 12:32
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