Skip to content

Commit 220bc7c

Browse files
authored
fix(web): Settings search finds rows by their titles (#27540)
1 parent cb7fb7a commit 220bc7c

2 files changed

Lines changed: 22 additions & 5 deletions

File tree

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,21 @@ describe("searchSettings", () => {
189189
expect(searchSettings("sidebar.toggle")[0]?.targetId).toBeUndefined();
190190
});
191191

192+
it("finds rows by the titles shown on their pages", () => {
193+
for (const [title, id] of [
194+
["Automatic worktree cleanup", "storage-worktrees"],
195+
["Delete settled worktrees", "storage-worktrees"],
196+
["Delete old browser artifacts", "storage-artifacts"],
197+
["Delete old rotated logs", "storage-artifacts"],
198+
["Custom search URL", "browser-search-engine"],
199+
["Native sessions", "providers"],
200+
["CODEX_HOME path", "providers"],
201+
["Shadow home path", "providers"],
202+
] as const) {
203+
expect(searchSettings(title)[0]?.id, title).toBe(id);
204+
}
205+
});
206+
192207
it("keeps catalog result ids unique", () => {
193208
const ids = SETTINGS_SEARCH_ITEMS.map((item) => item.id);
194209
expect(new Set(ids).size).toBe(ids.length);

‎apps/web/src/components/settings/settingsSearch.ts‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ export const SETTINGS_SEARCH_ITEMS = [
239239
to: "/settings/worktrees",
240240
scope: "project-defaults",
241241
searchTerms: [
242-
"disk storage delete deleted archived threads old inactive merged unchanged worktrees retention days project inherit off custom",
242+
"disk storage automatic delete deleted archived threads old inactive merged settled unchanged worktrees retention days project inherit off custom",
243243
],
244244
},
245245
{
@@ -254,7 +254,9 @@ export const SETTINGS_SEARCH_ITEMS = [
254254
title: "Artifacts and logs",
255255
to: "/settings/maintenance",
256256
scope: "environment-defaults",
257-
searchTerms: ["disk storage browser screenshots captures rotated logs cleanup retention"],
257+
searchTerms: [
258+
"disk storage delete old browser artifacts screenshots captures rotated logs cleanup retention",
259+
],
258260
},
259261
{
260262
id: "project-defaults",
@@ -804,7 +806,7 @@ export const SETTINGS_SEARCH_ITEMS = [
804806
title: "Providers",
805807
to: "/settings/providers",
806808
searchTerms: [
807-
"agents cli codex claude cursor grok fx opencode antigravity google sign in sign out install subscription instances authentication api key models configuration binary path config directory endpoint arguments environment variables display name accent color custom favorite hidden auto compact",
809+
"agents cli codex claude cursor grok fx opencode antigravity google sign in sign out install subscription instances authentication api key models configuration binary path config directory codex_home shadow home endpoint arguments environment variables display name accent color custom favorite hidden auto compact native sessions import resume",
808810
],
809811
},
810812
{
@@ -924,7 +926,7 @@ export const SETTINGS_SEARCH_ITEMS = [
924926
id: "browser-search-engine",
925927
title: "Search engine",
926928
to: "/settings/browser",
927-
searchTerms: ["address bar duckduckgo google bing brave kagi ecosia custom"],
929+
searchTerms: ["address bar duckduckgo google bing brave kagi ecosia custom url"],
928930
},
929931
{
930932
id: "pull-request-links-open-in-app",
@@ -1086,7 +1088,7 @@ export const SETTINGS_SEARCH_ITEMS = [
10861088
title: "WSL backend",
10871089
to: "/settings/access",
10881090
searchTerms: [
1089-
"windows subsystem linux distro second server projects stop windows backend restart",
1091+
"windows subsystem linux distro second server projects stop windows backend restart wsl only",
10901092
],
10911093
desktopOnly: true,
10921094
windowsOnly: true,

0 commit comments

Comments
 (0)