Search workspace files from the command center (#3059)

* feat(command-center): add workspace file search

Use the existing workspace-aware fuzzy search so file lookup follows the file explorer's ignore and hidden-directory rules. Cmd/Ctrl+P opens a removable Files scope while the normal command center also includes file matches.

* fix(command-center): stabilize file search results

* fix(shortcuts): preserve project picker command

* fix(command-center): keep file results while searching

* feat(command-center): integrate the files scope into the search row

The scope was a 24px pill with 12px text sitting inside the 16px input line, so
it read as a badge dropped into the query rather than the scope of the search.

Make it a leading cell of the search row instead: folder icon, input-sized label,
and a hairline divider before the caret. It stretches to the row's cross size and
bleeds through the header padding with negative margins, so its height is driven
entirely by the input and the panel's own radius clips its corner. Toggling the
scope cannot resize the header, which the new spec pins.

* fix(command-center): restore the files scope as a chip

The previous commit turned the scope into a flush leading cell of the header. Put
the chip back: rounded, bordered, folder icon and 14px label, no divider.

It stretches to the row instead of carrying a height, so it is exactly as tall as
the input's line box and cannot resize the header.

* refactor(shortcuts): regroup and reorder the shortcut help sections

Panels was a junk drawer: the command center, file search, the shortcuts sheet
itself, new terminal, the sidebars, settings, focus mode and theme cycling. The
two shortcuts people reach for most, Cmd+K and Cmd+P, sat inside it below three
other sections. Navigation held both workspace and tab movement.

Sections are now General, Projects & Workspaces, Tabs & Panes, Layout, and Agent
Input. General leads with the command center and file search. Tab movement joins
Tabs & Panes, new terminal joins the tabs it creates, and Layout keeps only the
sidebar and focus toggles.

Row order is now data rather than a side effect of binding-definition order, so
the row someone opens the sheet to find sits at the top of its section. A test
fails when a new shortcut has no place in that order instead of letting it sink
to the bottom unnoticed.

* Keep file search failures in view
This commit is contained in:
Mohamed Boudra
2026-08-10 17:02:35 +02:00
committed by GitHub
parent 42f1d0b289
commit a98d154b6b
26 changed files with 1070 additions and 141 deletions
+5 -1
View File
@@ -190,7 +190,11 @@ describe("translation resources", () => {
expect(en.shell.menu.toggleSidebar).toBe("Toggle sidebar");
expect(en.shell.menu.open).toBe("Open menu");
expect(en.shell.menu.close).toBe("Close menu");
expect(en.shell.commandCenter.placeholder).toBe("Search commands, workspaces, and agents...");
expect(en.shell.commandCenter.placeholder).toBe(
"Search commands, files, workspaces, and agents...",
);
expect(en.shell.commandCenter.filePlaceholder).toBe("Search files...");
expect(en.shell.commandCenter.files).toBe("Files");
expect(en.shell.commandCenter.noMatches).toBe("No matches");
expect(en.shell.commandCenter.actions).toBe("Actions");
expect(en.shell.commandCenter.workspaces).toBe("Workspaces");
+8 -4
View File
@@ -54,9 +54,12 @@ export const ar: TranslationResources = {
close: "إغلاق القائمة",
},
commandCenter: {
placeholder: "ابحث في الأوامر ومساحات العمل والوكلاء...",
placeholder: "ابحث في الأوامر والملفات ومساحات العمل والوكلاء...",
filePlaceholder: "البحث في الملفات...",
searchingFiles: "جارٍ البحث في الملفات...",
noMatches: "لا توجد مباريات",
actions: "الإجراءات",
files: "الملفات",
workspaces: "مساحات العمل",
agents: "الوكلاء",
newAgent: "وكيل جديد",
@@ -1912,10 +1915,10 @@ export const ar: TranslationResources = {
resetAll: "إعادة ضبط الكل",
},
sections: {
navigation: "ملاحة",
general: "عام",
workspaces: "المشاريع ومساحات العمل",
tabsPanes: "علامات التبويب والأجزاء",
projects: "المشاريع",
panels: "لوحات",
layout: "التخطيط",
agentInput: "إدخال Agent",
},
help: {
@@ -1943,6 +1946,7 @@ export const ar: TranslationResources = {
moveTabDown: "حرك علامة التبويب لأسفل",
closePane: "إغلاق الجزء",
newTerminal: "محطة جديدة",
searchFiles: "البحث في الملفات",
toggleCommandCenter: "تبديل مركز القيادة",
showKeyboardShortcuts: "إظهار اختصارات لوحة المفاتيح",
toggleLeftSidebar: "تبديل الشريط الجانبي الأيسر",
+8 -4
View File
@@ -52,9 +52,12 @@ export const en = {
close: "Close menu",
},
commandCenter: {
placeholder: "Search commands, workspaces, and agents...",
placeholder: "Search commands, files, workspaces, and agents...",
filePlaceholder: "Search files...",
searchingFiles: "Searching files...",
noMatches: "No matches",
actions: "Actions",
files: "Files",
workspaces: "Workspaces",
agents: "Agents",
newAgent: "New agent",
@@ -1922,10 +1925,10 @@ export const en = {
resetAll: "Reset all",
},
sections: {
navigation: "Navigation",
general: "General",
workspaces: "Projects & Workspaces",
tabsPanes: "Tabs & Panes",
projects: "Projects",
panels: "Panels",
layout: "Layout",
agentInput: "Agent Input",
},
help: {
@@ -1953,6 +1956,7 @@ export const en = {
moveTabDown: "Move tab down",
closePane: "Close pane",
newTerminal: "New terminal",
searchFiles: "Search files",
toggleCommandCenter: "Toggle command center",
showKeyboardShortcuts: "Show keyboard shortcuts",
toggleLeftSidebar: "Toggle left sidebar",
+8 -4
View File
@@ -54,9 +54,12 @@ export const es: TranslationResources = {
close: "Cerrar menú",
},
commandCenter: {
placeholder: "Buscar comandos, espacios de trabajo y agentes...",
placeholder: "Buscar comandos, archivos, espacios de trabajo y agentes...",
filePlaceholder: "Buscar archivos...",
searchingFiles: "Buscando archivos...",
noMatches: "No hay coincidencias",
actions: "Comportamiento",
files: "Archivos",
workspaces: "Espacios de trabajo",
agents: "Agentes",
newAgent: "Nuevo agente",
@@ -1960,10 +1963,10 @@ export const es: TranslationResources = {
resetAll: "Restablecer todo",
},
sections: {
navigation: "Navegación",
general: "General",
workspaces: "Proyectos y espacios de trabajo",
tabsPanes: "Pestañas y paneles",
projects: "Proyectos",
panels: "Paneles",
layout: "Diseño",
agentInput: "EntradaAgent",
},
help: {
@@ -1991,6 +1994,7 @@ export const es: TranslationResources = {
moveTabDown: "Mover pestaña hacia abajo",
closePane: "Cerrar panel",
newTerminal: "Nueva terminal",
searchFiles: "Buscar archivos",
toggleCommandCenter: "Alternar centro de comando",
showKeyboardShortcuts: "Mostrar atajos de teclado",
toggleLeftSidebar: "Alternar barra lateral izquierda",
+8 -4
View File
@@ -55,9 +55,12 @@ export const fr: TranslationResources = {
close: "Fermer le menu",
},
commandCenter: {
placeholder: "Rechercher des commandes, espaces de travail et agents...",
placeholder: "Rechercher des commandes, fichiers, espaces de travail et agents...",
filePlaceholder: "Rechercher des fichiers...",
searchingFiles: "Recherche de fichiers...",
noMatches: "Aucune correspondance",
actions: "Actes",
files: "Fichiers",
workspaces: "Espaces de travail",
agents: "Agents",
newAgent: "Nouvel agent",
@@ -1963,10 +1966,10 @@ export const fr: TranslationResources = {
resetAll: "Tout réinitialiser",
},
sections: {
navigation: "Navigation",
general: "Général",
workspaces: "Projets et espaces de travail",
tabsPanes: "Onglets et volets",
projects: "Projets",
panels: "Panneaux",
layout: "Disposition",
agentInput: "EntréeAgent",
},
help: {
@@ -1994,6 +1997,7 @@ export const fr: TranslationResources = {
moveTabDown: "Déplacer l'onglet vers le bas",
closePane: "Fermer le volet",
newTerminal: "Nouvelle borne",
searchFiles: "Rechercher des fichiers",
toggleCommandCenter: "Basculer le centre de commande",
showKeyboardShortcuts: "Afficher les raccourcis clavier",
toggleLeftSidebar: "Basculer la barre latérale gauche",
+8 -4
View File
@@ -54,9 +54,12 @@ export const ja: TranslationResources = {
close: "メニューを閉じる",
},
commandCenter: {
placeholder: "コマンド、ワークスペース、エージェントを検索...",
placeholder: "コマンド、ファイル、ワークスペース、エージェントを検索...",
filePlaceholder: "ファイルを検索...",
searchingFiles: "ファイルを検索中...",
noMatches: "一致なし",
actions: "アクション",
files: "ファイル",
workspaces: "ワークスペース",
agents: "エージェント",
newAgent: "新しいエージェント",
@@ -1928,10 +1931,10 @@ export const ja: TranslationResources = {
resetAll: "すべてリセット",
},
sections: {
navigation: "ナビゲーション",
general: "一般",
workspaces: "プロジェクト&ワークスペース",
tabsPanes: "タブ&ペイン",
projects: "プロジェクト",
panels: "パネル",
layout: "レイアウト",
agentInput: "エージェント入力",
},
help: {
@@ -1959,6 +1962,7 @@ export const ja: TranslationResources = {
moveTabDown: "タブを下に移動",
closePane: "ペインを閉じる",
newTerminal: "新しいターミナル",
searchFiles: "ファイルを検索",
toggleCommandCenter: "コマンドセンターを切り替え",
showKeyboardShortcuts: "キーボードショートカットを表示",
toggleLeftSidebar: "左サイドバーを切り替え",
+8 -4
View File
@@ -54,9 +54,12 @@ export const ko: TranslationResources = {
close: "메뉴 닫기",
},
commandCenter: {
placeholder: "명령, 워크스페이스 및 에이전트 검색...",
placeholder: "명령, 파일, 워크스페이스 및 에이전트 검색...",
filePlaceholder: "파일 검색...",
searchingFiles: "파일 검색 중...",
noMatches: "일치 항목 없음",
actions: "작업",
files: "파일",
workspaces: "워크스페이스",
agents: "에이전트",
newAgent: "새 에이전트",
@@ -1923,10 +1926,10 @@ export const ko: TranslationResources = {
resetAll: "모두 재설정",
},
sections: {
navigation: "탐색",
general: "일반",
workspaces: "프로젝트 및 워크스페이스",
tabsPanes: "탭 및 창",
projects: "프로젝트",
panels: "패널",
layout: "레이아웃",
agentInput: "에이전트 입력",
},
help: {
@@ -1954,6 +1957,7 @@ export const ko: TranslationResources = {
moveTabDown: "탭을 아래로 이동",
closePane: "창 닫기",
newTerminal: "새 터미널",
searchFiles: "파일 검색",
toggleCommandCenter: "명령 센터 토글",
showKeyboardShortcuts: "키보드 단축키 표시",
toggleLeftSidebar: "왼쪽 사이드바 토글",
+8 -4
View File
@@ -54,9 +54,12 @@ export const ptBR: TranslationResources = {
close: "Fechar menu",
},
commandCenter: {
placeholder: "Buscar comandos, espaços de trabalho e agentes...",
placeholder: "Buscar comandos, arquivos, espaços de trabalho e agentes...",
filePlaceholder: "Pesquisar arquivos...",
searchingFiles: "Pesquisando arquivos...",
noMatches: "Nenhuma correspondência",
actions: "Ações",
files: "Arquivos",
workspaces: "Espaços de trabalho",
agents: "Agentes",
newAgent: "Novo agente",
@@ -1943,10 +1946,10 @@ export const ptBR: TranslationResources = {
resetAll: "Redefinir tudo",
},
sections: {
navigation: "Navegação",
general: "Geral",
workspaces: "Projetos e workspaces",
tabsPanes: "Abas e painéis",
projects: "Projetos",
panels: "Painéis",
layout: "Layout",
agentInput: "Entrada do agente",
},
help: {
@@ -1974,6 +1977,7 @@ export const ptBR: TranslationResources = {
moveTabDown: "Mover aba para baixo",
closePane: "Fechar painel",
newTerminal: "Novo terminal",
searchFiles: "Pesquisar arquivos",
toggleCommandCenter: "Alternar central de comandos",
showKeyboardShortcuts: "Mostrar atalhos de teclado",
toggleLeftSidebar: "Alternar barra lateral esquerda",
+8 -4
View File
@@ -54,9 +54,12 @@ export const ru: TranslationResources = {
close: "Закрыть меню",
},
commandCenter: {
placeholder: "Поиск команд, рабочих пространств и агентов...",
placeholder: "Поиск команд, файлов, рабочих пространств и агентов...",
filePlaceholder: "Поиск файлов...",
searchingFiles: "Поиск файлов...",
noMatches: "Нет совпадений",
actions: "Действия",
files: "Файлы",
workspaces: "Рабочие пространства",
agents: "Агенты",
newAgent: "Новый агент",
@@ -1950,10 +1953,10 @@ export const ru: TranslationResources = {
resetAll: "Сбросить все",
},
sections: {
navigation: "Навигация",
general: "Общие",
workspaces: "Проекты и рабочие пространства",
tabsPanes: "Вкладки и панели",
projects: "Проекты",
panels: "Панели",
layout: "Макет",
agentInput: "Вход Agent",
},
help: {
@@ -1981,6 +1984,7 @@ export const ru: TranslationResources = {
moveTabDown: "Переместить вкладку вниз",
closePane: "Закрыть панель",
newTerminal: "Новый терминал",
searchFiles: "Поиск файлов",
toggleCommandCenter: "Переключить командный центр",
showKeyboardShortcuts: "Показать сочетания клавиш",
toggleLeftSidebar: "Переключить левую боковую панель",
+8 -4
View File
@@ -54,9 +54,12 @@ export const zhCN: TranslationResources = {
close: "关闭菜单",
},
commandCenter: {
placeholder: "搜索命令、工作区和 Agent...",
placeholder: "搜索命令、文件、工作区和 Agent...",
filePlaceholder: "搜索文件...",
searchingFiles: "正在搜索文件...",
noMatches: "没有匹配项",
actions: "操作",
files: "文件",
workspaces: "工作区",
agents: "Agents",
newAgent: "新建 Agent",
@@ -1890,10 +1893,10 @@ export const zhCN: TranslationResources = {
resetAll: "全部重置",
},
sections: {
navigation: "导航",
general: "通用",
workspaces: "项目和工作区",
tabsPanes: "标签和窗格",
projects: "项目",
panels: "面板",
layout: "布局",
agentInput: "Agent 输入",
},
help: {
@@ -1921,6 +1924,7 @@ export const zhCN: TranslationResources = {
moveTabDown: "向下移动标签",
closePane: "关闭窗格",
newTerminal: "新建终端",
searchFiles: "搜索文件",
toggleCommandCenter: "切换命令中心",
showKeyboardShortcuts: "显示键盘快捷键",
toggleLeftSidebar: "切换左侧边栏",