Skip to content

feat: close command palette with the same shortcut#443

Open
Kraci wants to merge 1 commit into
mainfrom
close-palette-with-the-same-shortcut-en-1073
Open

feat: close command palette with the same shortcut#443
Kraci wants to merge 1 commit into
mainfrom
close-palette-with-the-same-shortcut-en-1073

Conversation

@Kraci

@Kraci Kraci commented Jun 21, 2026

Copy link
Copy Markdown
Contributor
  • Close command palette with the same shortcut
  • Add scroll bottom/top padding for nicer arrow-scroll experience

also closes EN-652

@linear-code

linear-code Bot commented Jun 21, 2026

Copy link
Copy Markdown

EN-1073

EN-652

@cla-bot cla-bot Bot added the cla-signed label Jun 21, 2026
@vercel

vercel Bot commented Jun 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
web Ready Ready Preview, Comment Jun 21, 2026 2:38pm

Request Review

@Kraci Kraci changed the title Close command palette with the same shortcut feat: close command palette with the same shortcut Jun 21, 2026
@Kraci Kraci marked this pull request as ready for review June 21, 2026 14:41
@Kraci Kraci self-assigned this Jun 21, 2026

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — small UX tweak; the key-repeat nit can be addressed in a follow-up.

Extended reasoning...

Overview

This PR makes two small changes to src/features/dashboard/sidebar/command.tsx: (1) the Cmd/Ctrl+K shortcut now toggles the command palette open/closed instead of always opening it, and (2) the CommandList gains scroll-py-3 and symmetric px-1 py-3 padding for a nicer arrow-scroll experience. The PR also drops a stopPropagation() call that is no longer needed.

Security risks

None. Purely client-side UI behavior — no auth, network, or data handling involved.

Level of scrutiny

Low. Single file, ~4 lines of substantive change, isolated to a sidebar UI component. No critical paths, no API surface, no CODEOWNER-sensitive area. The intent matches the title and description exactly.

Other factors

The bug hunting system surfaced one nit: holding Cmd+K past the OS key-repeat delay can flicker the palette at ~30Hz because each repeated keydown now flips state instead of being idempotent. It's a real regression but requires deliberate key-holding to trigger and is a one-line if (event.repeat) return fix — fine to land separately. Inline comment is already attached for visibility.

Comment thread src/features/dashboard/sidebar/command.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants