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
- Shift+F4 opens a naming dialog, creates an empty file, and opens it in the default text editor (Total Commander style)
- Rust: `create_file` command + `create_file_core` with 5s timeout, same pattern as `create_directory`
- Refactored `emit_synthetic_mkdir_diff` → `emit_synthetic_entry_diff` (shared by both mkdir and mkfile)
- Frontend: `NewFileDialog` — simplified version of `NewFolderDialog` (no AI suggestions, no timeout banner)
- Pre-fills filename from cursor (keeps extension for files, empty for directories)
- MCP: `mkfile` tool triggers the dialog
- Fixed pre-existing style guide violation: "Failed to create folder" → "Couldn't create folder"
Copy file name to clipboardExpand all lines: apps/desktop/src-tauri/src/file_system/listing/CLAUDE.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,8 +90,8 @@ Frontend Backend
90
90
**Decision**: Incremental watcher path with fallback to full re-read
91
91
**Why**: Most FS changes are a few files (save, rename, drop). Re-reading an entire 50k-entry directory for one changed file is wasteful. The incremental path processes individual events: stat each changed path, classify as add/remove/modify against the cache, then use `insert_entry_sorted`/`remove_entry_by_path`/`update_entry_sorted` to patch the cache in-place. Falls back to full `handle_directory_change` when events exceed 500 or contain unknown event kinds (`Any`/`Other`), since those can't be reliably classified.
92
92
93
-
**Decision**: Synthetic diff for mkdir (`emit_synthetic_mkdir_diff`)
94
-
**Why**: `create_directory`returns before the watcher fires. Without a synthetic diff, the new folder wouldn't appear until the next debounce cycle (~200ms). The command handler stats the new directory, inserts it into all affected listings via `insert_entry_sorted`, and emits a `directory-diff` event immediately. The watcher later sees the same change but `has_entry` prevents duplicates.
93
+
**Decision**: Synthetic diff for entry creation (`emit_synthetic_entry_diff`)
94
+
**Why**: `create_directory`and `create_file` return before the watcher fires. Without a synthetic diff, the new entry wouldn't appear until the next debounce cycle (~200ms). The command handler stats the new entry, inserts it into all affected listings via `insert_entry_sorted`, and emits a `directory-diff` event immediately. The watcher later sees the same change but `has_entry` prevents duplicates.
95
95
96
96
**Decision**: Re-sort `new_entries` before `compute_diff` in full re-read path
97
97
**Why**: `list_directory_core` always returns entries sorted by Name/Asc, but the cached listing may use a different sort. Without re-sorting, diff indices would be wrong (comparing two differently-ordered lists). The re-sort aligns `new_entries` with the cached sort order so `compute_diff` produces correct indices.
0 commit comments