Commit 39fc8d2
committed
Bugfix: File ops now process selection in pane order
- Copy/move/delete used to process selected items in Cmd+click order, not pane sort order, because `SvelteSet<number>` iteration preserves insertion. Cmd+clicking rows 15, 5, 10 sent paths to the backend as `[15, 5, 10]`; the backend faithfully copied them in that order, surprising users who expected top-to-bottom processing.
- `selection-state.svelte.ts::getSelectedIndices()` now sorts ascending before returning. Visible-index ascending = pane sort order (the listing cache is sorted at fetch time). The `SvelteSet` itself stays insertion-ordered; only the read-out is sorted. All five FE call sites (copy/move/delete/trash/clipboard) flow through this single helper.
- For SMB ≥3 files the volume-copy concurrent path's spawn order now matches pane order; completion races by design (`concurrency=8`).
- Added Vitest cases for ascending order after non-monotonic toggles and from non-sorted `setSelectedIndices` input.
- Updated `file-explorer/CLAUDE.md` § Selection / Implementation to document the visible-index-ascending guarantee.1 parent 0fbafeb commit 39fc8d2
3 files changed
Lines changed: 26 additions & 1 deletion
File tree
- apps/desktop/src/lib/file-explorer
- pane
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
184 | 188 | | |
185 | 189 | | |
186 | 190 | | |
| |||
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
138 | 156 | | |
139 | 157 | | |
140 | 158 | | |
| |||
0 commit comments