Skip to content

Commit ebeb6bf

Browse files
fix(web): find scheduled tasks in Settings search
Searching Settings for "scheduled", "scheduled task", or "scheduled tasks" returned no results even though Scheduled tasks was available in the sidebar. The page had no entry in the settings search catalog. Register the page in the existing catalog and give its heading the matching search target so choosing the result opens the page and focuses its heading. This restores discoverability on web and the desktop web surface without changing scheduled-task execution. The three query regressions fail before the fix. All 26 affected tests and vp run check:changed pass afterward, including format, lint, knip, and scoped typechecks. Isolated Chromium checks at 1280x800 and 390x844 confirm the search result appears and opens the page through pointer and keyboard selection.
1 parent 5d91ab1 commit ebeb6bf

3 files changed

Lines changed: 18 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
@@ -113,6 +113,7 @@ import { Switch } from "../ui/switch";
113113
import { Textarea } from "../ui/textarea";
114114
import { stackedThreadToast, toastManager } from "../ui/toast";
115115
import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
116+
import { searchableSetting } from "./settingsSearch";
116117
import {
117118
SettingsPageContainer,
118119
SettingsRow,
@@ -407,7 +408,7 @@ export function ScheduledTasksSettings(target: {
407408
return (
408409
<SettingsPageContainer>
409410
<SettingsSection
410-
title="Scheduled tasks"
411+
{...searchableSetting("scheduled-tasks")}
411412
variant="plain"
412413
headerAction={
413414
<Button

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,17 @@ describe("searchSettings", () => {
6060
expect(searchSettings("long lines", ITEMS).map((item) => item.id)).toEqual(["word-wrap"]);
6161
});
6262

63+
it.each(["scheduled", "scheduled task", "scheduled tasks"])(
64+
"finds the Scheduled tasks page for %s",
65+
(query) => {
66+
expect(searchSettings(query)[0]).toMatchObject({
67+
id: "scheduled-tasks",
68+
title: "Scheduled tasks",
69+
to: "/settings/scheduled-tasks",
70+
});
71+
},
72+
);
73+
6374
it("matches normalized title substrings", () => {
6475
expect(searchSettings(" WORD WRAP ", ITEMS).map((item) => item.id)).toEqual(["word-wrap"]);
6576
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
@@ -781,6 +781,11 @@ export const SETTINGS_SEARCH_ITEMS = [
781781
searchTerms: ["refresh availability versions auth state models background probes seconds off"],
782782
providerSettingsOnly: true,
783783
},
784+
{
785+
id: "scheduled-tasks",
786+
title: "Scheduled tasks",
787+
to: "/settings/scheduled-tasks",
788+
},
784789
{
785790
id: "agent-browser-access",
786791
title: "Agent browser access",

0 commit comments

Comments
 (0)