Skip to content

Commit 254e985

Browse files
fix(web): find scheduled tasks in Settings search (#35715)
Co-authored-by: Brandon Julio Thenaro <[email protected]>
1 parent 587deab commit 254e985

3 files changed

Lines changed: 14 additions & 1 deletion

File tree

‎apps/web/src/components/settings/ScheduledTasksSettings.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ import { Switch } from "../ui/switch";
145145
import { Textarea } from "../ui/textarea";
146146
import { stackedThreadToast, toastManager } from "../ui/toast";
147147
import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
148+
import { searchableSetting } from "./settingsSearch";
148149
import {
149150
SettingsPageContainer,
150151
SettingsRow,
@@ -435,7 +436,7 @@ export function ScheduledTasksSettings(target: {
435436
return (
436437
<SettingsPageContainer>
437438
<SettingsSection
438-
title="Scheduled tasks"
439+
{...searchableSetting("scheduled-tasks")}
439440
variant="plain"
440441
headerAction={
441442
<Button

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,13 @@ describe("searchSettings", () => {
8080
expect(searchSettings("1password").map((item) => item.to)).not.toContain("/settings/secrets");
8181
});
8282

83+
it("finds the Scheduled tasks page", () => {
84+
expect(searchSettings("scheduled tasks")[0]).toMatchObject({
85+
id: "scheduled-tasks",
86+
to: "/settings/scheduled-tasks",
87+
});
88+
});
89+
8390
it("matches normalized title substrings", () => {
8491
expect(searchSettings(" WORD WRAP ", ITEMS).map((item) => item.id)).toEqual(["word-wrap"]);
8592
expect(searchSettings("glass").map((item) => item.id)).toEqual(["setting-glass-opacity"]);

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,6 +1005,11 @@ export const SETTINGS_SEARCH_ITEMS = [
10051005
searchTerms: ["refresh availability versions auth state models background probes seconds off"],
10061006
providerSettingsOnly: true,
10071007
},
1008+
{
1009+
id: "scheduled-tasks",
1010+
title: "Scheduled tasks",
1011+
to: "/settings/scheduled-tasks",
1012+
},
10081013
{
10091014
id: "agent-browser-access",
10101015
title: "Agent browser access",

0 commit comments

Comments
 (0)