fix(app): make cmd+o work regardless of sidebar visibility
The worktree.new keyboard handler was registered inside ProjectHeaderRow, which only mounts when the sidebar is open. Register a single global handler in the app layout keyed off the navigation-active workspace selection.
This commit is contained in:
@@ -797,17 +797,6 @@ function ProjectHeaderRow({
|
||||
const mergeWorkspaces = useSessionStore((state) => state.mergeWorkspaces);
|
||||
const toast = useToast();
|
||||
|
||||
useKeyboardActionHandler({
|
||||
handlerId: `worktree-new-${project.projectKey}`,
|
||||
actions: ["worktree.new"],
|
||||
enabled: isProjectActive && canCreateWorktree && Boolean(serverId),
|
||||
priority: 0,
|
||||
handle: () => {
|
||||
handleBeginWorkspaceSetup();
|
||||
return true;
|
||||
},
|
||||
});
|
||||
|
||||
const interaction = useLongPressDragInteraction({
|
||||
drag,
|
||||
menuController,
|
||||
|
||||
Reference in New Issue
Block a user