Skip to content

fix(web): settings search ranks a setting first when its translated title matches - #43729

Merged
juliusmarminge merged 3 commits into
pingdotgg:mainfrom
only21mil:fix/web-settings-search-translated-rank
Nov 26, 2026
Merged

juliusmarminge merged 3 commits into
pingdotgg:mainfrom
only21mil:fix/web-settings-search-translated-rank

Conversation

@only21mil

Copy link
Copy Markdown
Contributor

Problem

Settings search finds a setting by its translated title, but ranked results only against the English title. In German, typing Sprache put 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 言語, Idioma and Langue had 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:

  1. Open Settings.
  2. Type Sprache in the settings search.
Before (44a5333) After (this branch)
Before: the Sprache search lists Voice input rows first After: the Sprache search lists the Language setting first
Before, scrolled to the end: the Language setting is the last result

Tests:

  • settingsSearch.test.ts adds 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 on 44a5333 and passes on this branch.
  • An AI agent ran the focused test file 3 times on this branch (26/26 each), vp run check:changed, and the steps above in the real app.

Not shown:

  • Desktop: it runs the same web settings search.
  • Mobile: its settings search keeps rows in list order and does not rank them, so it is not affected.
  • Languages other than German in the real app. The unit test covers Japanese with a stand-in translator.

Generated with Claude Opus 5.5 in T3 Code Nightly

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Nov 26, 2026
@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Settings search now ranks matches against translated displayed titles as well as original titles. A test checks the expected order for German queries.

Changes: Translated Settings Search Ranking

Layer / File(s) Summary
Title-match ranking
apps/web/src/components/settings/settingsSearch.ts, apps/web/src/components/settings/settingsSearch.test.ts
searchSettings scores title matches against the original and displayed titles. Exact, prefix, substring, and all-token title matches receive scores of 5, 4, 3, and 2. The test checks result order for “Sprache” and “Language”.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested reviewers: juliusmarminge, maria-rcks

Merge Risk: Minimal · up to a4aa4

This change improves settings-search ranking for translated titles. No actionable merge-blocking risk was found in the supplied evidence.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: settings search ranking now favors a setting when its translated (displayed) title matches the query. It follows the conventional commit form and is specific to the ch…
Description check Passed The description follows the template sections (Problem, Change, Scope, Verification) and fills each with specific content. It gives the bug, the fix in searchSettings(), a justification for no linked …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: settings search ranking now favors a setting when its translated (displayed) title matches the query. It follows the conventional commit form and is specific to the changeset, which adds a titleMatchRank helper and ranks against the displayed title.

Full details: Description check

Explanation

The description follows the template sections (Problem, Change, Scope, Verification) and fills each with specific content. It gives the bug, the fix in searchSettings(), a justification for no linked issue, and concrete verification with before/after images, test results, and stated gaps. The template's pre-filled HTML comments are removed, and the Scope section does not link an issue, but it explains why none is needed.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 1338c92 and a4aa4dd.

Files selected for processing: 1

  • apps/web/src/components/settings/settingsSearch.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 26, 2026
@juliusmarminge

Copy link
Copy Markdown
Member

Evidence

Real web app, Chromium, 1280×800, light theme, fresh synthetic state on each commit. Open Settings → General, select Deutsch in Language, then search for Sprache.

Before After
a066eb0935 a4aa4dd81e
Before: voice section match ranks first After: Sprache ranks first
First: Transkribieren mit — Spracheingabe First: Sprache — Allgemein; second: Transkriptionssprache
Before recording After recording

Scenario source. The comparison runner exited 0: failed on base, passed on head.

@juliusmarminge juliusmarminge added takeover:ready Takeover done; auto-lands when gates pass and removed takeover:in-progress A takeover lead is working on this PR labels Nov 26, 2026
@juliusmarminge
juliusmarminge merged commit 5389ed6 into pingdotgg:main Nov 26, 2026
56 checks passed
@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants