feat: add O keyboard shortcut to open project

This commit is contained in:
Cody Seibert
2025-12-09 09:13:10 -05:00
parent 2d8f600209
commit 95355f53f4
2 changed files with 44 additions and 73 deletions

View File

@@ -1,65 +1,9 @@
[
{
"id": "feature-1765286925345-4eu5miocn",
"id": "feature-1765288408132-3pmld0an6",
"category": "Core",
"description": "After a category has been created we should persist that somewhere such as in the .automaker directory in a .json file so that all the categories of future items I add in will persist even if I delete all the cards.",
"steps": [],
"status": "in_progress"
},
{
"id": "feature-1765287004835-d2c5aqdkr",
"category": "Core",
"description": "I need to add the ability on the Kanban cards to enable or disable if it's going to do the whole test driven development approach. Sometimes the task is so easy I don't need it to write tests for, but... And if it is a task that did not have a test, a user should manually be able to click a verified button when it's in the in progress column and the agent is done. I'll have to manually verify it. So this might change the logic a little bit to allow dragging of cards when they aren't tested automatically from the in progress column back to verified and from verified back to in progress. But keep the existing functionality if it is a test automated card and prevent the dragging.",
"steps": [],
"status": "backlog"
},
{
"id": "feature-1765287091626-ceoj6xld8",
"category": "Kanban",
"description": "Show a confirmed dialog when I click on the trash icon for deleting a card. Use the existing dialog that we have in the components directory for this.",
"steps": [],
"status": "verified"
},
{
"id": "feature-1765287114711-fgypwhnvt",
"category": "Kanban",
"description": "When adding a new feature inside the modal there's an add feature button. Can you add a shortcut of shift? Enter which if you click shift enter I'll automatically add it in",
"steps": [],
"status": "verified"
},
{
"id": "feature-1765287141131-dz489etgj",
"category": "Kanban",
"description": "When I edit a card, it's showing an input for the description refactor to also show a text area for description like we do on the add card, add feature card.",
"steps": [],
"status": "in_progress"
},
{
"id": "feature-1765287613626-z01cksyg6",
"category": "Core",
"description": "I'm noticing that when cards finish running, sometimes Cloud Code will update the featureless JSON and restore old state. I think instead of actually modifying the featureless JSON manually, it should call an custom tool, and that tool should update a card directly into the JSON so that Cloud Code isn't potentially messing with other things. All it needs to do is just pass in an ID and a status, and that's going to update in the JSON list.",
"steps": [],
"status": "verified"
},
{
"id": "feature-1765287638726-rtxxdpobi",
"category": "Kanban",
"description": " Change the shortcut key for the add new feature from shift enter to command enter",
"steps": [],
"status": "verified"
},
{
"id": "feature-1765288256029-ask2y1gq2",
"category": "Agent Runner",
"description": "Can you please add a shortcut for starting a new session?",
"steps": [],
"status": "verified"
},
{
"id": "feature-1765288315355-ihrm3jz83",
"category": "Kanban",
"description": "Can you please refactor it so if I were to press one of the number keys on my keyboard when the output modal is open, just go ahead and auto collapse it if it was the same number that I had open. If I were to press a different number on my number key, don't actually close it again.",
"description": "Can you add a shortcut key for O to open up a new project? To click on the open new project button that's in like the logo header area.",
"steps": [],
"status": "verified"
}
]
]

View File

@@ -33,6 +33,8 @@ import {
import {
useKeyboardShortcuts,
NAV_SHORTCUTS,
UI_SHORTCUTS,
ACTION_SHORTCUTS,
KeyboardShortcut,
} from "@/hooks/use-keyboard-shortcuts";
@@ -83,6 +85,20 @@ export function Sidebar() {
const navigationShortcuts: KeyboardShortcut[] = useMemo(() => {
const shortcuts: KeyboardShortcut[] = [];
// Sidebar toggle shortcut - always available
shortcuts.push({
key: UI_SHORTCUTS.toggleSidebar,
action: () => toggleSidebar(),
description: "Toggle sidebar",
});
// Open project shortcut - always available
shortcuts.push({
key: ACTION_SHORTCUTS.openProject,
action: () => setCurrentView("welcome"),
description: "Open project (navigate to welcome view)",
});
// Only enable nav shortcuts if there's a current project
if (currentProject) {
navSections.forEach((section) => {
@@ -106,7 +122,7 @@ export function Sidebar() {
}
return shortcuts;
}, [currentProject, setCurrentView]);
}, [currentProject, setCurrentView, toggleSidebar]);
// Register keyboard shortcuts
useKeyboardShortcuts(navigationShortcuts);
@@ -124,18 +140,29 @@ export function Sidebar() {
data-testid="sidebar"
>
{/* Floating Collapse Toggle Button - Desktop only */}
<button
onClick={toggleSidebar}
className="hidden lg:flex absolute top-1/2 -translate-y-1/2 -right-3 z-50 items-center justify-center w-6 h-6 rounded-full bg-zinc-800 border border-white/10 text-zinc-400 hover:text-white hover:bg-zinc-700 hover:border-white/20 transition-all shadow-lg titlebar-no-drag"
data-testid="sidebar-collapse-button"
title={sidebarOpen ? "Collapse sidebar" : "Expand sidebar"}
>
{sidebarOpen ? (
<PanelLeftClose className="w-3.5 h-3.5" />
) : (
<PanelLeft className="w-3.5 h-3.5" />
)}
</button>
<div className="hidden lg:flex absolute top-1/2 -translate-y-1/2 -right-3 z-50 group/toggle">
<button
onClick={toggleSidebar}
className="flex items-center justify-center w-6 h-6 rounded-full bg-zinc-800 border border-white/10 text-zinc-400 hover:text-white hover:bg-zinc-700 hover:border-white/20 transition-all shadow-lg titlebar-no-drag"
data-testid="sidebar-collapse-button"
>
{sidebarOpen ? (
<PanelLeftClose className="w-3.5 h-3.5" />
) : (
<PanelLeft className="w-3.5 h-3.5" />
)}
</button>
{/* Tooltip */}
<div
className="absolute left-full ml-2 px-2 py-1 bg-zinc-800 text-white text-xs rounded opacity-0 group-hover/toggle:opacity-100 transition-opacity whitespace-nowrap z-50 border border-zinc-700 pointer-events-none"
data-testid="sidebar-toggle-tooltip"
>
{sidebarOpen ? "Collapse sidebar" : "Expand sidebar"}{" "}
<span className="ml-1 px-1 py-0.5 bg-white/10 rounded text-[10px] font-mono" data-testid="sidebar-toggle-shortcut">
{UI_SHORTCUTS.toggleSidebar}
</span>
</div>
</div>
<div className="flex-1 flex flex-col overflow-hidden">
{/* Logo */}
@@ -177,7 +204,7 @@ export function Sidebar() {
<button
onClick={() => setCurrentView("welcome")}
className="group flex items-center justify-center w-8 h-8 rounded-lg relative overflow-hidden transition-all text-zinc-400 hover:text-white hover:bg-white/5"
title="Open Project"
title={`Open Project (${ACTION_SHORTCUTS.openProject})`}
data-testid="open-project-button"
>
<FolderOpen className="w-4 h-4 flex-shrink-0" />