From 5b4e8db06d32424aac1e414f2a058efd5fd4bc13 Mon Sep 17 00:00:00 2001 From: flamboh Date: Wed, 16 Sep 2026 23:01:52 -0700 Subject: [PATCH] feat(web): command palette finds the pull requests and usage pages --- apps/web/src/components/CommandPalette.tsx | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/apps/web/src/components/CommandPalette.tsx b/apps/web/src/components/CommandPalette.tsx index 9f993ab86c40..fddd7fa8bd7a 100644 --- a/apps/web/src/components/CommandPalette.tsx +++ b/apps/web/src/components/CommandPalette.tsx @@ -42,6 +42,7 @@ import { useLocation, useNavigate, useParams } from "@tanstack/react-router"; import * as Option from "effect/Option"; import { ArrowLeftIcon, + ChartNoAxesColumnIcon, CornerLeftUpIcon, FileSearchIcon, FolderIcon, @@ -193,6 +194,7 @@ import { } from "../sidebarProjectGrouping"; import type { Project } from "../types"; import { PullRequestGlyph } from "~/components/pullRequest/pullRequestIcons"; +import { readPullRequestListPreferences } from "~/components/pullRequest/pullRequestListPreferences"; const EMPTY_BROWSE_ENTRIES: FilesystemBrowseResult["entries"] = []; @@ -1999,6 +2001,34 @@ function OpenCommandPaletteDialog(props: { }, }); + if ( + environments.some( + (environment) => environment.serverConfig?.environment.capabilities.pullRequests === true, + ) + ) { + actionItems.push({ + kind: "action", + value: "action:pull-requests", + searchTerms: ["pull requests", "prs", "pr", "github", "review", "merge", "branch"], + title: "Open pull requests", + icon: , + run: async () => { + await navigate({ to: "/pull-requests", search: readPullRequestListPreferences() }); + }, + }); + } + + actionItems.push({ + kind: "action", + value: "action:usage", + searchTerms: ["usage", "use", "tokens", "cost", "spend", "limits", "stats", "analytics"], + title: "Open usage", + icon: , + run: async () => { + await navigate({ to: "/usage" }); + }, + }); + actionItems.push({ kind: "action", value: "action:settings",