Commit 71e6061
committed
Context menu: Open with, cloud actions, Services menu
- "Open with" submenu in the file context menu, populated via `NSWorkspace.URLsForApplicationsToOpenURL:`. Multi-selection intersects per-file candidates and launches all paths in one `openURLs:withApplicationAtURL:configuration:` call. App-bundle icons rendered via `IconMenuItem` (full-color, not template). Default app marked with " (default)" plain-text suffix; will dim once `tauri-apps/muda#353` lands and Tauri exposes the typed setter.
- Session-scoped candidate cache keyed by lowercased extension, invalidated on `NSWorkspace.didLaunchApplicationNotification` / `didTerminateApplicationNotification`.
- "Open with → Other..." opens a native `NSOpenPanel` filtered to `.app` bundles.
- Worker threads use 8 MB stacks (FileProvider XPC stack-depth pattern from `sync_status.rs`).
- Cloud actions ("Make available offline" / "Remove download") gated on cloud-storage paths and current sync status. Wraps `NSFileProviderManager.evictItem` / `requestDownloadForItem` async APIs through completion handler + `mpsc::sync_channel`. Diagnostic logging via `log::warn!` with `target: "cloud_actions"` captures NSError code/domain on failure.
- File context menu's "Copy 'filename'" item truncates with middle ellipsis at 50 chars (preserves extension) so long filenames don't blow up the menu width.
- System Services menu in the cmdr app menu via `PredefinedMenuItem::services` — populated by AppKit with services registered by other apps.
- Open-with click events are prefix-routed (`open-with:<bundle-id>`) before the unified `menu_id_to_command` lookup, since per-app IDs are too dynamic to enumerate. Bundle-id → app-path map cached on `MenuState.context.open_with_apps` per right-click.
- Frontend command registry adds `cloud.makeOffline` / `cloud.removeDownload` (macOS-only in palette); `command-dispatch` routes them to the new Tauri commands.
- File context menu now passes the full multi-selection paths so cloud + open-with actions apply to the whole selection (Finder convention: action follows selection if right-clicked entry is part of it).1 parent cb88685 commit 71e6061
20 files changed
Lines changed: 1373 additions & 28 deletions
File tree
- apps/desktop
- src-tauri
- src
- commands
- file_system
- src
- lib
- commands
- file-explorer/pane
- shortcuts
- tauri-commands
- routes/(main)
- docs
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
158 | 162 | | |
159 | 163 | | |
160 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | | - | |
30 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
31 | 58 | | |
32 | | - | |
33 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
34 | 71 | | |
35 | 72 | | |
36 | 73 | | |
37 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
38 | 102 | | |
39 | 103 | | |
40 | 104 | | |
| |||
209 | 273 | | |
210 | 274 | | |
211 | 275 | | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
212 | 297 | | |
213 | 298 | | |
214 | 299 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
7 | 23 | | |
8 | 24 | | |
9 | 25 | | |
| |||
0 commit comments