authorgravatar for s@serg.techSergiy Dybskiy <s@serg.tech> 2026-10-10 07:27:33-04:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-10-10 06:27:33-05:00
log472ea7ec5f67fae660dc606b82698d15a2bc850f
treed53d80b4e0932812beedce09fb154ee09dbef509
parente1ad595e0f10cc16d66fe54b4ee195435dd3cc0d
signature Signed by PGP key B5690EEEBB952194

fix(web): find update settings from the command palette (#17396)

Co-authored-by: Claude <claude@anthropic.com>

3 files changed, 32 insertions(+), 2 deletions(-)

apps/web/src/components/settings/SettingsPanels.tsx+4-2
...@@ -428,6 +428,7 @@ function AboutVersionSection() {...@@ -428,6 +428,7 @@ function AboutVersionSection() {
428 return (428 return (
429 <>429 <>
430 <SettingsRow430 <SettingsRow
431 id={searchableSetting("app-version").id}
431 title={<AboutVersionTitle />}432 title={<AboutVersionTitle />}
432 description={description}433 description={description}
433 control={434 control={
...@@ -450,7 +451,7 @@ function AboutVersionSection() {...@@ -450,7 +451,7 @@ function AboutVersionSection() {
450 />451 />
451 {hasDesktopBridge ? (452 {hasDesktopBridge ? (
452 <SettingsRow453 <SettingsRow
453 title="Update track"454 {...searchableSetting("update-track")}
454 description="Use stable releases or nightly builds. Switch back anytime."455 description="Use stable releases or nightly builds. Switch back anytime."
455 control={456 control={
456 <Select457 <Select
...@@ -482,7 +483,7 @@ function AboutVersionSection() {...@@ -482,7 +483,7 @@ function AboutVersionSection() {
482 />483 />
483 ) : selectedHostedAppChannel ? (484 ) : selectedHostedAppChannel ? (
484 <SettingsRow485 <SettingsRow
485 title="Update track"486 {...searchableSetting("update-track")}
486 description="Switches the hosted app release channel."487 description="Switches the hosted app release channel."
487 control={488 control={
488 <Select489 <Select
...@@ -3345,6 +3346,7 @@ export function GeneralSettingsPanel() {...@@ -3345,6 +3346,7 @@ export function GeneralSettingsPanel() {
3345 ) : (3346 ) : (
3346 <>3347 <>
3347 <SettingsRow3348 <SettingsRow
3349 id={searchableSetting("app-version").id}
3348 title={<AboutVersionTitle />}3350 title={<AboutVersionTitle />}
3349 description="Current version of the application."3351 description="Current version of the application."
3350 />3352 />
apps/web/src/components/settings/settingsSearch.test.ts+10
...@@ -128,6 +128,16 @@ describe("searchSettings", () => {...@@ -128,6 +128,16 @@ describe("searchSettings", () => {
128 expect(SETTINGS_SEARCH_ITEMS.some((item) => item.id === "quit-confirmation")).toBe(true);128 expect(SETTINGS_SEARCH_ITEMS.some((item) => item.id === "quit-confirmation")).toBe(true);
129 expect(searchSettings("hold to quit")).toEqual([]);129 expect(searchSettings("hold to quit")).toEqual([]);
130 expect(searchSettings("wsl")).toEqual([]);130 expect(searchSettings("wsl")).toEqual([]);
131 expect(searchSettings("update track")).toEqual([]);
132 });
133
134 it("finds the About update rows", () => {
135 expect(searchSettings("check for updates").map((item) => item.id)).toContain("app-version");
136 expect(SETTINGS_SEARCH_ITEMS.find((item) => item.id === "update-track")).toMatchObject({
137 title: "Update track",
138 to: "/settings/general",
139 releaseChannelOnly: true,
140 });
131 });141 });
132142
133 it("hides macOS-only settings on other platforms", () => {143 it("hides macOS-only settings on other platforms", () => {
apps/web/src/components/settings/settingsSearch.ts+18
...@@ -1,3 +1,4 @@...@@ -1,3 +1,4 @@
1import { HOSTED_APP_CHANNEL } from "~/branding";
1import { isElectron } from "~/env";2import { isElectron } from "~/env";
2import { isMacPlatform, isWindowsPlatform, normalizeSearchText } from "~/lib/utils";3import { isMacPlatform, isWindowsPlatform, normalizeSearchText } from "~/lib/utils";
3import { STATIC_KEYBINDING_COMMANDS, type KeybindingCommand } from "@t3tools/contracts";4import { STATIC_KEYBINDING_COMMANDS, type KeybindingCommand } from "@t3tools/contracts";
...@@ -53,6 +54,9 @@ export interface SettingsSearchItem {...@@ -53,6 +54,9 @@ export interface SettingsSearchItem {
53 // Its row only renders on Windows desktop, so other desktop platforms must54 // Its row only renders on Windows desktop, so other desktop platforms must
54 // not expose a result that points to a missing anchor.55 // not expose a result that points to a missing anchor.
55 readonly windowsOnly?: boolean;56 readonly windowsOnly?: boolean;
57 // Its row renders only where the release channel can change: the desktop
58 // app, or a hosted web build deployed with a channel.
59 readonly releaseChannelOnly?: boolean;
56 readonly cloudOnly?: boolean;60 readonly cloudOnly?: boolean;
57 readonly environmentOnly?: boolean;61 readonly environmentOnly?: boolean;
58 readonly providerSettingsOnly?: boolean;62 readonly providerSettingsOnly?: boolean;
...@@ -520,6 +524,19 @@ export const SETTINGS_SEARCH_ITEMS = [...@@ -520,6 +524,19 @@ export const SETTINGS_SEARCH_ITEMS = [
520 scope: "project-defaults",524 scope: "project-defaults",
521 searchTerms: ["generated thread titles source control content default provider"],525 searchTerms: ["generated thread titles source control content default provider"],
522 },526 },
527 {
528 id: "app-version",
529 title: "Version",
530 to: "/settings/general",
531 searchTerms: ["about check for updates download install upgrade release"],
532 },
533 {
534 id: "update-track",
535 title: "Update track",
536 to: "/settings/general",
537 searchTerms: ["release channel stable latest nightly prerelease"],
538 releaseChannelOnly: true,
539 },
523 {540 {
524 id: "cli-command",541 id: "cli-command",
525 title: "t3 command",542 title: "t3 command",
...@@ -1094,6 +1111,7 @@ export function searchSettings(...@@ -1094,6 +1111,7 @@ export function searchSettings(
1094 return items1111 return items
1095 .flatMap((item, index) => {1112 .flatMap((item, index) => {
1096 if (!isElectron && item.desktopOnly === true) return [];1113 if (!isElectron && item.desktopOnly === true) return [];
1114 if (item.releaseChannelOnly && !isElectron && HOSTED_APP_CHANNEL === null) return [];
1097 if (item.macOnly && !isMacPlatform(platform)) return [];1115 if (item.macOnly && !isMacPlatform(platform)) return [];
1098 if (item.windowsOnly && !isWindowsPlatform(platform)) return [];1116 if (item.windowsOnly && !isWindowsPlatform(platform)) return [];
10991117