You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Menu: new Select top-level submenu with select/deselect items (M8)
- Add a Select submenu between Edit and View on both macOS and Linux.
- Move Select all (⌘A) and Deselect all (⌘⇧A) out of Edit into Select.
- Add Select files… and Deselect files… items with NO menu accelerators
(bare +/- aren't valid macOS menu accelerators; the keystroke binding
lives in FilePane's keydown handler from M7).
- Register the four IDs in menu_items.rs, mod.rs::menu_id_to_command and
command_id_to_menu_id, plus shortcuts-store.ts::menuCommands.
- Decision: Cmdr's selectAll operates on files, not text, so the Select
menu is the more honest home. Edit retains Cut/Copy/Paste for text.
Copy file name to clipboardExpand all lines: apps/desktop/src-tauri/src/menu/CLAUDE.md
+19-5Lines changed: 19 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -146,7 +146,14 @@ template auto-tinting). However, **full-color non-template images do render corr
146
146
147
147
## Menu structure
148
148
149
-
Both platforms share: File, Edit, View (with Sort by and Zoom submenus), Go, Tab, Help.
149
+
Both platforms share: File, Edit, Select, View (with Sort by and Zoom submenus), Go, Tab, Help.
150
+
151
+
The **Select** submenu (between Edit and View) holds the four selection commands: `Select all` (⌘A), `Deselect all`
152
+
(⌘⇧A), `Select files…` (no menu accelerator), and `Deselect files…` (no menu accelerator). The two `…` items open the
153
+
Selection dialog (see `apps/desktop/src/lib/selection-dialog/CLAUDE.md`); their keystrokes (bare `+` / `-`) are bound in
154
+
`FilePane`'s keydown handler because macOS menu accelerators always carry the ⌘ modifier and bare `+` / `-` aren't
155
+
valid accelerator strings. The items are still registered in `MenuState.items` so a user-customized shortcut could flow
156
+
into the menu via the generic update path.
150
157
151
158
The **Zoom** submenu (`build_zoom_submenu`) holds the text-size presets (75/100/125/150 %) plus Zoom in (`Cmd+Plus`) /
152
159
Zoom out (`Cmd+Minus`) / 100 % (`Cmd+0`). Items are `App`-scoped so the keyboard accelerators fire in any focused window.
@@ -186,6 +193,13 @@ also Window and Help.
186
193
**Decision**: Per-pane View submenus (`View > Left pane > …`, `View > Right pane > …`) with the accelerator following the active pane.
187
194
**Why**: The previous single Full/Brief pair always targeted the active pane, but that scope was invisible in the menu, so testers were slow to figure out how to change the inactive pane's view. Nesting each pane's Full/Brief items inside its own submenu makes the scope obvious without cluttering the View root. The accelerator is attached only to the active pane's pair (and migrates on focus change via `rebuild_view_mode_items`) so the shortcut remains accurate: pressing ⌘1 always affects the active pane, and the visible binding sits next to the items it actually targets.
188
195
196
+
**Decision**: `Select all` and `Deselect all` live in the new `Select` top-level menu, not in `Edit`.
197
+
**Why**: macOS convention puts them under `Edit`, but Cmdr's `selection.selectAll` operates on files, not on text. The
198
+
`Select` menu is the honest home for file-selection commands, and it groups them with the new `Select files…` /
199
+
`Deselect files…` dialog openers (M8 of the selection-dialog plan). `Edit` retains the text-edit operations
200
+
(Cut/Copy/Paste/Move here/Copy path/Copy filename/Search files) plus Undo/Redo. Don't move them back without re-reading
201
+
this entry and the selection-dialog plan's M8 § "Menu structure" rationale.
202
+
189
203
**Decision**: SF Symbol icons only on the menu bar, not on context menus.
190
204
**Why**: Tauri doesn't support SF Symbols natively. For the menu bar, we walk `NSApplication.mainMenu()` post-construction via objc2 FFI and set SF Symbols directly on `NSMenuItem` objects, producing true template images that auto-tint correctly. Context menus don't get icons because Tauri doesn't expose the raw `NSMenu` pointer, and the alternative (rasterized bitmaps via `IconMenuItem`) produces visually poor results (no template tinting, wrong size/weight).
191
205
@@ -205,10 +219,10 @@ also Window and Help.
205
219
ensures text clipboard works natively in all windows. Undo and Redo remain PredefinedMenuItems
206
220
since they only apply to text fields.
207
221
-**⌘A dual routing**: "Select all" uses ⌘A as a native menu accelerator (so it's visible in the
208
-
Edit menu). Since macOS intercepts it before the webview, the frontend's `handleCommandExecute`
209
-
checks `document.activeElement`: if it's an input/textarea, it calls `.select()` for text
210
-
selection; otherwise it selects files. This avoids PredefinedMenuItem::select_all which would
211
-
conflict with the custom MenuItem.
222
+
Select menu — moved out of Edit in M8 of the selection-dialog plan). Since macOS intercepts it before the webview,
223
+
the frontend's `handleCommandExecute`checks `document.activeElement`: if it's an input/textarea, it calls `.select()`
224
+
for text selection; otherwise it selects files. This avoids PredefinedMenuItem::select_all which would conflict with
225
+
the custom MenuItem.
212
226
-**Pin tab label**: `pin_tab` in MenuState is updated dynamically by the frontend to show
213
227
"Pin tab" or "Unpin tab" based on the active tab's state.
214
228
-**Reopen closed tab item**: The Tab submenu includes "Reopen closed tab" (⌘⇧T on macOS) between
0 commit comments