Skip to content
TypeScript

fix(web): Settings search finds rows by their titles (#27540)

Craig Davison220bc7cc5031
diff --git a/apps/web/src/components/settings/settingsSearch.test.ts b/apps/web/src/components/settings/settingsSearch.test.ts
index ee22671ee1f..e5c126e0307 100644
--- a/apps/web/src/components/settings/settingsSearch.test.ts
+++ b/apps/web/src/components/settings/settingsSearch.test.ts
@@ -189,6 +189,21 @@ describe("searchSettings", () => {
expect(searchSettings("sidebar.toggle")[0]?.targetId).toBeUndefined();
});
+ it("finds rows by the titles shown on their pages", () => {
+ for (const [title, id] of [
+ ["Automatic worktree cleanup", "storage-worktrees"],
+ ["Delete settled worktrees", "storage-worktrees"],
+ ["Delete old browser artifacts", "storage-artifacts"],
+ ["Delete old rotated logs", "storage-artifacts"],
+ ["Custom search URL", "browser-search-engine"],
+ ["Native sessions", "providers"],
+ ["CODEX_HOME path", "providers"],
+ ["Shadow home path", "providers"],
+ ] as const) {
+ expect(searchSettings(title)[0]?.id, title).toBe(id);
+ }
+ });
+
it("keeps catalog result ids unique", () => {
const ids = SETTINGS_SEARCH_ITEMS.map((item) => item.id);
expect(new Set(ids).size).toBe(ids.length);
diff --git a/apps/web/src/components/settings/settingsSearch.ts b/apps/web/src/components/settings/settingsSearch.ts
index dda759f860e..d28e467b0cf 100644
--- a/apps/web/src/components/settings/settingsSearch.ts
+++ b/apps/web/src/components/settings/settingsSearch.ts
@@ -239,7 +239,7 @@ export const SETTINGS_SEARCH_ITEMS = [
to: "/settings/worktrees",
scope: "project-defaults",
searchTerms: [
- "disk storage delete deleted archived threads old inactive merged unchanged worktrees retention days project inherit off custom",
+ "disk storage automatic delete deleted archived threads old inactive merged settled unchanged worktrees retention days project inherit off custom",
],
},
{
@@ -254,7 +254,9 @@ export const SETTINGS_SEARCH_ITEMS = [
title: "Artifacts and logs",
to: "/settings/maintenance",
scope: "environment-defaults",
- searchTerms: ["disk storage browser screenshots captures rotated logs cleanup retention"],
+ searchTerms: [
+ "disk storage delete old browser artifacts screenshots captures rotated logs cleanup retention",
+ ],
},
{
id: "project-defaults",
@@ -804,7 +806,7 @@ export const SETTINGS_SEARCH_ITEMS = [
title: "Providers",
to: "/settings/providers",
searchTerms: [
- "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",
+ "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",
],
},
{
@@ -924,7 +926,7 @@ export const SETTINGS_SEARCH_ITEMS = [
id: "browser-search-engine",
title: "Search engine",
to: "/settings/browser",
- searchTerms: ["address bar duckduckgo google bing brave kagi ecosia custom"],
+ searchTerms: ["address bar duckduckgo google bing brave kagi ecosia custom url"],
},
{
id: "pull-request-links-open-in-app",
@@ -1086,7 +1088,7 @@ export const SETTINGS_SEARCH_ITEMS = [
title: "WSL backend",
to: "/settings/access",
searchTerms: [
- "windows subsystem linux distro second server projects stop windows backend restart",
+ "windows subsystem linux distro second server projects stop windows backend restart wsl only",
],
desktopOnly: true,
windowsOnly: true,