diff --git a/ui/src/pages/Inbox.tsx b/ui/src/pages/Inbox.tsx index ebee2bc6..389c79e0 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);