fix: address code review findings — data loss, race condition, broken features
- TopBar: call closeBoard() before navigating back to prevent data loss - board-store: guard debouncedSave against race condition when board is closed during an in-flight save - board-store: add missing updatedAt to setColumnWidth - useKeyboardShortcuts: remove duplicate Ctrl+K handler that prevented command palette from toggling closed - AttachmentSection: wire up Tauri file dialog for adding attachments with link/copy mode support
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user