feat: rank search results by match quality and launch frequency
Some checks failed
release / build (push) Failing after 34s

Track per-app launch counts in ~/.cache/breadbox/history.json. When a
query is active, sort visible results by fuzzy match quality (exact >
prefix > contains > subsequence) then by launch count descending, so
the most relevant and most-used app rises to the top. The base list
(no query) also surfaces most-launched apps above unvisited ones.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Breadway 2026-06-07 14:35:06 +08:00
parent 3ebadee4f4
commit d2549e56dd
6 changed files with 106 additions and 17 deletions

7
Cargo.lock generated
View file

@ -39,7 +39,7 @@ dependencies = [
[[package]]
name = "breadbox"
version = "0.1.0"
version = "0.2.0"
dependencies = [
"bread-theme",
"breadbox-shared",
@ -50,15 +50,16 @@ dependencies = [
[[package]]
name = "breadbox-shared"
version = "0.1.0"
version = "0.2.0"
dependencies = [
"serde",
"serde_json",
"toml 0.8.23",
]
[[package]]
name = "breadbox-sync"
version = "0.1.0"
version = "0.2.0"
dependencies = [
"breadbox-shared",
"serde_json",