Skip to content

Commit 62799c6

Browse files
committed
Add rename feature
- With lots of edge-case handling, etc. - Also fixed a pre-exxisting bug that applied the wrong sort order after file watcher changes in current folder
1 parent 5e46143 commit 62799c6

46 files changed

Lines changed: 3606 additions & 55 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/desktop/coverage-allowlist.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,28 @@
120120
"file-operations/transfer/TransferProgressDialog.svelte": { "reason": "UI dialog, depends on Tauri events" },
121121
"file-operations/transfer/TransferErrorDialog.svelte": {
122122
"reason": "UI modal, logic tested in transfer-error-messages.test.ts"
123+
},
124+
"file-explorer/rename/ExtensionChangeDialog.svelte": {
125+
"reason": "UI modal, logic tested in rename-dialogs.test.ts"
126+
},
127+
"file-explorer/rename/RenameConflictDialog.svelte": {
128+
"reason": "UI modal, logic tested in rename-dialogs.test.ts"
129+
},
130+
"ui/Notification.svelte": { "reason": "UI component, depends on Tauri event API" },
131+
"file-explorer/rename/InlineRenameEditor.svelte": {
132+
"reason": "UI component, depends on DOM focus/selection APIs"
133+
},
134+
"file-explorer/rename/rename-state.svelte.ts": {
135+
"reason": "Reactive Svelte state, tested in rename-state.test.ts"
136+
},
137+
"file-explorer/rename/rename-activation.ts": {
138+
"reason": "Depends on document event listeners and timers"
139+
},
140+
"file-explorer/rename/rename-operations.ts": {
141+
"reason": "Depends on Tauri commands and FilePane integration"
142+
},
143+
"tauri-commands/rename.ts": {
144+
"reason": "Tauri command wrappers, tested via integration"
123145
}
124146
}
125147
}

apps/desktop/knip.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
"src/lib/settings/settings-window.ts",
1313
"src/lib/settings/types.ts",
1414
"src/lib/shortcuts/**",
15-
"src/lib/mtp/mtp-store.svelte.ts"
15+
"src/lib/mtp/mtp-store.svelte.ts",
16+
"src/lib/file-explorer/rename/**",
17+
"src/lib/ui/Notification.svelte"
1618
],
1719
"ignoreDependencies": [
1820
"@tauri-apps/cli",

apps/desktop/src-tauri/src/commands/file_system.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ pub fn clear_self_drag_overlay() {
564564
pub fn clear_self_drag_overlay() {}
565565

566566
/// Expands tilde (~) to the user's home directory.
567-
fn expand_tilde(path: &str) -> String {
567+
pub(crate) fn expand_tilde(path: &str) -> String {
568568
if (path.starts_with("~/") || path == "~")
569569
&& let Some(home) = dirs::home_dir()
570570
{

apps/desktop/src-tauri/src/commands/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ pub mod licensing;
99
pub mod mtp;
1010
#[cfg(target_os = "macos")]
1111
pub mod network;
12+
pub mod rename;
1213
pub mod settings;
1314
pub mod sync_status; // Has both macOS and non-macOS implementations
1415
pub mod ui;

0 commit comments

Comments
 (0)