Skip to content

Commit 48798c6

Browse files
committed
fix(web): Settings search finds rows by their titles
1 parent 32ecd71 commit 48798c6

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
@@ -182,6 +182,21 @@ describe("searchSettings", () => {
182182
expect(searchSettings("sidebar.toggle")[0]?.targetId).toBeUndefined();
183183
});
184184

185+
it("finds rows by the titles shown on their pages", () => {
186+
for (const [title, id] of [
187+
["Automatic worktree cleanup", "storage-worktrees"],
188+
["Delete settled worktrees", "storage-worktrees"],
189+
["Delete old browser artifacts", "storage-artifacts"],
190+
["Delete old rotated logs", "storage-artifacts"],
191+
["Custom search URL", "browser-search-engine"],
192+
["Native sessions", "providers"],
193+
["CODEX_HOME path", "providers"],
194+
["Shadow home path", "providers"],
195+
] as const) {
196+
expect(searchSettings(title)[0]?.id, title).toBe(id);
197+
}
198+
});
199+
185200
it("keeps catalog result ids unique", () => {
186201
const ids = SETTINGS_SEARCH_ITEMS.map((item) => item.id);
187202
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",
@@ -796,7 +798,7 @@ export const SETTINGS_SEARCH_ITEMS = [
796798
title: "Providers",
797799
to: "/settings/providers",
798800
searchTerms: [
799-
"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",
801+
"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",
800802
],
801803
},
802804
{
@@ -916,7 +918,7 @@ export const SETTINGS_SEARCH_ITEMS = [
916918
id: "browser-search-engine",
917919
title: "Search engine",
918920
to: "/settings/browser",
919-
searchTerms: ["address bar duckduckgo google bing brave kagi ecosia custom"],
921+
searchTerms: ["address bar duckduckgo google bing brave kagi ecosia custom url"],
920922
},
921923
{
922924
id: "pull-request-links-open-in-app",
@@ -1078,7 +1080,7 @@ export const SETTINGS_SEARCH_ITEMS = [
10781080
title: "WSL backend",
10791081
to: "/settings/access",
10801082
searchTerms: [
1081-
"windows subsystem linux distro second server projects stop windows backend restart",
1083+
"windows subsystem linux distro second server projects stop windows backend restart wsl only",
10821084
],
10831085
desktopOnly: true,
10841086
windowsOnly: true,

0 commit comments

Comments
 (0)