Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/features/dashboard/sidebar/command.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,11 @@
const { open: sidebarOpen, openMobile: sidebarOpenMobile } = useSidebar()
const isSidebarOpen = sidebarOpen || sidebarOpenMobile

useKeydown((event) => {
if (event.key === 'k' && (event.metaKey || event.ctrlKey)) {
event.preventDefault()
event.stopPropagation()
setOpen(true)
setOpen((prev) => !prev)
}

Check warning on line 42 in src/features/dashboard/sidebar/command.tsx

View check run for this annotation

Claude / Claude Code Review

Cmd+K key-repeat flickers the palette open/closed

Holding Cmd/Ctrl+K past the OS key-repeat delay (~500ms) now flickers the palette open/closed at ~30Hz, because the new `setOpen((prev) => !prev)` toggle flips state on every auto-repeat keydown (the previous `setOpen(true)` was idempotent and masked this). Add `if (event.repeat) return` before the toggle — the conventional guard for toggle shortcuts.
Comment thread
Kraci marked this conversation as resolved.

return true
})
Expand Down Expand Up @@ -72,7 +71,7 @@
</SidebarMenuItem>
<CommandDialog open={open} onOpenChange={setOpen}>
<CommandInput placeholder="Quick Jump to..." />
<CommandList className="p-1 pb-3">
<CommandList className="scroll-py-3 px-1 py-3">
<CommandEmpty>No results found.</CommandEmpty>
<CommandGroup heading="Pages">
{SIDEBAR_ALL_LINKS.map((link) => (
Expand Down
Loading