Home

dev / tinycast

publicthedavidweng/tinycast· sync paused
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

Add adaptive launcher ranking (#54)

2 months ago

62f6085
Authored
Matias Sandoval7/28/2026, 5:39:59 PM
* Add adaptive launcher ranking

* Resolve review findings from #54

Key learned ranking on the locale-independent canonical form. `normalize`
produces a persisted lookup key, so it must not read ambient state: a
locale-sensitive fold maps "I" to "ı" under Turkish and would orphan every
record keyed on the dotted form. Cover the fold in the harness, including a
locale check that asserts against the Turkish fold so it can't go vacuous.

Regenerate the project with XcodeGen rather than keeping the hand-written
object IDs — `project.yml` already globs `Tinycast/`, so the generator picks
the new file up on its own and the tree stays idempotent under regeneration.

* Resolve ranking review findings: per-query boosts, gated reset

Resolve the learned table once per ranking pass. `boosts(query:)` replaces
`boost(itemKey:query:)`, so `rank` folds the query and reads the clock once
instead of per candidate — one instant now scores a whole pass, where before
each candidate re-read the clock.

Only offer "Reset Ranking" on a result that has learned ranking. The item was
appended unconditionally, so it showed on every result and did nothing on most
of them; gating it also gives `hasRanking(for:)` its first caller outside the
harness.

Pin the frecency curve with golden values through the new API, and note the
standalone-compile constraint on `LauncherRankingStore` in AGENTS.md so a
future AppKit import can't quietly break `Tools/ranking-test.swift`. The
documented harness command now passes `-swift-version 6`, matching the
clipboard one, so it actually exercises strict concurrency.

---------

Co-authored-by: Tinycast Contributor <tinycast-contributor@localhost>
Co-authored-by: abue-ammar <iabueammar@gmail.com>

Parent023fdc0

15 files changed
  • AGENTS.md+3−1
  • Tinycast.xcodeproj/project.pbxproj+4−0
  • Tinycast/Core/AppCore.swift+13−2
  • Tinycast/Core/AppIndex.swift+27−6
  • Tinycast/Core/FavoritesStore.swift+1−1
  • Tinycast/Core/LauncherRankingStore.swift+151−0
  • Tinycast/Core/VisibilityStore.swift+1−1
  • Tinycast/Features/Launcher/LauncherView.swift+13
−6
  • Tinycast/Features/RootPaletteView.swift+11−2
  • Tinycast/Features/Settings/GeneralSettingsView.swift+30−0
  • Tools/fuzz-test.swift+32−5
  • Tools/ranking-test.swift+110−0
  • docs/architecture.md+3−2
  • docs/development.md+2−0
  • docs/launcher.md+17−1