authorgravatar for 97427849+flamboh@users.noreply.github.comoliver <97427849+flamboh@users.noreply.github.com> 2026-09-16 23:17:41-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-17 03:17:41-03:00
logc0dded88b1fc8c1c86d65f684fbfa520139e58dc
treed4d285950ec28c843b0892eceb0b44e2c629801d
parentc4ca1b0f94e56bd93899704f03015d51948a6b4d
signature Signed by PGP key B5690EEEBB952194

feat(web): command palette finds the pull requests and usage pages (#12211)


1 files changed, 30 insertions(+), 0 deletions(-)

apps/web/src/components/CommandPalette.tsx+30
...@@ -42,6 +42,7 @@ import { useLocation, useNavigate, useParams } from "@tanstack/react-router";...@@ -42,6 +42,7 @@ import { useLocation, useNavigate, useParams } from "@tanstack/react-router";
42import * as Option from "effect/Option";42import * as Option from "effect/Option";
43import {43import {
44 ArrowLeftIcon,44 ArrowLeftIcon,
45 ChartNoAxesColumnIcon,
45 CornerLeftUpIcon,46 CornerLeftUpIcon,
46 FileSearchIcon,47 FileSearchIcon,
47 FolderIcon,48 FolderIcon,
...@@ -193,6 +194,7 @@ import {...@@ -193,6 +194,7 @@ import {
193} from "../sidebarProjectGrouping";194} from "../sidebarProjectGrouping";
194import type { Project } from "../types";195import type { Project } from "../types";
195import { PullRequestGlyph } from "~/components/pullRequest/pullRequestIcons";196import { PullRequestGlyph } from "~/components/pullRequest/pullRequestIcons";
197import { readPullRequestListPreferences } from "~/components/pullRequest/pullRequestListPreferences";
196198
197const EMPTY_BROWSE_ENTRIES: FilesystemBrowseResult["entries"] = [];199const EMPTY_BROWSE_ENTRIES: FilesystemBrowseResult["entries"] = [];
198200
...@@ -1999,6 +2001,34 @@ function OpenCommandPaletteDialog(props: {...@@ -1999,6 +2001,34 @@ function OpenCommandPaletteDialog(props: {
1999 },2001 },
2000 });2002 });
20012003
2004 if (
2005 environments.some(
2006 (environment) => environment.serverConfig?.environment.capabilities.pullRequests === true,
2007 )
2008 ) {
2009 actionItems.push({
2010 kind: "action",
2011 value: "action:pull-requests",
2012 searchTerms: ["pull requests", "prs", "pr", "github", "review", "merge", "branch"],
2013 title: "Open pull requests",
2014 icon: <PullRequestGlyph.pullRequest className={ITEM_ICON_CLASS} />,
2015 run: async () => {
2016 await navigate({ to: "/pull-requests", search: readPullRequestListPreferences() });
2017 },
2018 });
2019 }
2020
2021 actionItems.push({
2022 kind: "action",
2023 value: "action:usage",
2024 searchTerms: ["usage", "use", "tokens", "cost", "spend", "limits", "stats", "analytics"],
2025 title: "Open usage",
2026 icon: <ChartNoAxesColumnIcon className={ITEM_ICON_CLASS} />,
2027 run: async () => {
2028 await navigate({ to: "/usage" });
2029 },
2030 });
2031
2002 actionItems.push({2032 actionItems.push({
2003 kind: "action",2033 kind: "action",
2004 value: "action:settings",2034 value: "action:settings",