Skip to content

Commit 619e5ae

Browse files
feat(command): add inbox and command center to command menu (#3139)
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
1 parent 7c2178b commit 619e5ae

2 files changed

Lines changed: 34 additions & 1 deletion

File tree

packages/shared/src/analytics-events.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ export type CommandMenuAction =
5151
| "go-forward"
5252
| "open-task"
5353
| "open-channel"
54+
| "open-command-center"
55+
| "open-inbox"
5456
| "search-files"
5557
| "open-file"
5658
| "reload-window"

packages/ui/src/features/command/CommandMenu.tsx

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
import { CaretLeftIcon, CaretRightIcon, HashIcon } from "@phosphor-icons/react";
1+
import {
2+
CaretLeftIcon,
3+
CaretRightIcon,
4+
EnvelopeSimple,
5+
HashIcon,
6+
} from "@phosphor-icons/react";
27
import {
38
Autocomplete,
49
AutocompleteCollection,
@@ -42,6 +47,8 @@ import {
4247
goBackInHistory,
4348
goForwardInHistory,
4449
navigateToChannel,
50+
navigateToCommandCenter,
51+
navigateToInbox,
4552
} from "@posthog/ui/router/navigationBridge";
4653
import { useAppView } from "@posthog/ui/router/useAppView";
4754
import { openTask, openTaskInput } from "@posthog/ui/router/useOpenTask";
@@ -53,6 +60,7 @@ import {
5360
FileTextIcon,
5461
GearIcon,
5562
HomeIcon,
63+
LightningBoltIcon,
5664
MagnifyingGlassIcon,
5765
MoonIcon,
5866
ReloadIcon,
@@ -230,6 +238,29 @@ export function CommandMenu({ open, onOpenChange }: CommandMenuProps) {
230238
shortcut: SHORTCUTS.SETTINGS,
231239
onRun: () => openSettingsDialog(),
232240
},
241+
{
242+
id: "inbox",
243+
label: "Inbox",
244+
keywords: "reports pull requests agents notifications",
245+
icon: <EnvelopeSimple size={12} className="text-gray-11" />,
246+
action: "open-inbox",
247+
shortcut: SHORTCUTS.INBOX,
248+
onRun: () => {
249+
closeSettingsDialog();
250+
navigateToInbox();
251+
},
252+
},
253+
{
254+
id: "command-center",
255+
label: "Command center",
256+
keywords: "lightning grid tasks parallel dashboard",
257+
icon: <LightningBoltIcon className="h-3 w-3 text-gray-11" />,
258+
action: "open-command-center",
259+
onRun: () => {
260+
closeSettingsDialog();
261+
navigateToCommandCenter();
262+
},
263+
},
233264
{
234265
id: "go-back",
235266
label: "Go back",

0 commit comments

Comments
 (0)