Skip to content

The open-source app everyone uses to manage agents at work

Restrict inbox keyboard shortcuts to mine tab only

dotta4426d96610e5
diff --git a/ui/src/pages/Inbox.tsx b/ui/src/pages/Inbox.tsx
index ebee2bc6c5..389c79e08d 100644
--- a/ui/src/pages/Inbox.tsx
+++ b/ui/src/pages/Inbox.tsx
@@ -950,11 +950,12 @@ export function Inbox() {
return;
}
+ // Keyboard shortcuts are only active on the "mine" tab
+ if (tab !== "mine") return;
+
const itemCount = workItemsToRender.length;
if (itemCount === 0) return;
- const isMineTab = tab === "mine";
-
switch (e.key) {
case "j": {
e.preventDefault();
@@ -968,7 +969,7 @@ export function Inbox() {
}
case "a":
case "y": {
- if (!isMineTab || selectedIndex < 0 || selectedIndex >= itemCount) return;
+ if (selectedIndex < 0 || selectedIndex >= itemCount) return;
e.preventDefault();
const item = workItemsToRender[selectedIndex];
const key = getWorkItemKey(item);