From 728dac2faaa34b17cca366de66e2ae848af1081e Mon Sep 17 00:00:00 2001 From: cavidelizade Date: Fri, 17 Jul 2026 00:49:19 +0400 Subject: [PATCH] fix(ui): let the command palette search terms starting with c or p With an empty query, a single letter that matched a command's shortcut ran the command and swallowed the keystroke, so "create-issue" (C) and "create-project" (P) made it impossible to type a search beginning with those letters. Drop the type-to-run shortcut handling so every character goes into the search box; the commands are still one Enter (or click) away. Closes #338 Co-Authored-By: Claude Opus 4.8 (1M context) --- .../src/components/layout/GlobalCommandPalette.tsx | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/apps/web/src/components/layout/GlobalCommandPalette.tsx b/apps/web/src/components/layout/GlobalCommandPalette.tsx index f0f9cec..76daa86 100644 --- a/apps/web/src/components/layout/GlobalCommandPalette.tsx +++ b/apps/web/src/components/layout/GlobalCommandPalette.tsx @@ -147,7 +147,6 @@ export function GlobalCommandPalette({ id: 'create-issue', category: t('commandPalette.category.workItem', 'Work item'), label: t('commandPalette.createIssue', 'Create new work item'), - shortcut: 'C', matchText: t('commandPalette.createIssue.match', 'new issue task'), icon: , run: () => runAndClose(onRequestCreateWorkItem), @@ -172,7 +171,6 @@ export function GlobalCommandPalette({ id: 'create-project', category: t('commandPalette.category.project', 'Project'), label: t('commandPalette.createProject', 'Go to projects'), - shortcut: 'P', matchText: t('commandPalette.createProject.match', 'create new project list'), icon: , run: () => runAndClose(() => navigate(`${baseUrl}/projects`)), @@ -542,16 +540,6 @@ export function GlobalCommandPalette({ const onInputKeyDown = (e: React.KeyboardEvent) => { if (e.nativeEvent.isComposing) return; - if (!e.ctrlKey && !e.metaKey && !e.altKey && e.key.length === 1 && query.trim() === '') { - const letter = e.key.toUpperCase(); - const hit = filtered.find((c) => c.shortcut?.toUpperCase() === letter); - if (hit) { - e.preventDefault(); - hit.run(); - return; - } - } - if (e.key === 'ArrowDown') { e.preventDefault(); moveSelection(1);