Repository navigation
fix(web): settings search ranks a setting first when its translated title matches - #43729
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…ch-translated-rank
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EvidenceReal web app, Chromium, 1280×800, light theme, fresh synthetic state on each commit. Open Settings → General, select Deutsch in Language, then search for Sprache.
Scenario source. The comparison runner exited 0: failed on base, passed on head. |


Problem
Settings search finds a setting by its translated title, but ranked results only against the English title. In German, typing
Spracheput the Language setting last of 17 results, below every Voice input row that mentions "Sprache".Anbieter(Providers) came 9th of 14. Japanese, Spanish and French titles such as言語,IdiomaandLanguehad the same problem.Expected: typing a setting's exact title in the app's language lists that setting first, as it already does in English.
Change
searchSettings()now ranks each setting against both its English title and its displayed title and keeps the better match. An exact translated title ranks first. English queries rank the same as before, in English and in other languages.Scope
A small fix of an obvious bug: the match step already used the translated title and the rank step did not. No issue needed.
Verification
Setup: web app from this branch (
vp run dev, fresh state), Language set to Deutsch in Settings → General.Steps:
Sprachein the settings search.44a5333)Tests:
settingsSearch.test.tsadds a case where an exact German or Japanese title ranks first, and an English query ranks the same in an English and a German UI. It fails on44a5333and passes on this branch.vp run check:changed, and the steps above in the real app.Not shown:
Generated with Claude Opus 5.5 in T3 Code Nightly