From 9d971b7d3fa902398cafaca06506d396d54a7825 Mon Sep 17 00:00:00 2001 From: nesquena-hermes Date: Thu, 7 May 2026 19:32:51 +0000 Subject: [PATCH 1/4] ux(workspace): move 'Show hidden files' toggle to kebab menu (#1793) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaces the always-visible inline toggle row that ate ~32px below the breadcrumb on every panel view (root, subdir, file preview). The toggle is a set-once preference — most users flip it once or never — so the control hides behind a kebab dropdown in the panel-actions row instead. A small 'hidden visible' indicator next to the WORKSPACE heading flags the non-default state so users don't forget the pref is on. Click the indicator to reopen the menu and uncheck. The localStorage key, filtering behavior, and the canonical \`workspaceShowHiddenFiles\` checkbox id are unchanged — the checkbox is rebuilt inside the dropdown each time it opens. All 11 existing regression tests for #1793 stay green; 7 new tests pin the kebab affordance shape. --- static/i18n.js | 36 +++++ static/index.html | 7 +- static/style.css | 27 +++- static/ui.js | 102 ++++++++++++ .../test_issue1793_file_tree_cruft_filter.py | 151 +++++++++++++++++- 5 files changed, 309 insertions(+), 14 deletions(-) diff --git a/static/i18n.js b/static/i18n.js index 56560be6..c8f160fe 100644 --- a/static/i18n.js +++ b/static/i18n.js @@ -312,6 +312,10 @@ const LOCALES = { workspace_empty_no_path: 'No workspace selected. Set a workspace in Settings \u2192 Workspace to browse files.', workspace_empty_dir: 'This workspace is empty.', workspace_show_hidden_files: 'Show hidden files', + workspace_show_hidden_files_desc: 'Include .DS_Store, .git, node_modules, and other hidden / system files in the file tree.', + workspace_hidden_files_visible: 'hidden visible', + workspace_hidden_files_visible_title: 'Hidden files are visible — click for options', + workspace_options: 'Workspace options', dialog_confirm_title: 'Confirm action', dialog_prompt_title: 'Enter a value', dialog_confirm_btn: 'Confirm', @@ -1326,6 +1330,10 @@ const LOCALES = { workspace_empty_no_path: 'ワークスペースが選択されていません。設定 → ワークスペースで選択してください。', workspace_empty_dir: 'このワークスペースは空です。', workspace_show_hidden_files: 'Show hidden files', + workspace_show_hidden_files_desc: 'Include .DS_Store, .git, node_modules, and other hidden / system files in the file tree.', + workspace_hidden_files_visible: 'hidden visible', + workspace_hidden_files_visible_title: 'Hidden files are visible — click for options', + workspace_options: 'Workspace options', dialog_confirm_title: '操作の確認', dialog_prompt_title: '値を入力', dialog_confirm_btn: '確認', @@ -2239,6 +2247,10 @@ const LOCALES = { settings_autosave_retry: 'Повторить', workspace_empty_dir: 'Это рабочее пространство пусто.', workspace_show_hidden_files: 'Show hidden files', + workspace_show_hidden_files_desc: 'Include .DS_Store, .git, node_modules, and other hidden / system files in the file tree.', + workspace_hidden_files_visible: 'hidden visible', + workspace_hidden_files_visible_title: 'Hidden files are visible — click for options', + workspace_options: 'Workspace options', workspace_empty_no_path: 'Рабочее пространство не выбрано. Настройте его в Настройки → Рабочее пространство.', available_personalities: 'Доступные личности:', personality_switch_hint: '\n\nИспользуйте `/personality ` для переключения или `/personality none` для сброса.', @@ -3196,6 +3208,10 @@ const LOCALES = { workspace_empty_no_path: 'No hay espacio de trabajo seleccionado. Configure un espacio de trabajo en Ajustes \u2192 Workspace para explorar archivos.', workspace_empty_dir: 'Este espacio de trabajo está vacío.', workspace_show_hidden_files: 'Show hidden files', + workspace_show_hidden_files_desc: 'Include .DS_Store, .git, node_modules, and other hidden / system files in the file tree.', + workspace_hidden_files_visible: 'hidden visible', + workspace_hidden_files_visible_title: 'Hidden files are visible — click for options', + workspace_options: 'Workspace options', // workspace.js unsaved_confirm: 'Tienes cambios sin guardar en la vista previa. ¿Descartar y navegar?', save: 'Guardar', @@ -4125,6 +4141,10 @@ const LOCALES = { workspace_empty_no_path: 'Kein Workspace ausgewählt. Wähle einen Workspace unter Einstellungen \u2192 Workspace, um Dateien zu durchsuchen.', workspace_empty_dir: 'Dieser Workspace ist leer.', workspace_show_hidden_files: 'Versteckte Dateien anzeigen', + workspace_show_hidden_files_desc: '.DS_Store, .git, node_modules und weitere versteckte / Systemdateien im Dateibaum anzeigen.', + workspace_hidden_files_visible: 'versteckt sichtbar', + workspace_hidden_files_visible_title: 'Versteckte Dateien sind sichtbar — Klicken für Optionen', + workspace_options: 'Arbeitsbereich-Optionen', dialog_confirm_title: 'Aktion bestätigen', dialog_prompt_title: 'Wert eingeben', dialog_confirm_btn: 'Bestätigen', @@ -5069,6 +5089,10 @@ const LOCALES = { workspace_empty_no_path: '未选择工作区。请在 设置 → 工作区 中设置工作区以浏览文件。', workspace_empty_dir: '此工作区为空。', workspace_show_hidden_files: 'Show hidden files', + workspace_show_hidden_files_desc: 'Include .DS_Store, .git, node_modules, and other hidden / system files in the file tree.', + workspace_hidden_files_visible: 'hidden visible', + workspace_hidden_files_visible_title: 'Hidden files are visible — click for options', + workspace_options: 'Workspace options', no_personalities: '\u6ca1\u6709\u627e\u5230\u4eba\u8bbe\uff08\u53ef\u6dfb\u52a0\u5230 ~/.hermes/personalities/\uff09', available_personalities: '\u53ef\u7528\u4eba\u8bbe\uff1a', personality_switch_hint: '\n\n\u4f7f\u7528 `/personality ` \u5207\u6362\uff0c\u6216\u7528 `/personality none` \u6e05\u7a7a\u3002', @@ -5972,6 +5996,10 @@ const LOCALES = { workspace_empty_no_path: '未選擇工作區。請在 設定 → 工作區 中設定工作區以瀏覽檔案。', workspace_empty_dir: '此工作區為空。', workspace_show_hidden_files: 'Show hidden files', + workspace_show_hidden_files_desc: 'Include .DS_Store, .git, node_modules, and other hidden / system files in the file tree.', + workspace_hidden_files_visible: 'hidden visible', + workspace_hidden_files_visible_title: 'Hidden files are visible — click for options', + workspace_options: 'Workspace options', no_personalities: '\u6c92\u6709\u627e\u5230\u4eba\u8a2d\uff08\u53ef\u6dfb\u52a0\u5230 ~/.hermes/personalities/\uff09', available_personalities: '\u53ef\u7528\u4eba\u8a2d\uff1a', personality_switch_hint: '\n\n\u4f7f\u7528 `/personality ` \u5207\u63db\uff0c\u6216\u7528 `/personality none` \u6e05\u7a7a\u3002', @@ -7025,6 +7053,10 @@ const LOCALES = { workspace_empty_no_path: 'Nenhum workspace selecionado. Configure em Configurações → Workspace.', workspace_empty_dir: 'Este workspace está vazio.', workspace_show_hidden_files: 'Show hidden files', + workspace_show_hidden_files_desc: 'Include .DS_Store, .git, node_modules, and other hidden / system files in the file tree.', + workspace_hidden_files_visible: 'hidden visible', + workspace_hidden_files_visible_title: 'Hidden files are visible — click for options', + workspace_options: 'Workspace options', dialog_confirm_title: 'Confirmar ação', dialog_prompt_title: 'Digite um valor', dialog_confirm_btn: 'Confirmar', @@ -7922,6 +7954,10 @@ const LOCALES = { workspace_empty_no_path: 'No workspace selected. Set a workspace in Settings \u2192 Workspace to browse files.', workspace_empty_dir: 'This workspace is empty.', workspace_show_hidden_files: 'Show hidden files', + workspace_show_hidden_files_desc: 'Include .DS_Store, .git, node_modules, and other hidden / system files in the file tree.', + workspace_hidden_files_visible: 'hidden visible', + workspace_hidden_files_visible_title: 'Hidden files are visible — click for options', + workspace_options: 'Workspace options', dialog_confirm_title: 'Confirm action', dialog_prompt_title: 'Enter a value', dialog_confirm_btn: 'Confirm', diff --git a/static/index.html b/static/index.html index e934b2cb..a08aad1d 100644 --- a/static/index.html +++ b/static/index.html @@ -1118,7 +1118,7 @@