address code review findings - data loss, race condition, broken features

This commit is contained in:
2026-02-15 19:33:25 +02:00
parent 0b70ee656f
commit 3369c34675
4 changed files with 38 additions and 14 deletions

View File

@@ -17,14 +17,8 @@ export function useKeyboardShortcuts(): void {
function handleKeyDown(e: KeyboardEvent) {
const ctrl = e.ctrlKey || e.metaKey;
// Ctrl+K: open command palette (always works, even in inputs)
if (ctrl && e.key === "k") {
e.preventDefault();
document.dispatchEvent(new CustomEvent("open-command-palette"));
return;
}
// Skip remaining shortcuts when an input is focused
// Note: Ctrl+K for command palette is handled directly by CommandPalette component
if (isInputFocused()) return;
// Ctrl+Shift+Z: redo