Commit 64cb20d
committed
fix(folders): finish the unique-name handling across every write path
Three gaps left by the previous pass, all from the same new constraint.
- restore re-roots a folder whose parent is still archived, but the dedup
ran against the original parentId, so a root-level clash was missed and
clearing deletedAt still hit the index — defeating the dedup in exactly
the case it exists for. It now dedups against the resolved parent
- the folder PUT handler mapped only not_found and validation, so the
conflict errorCode added for renames fell through to 500. It now shares
folderMutationStatus with the POST route
- admin workspace import inserted path segments unconditionally, so a
segment matching an existing folder failed the import. It now reuses the
existing folder (mkdir -p), which is also the semantics importing into
a folder path should have — the same path twice lands in one tree1 parent d3e3078 commit 64cb20d
3 files changed
Lines changed: 70 additions & 24 deletions
File tree
- apps/sim
- app/api
- folders/[id]
- v1/admin/workspaces/[id]/import
- lib/workflows/orchestration
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
16 | 24 | | |
17 | 25 | | |
18 | 26 | | |
| |||
92 | 100 | | |
93 | 101 | | |
94 | 102 | | |
95 | | - | |
96 | | - | |
| 103 | + | |
97 | 104 | | |
98 | 105 | | |
99 | 106 | | |
| |||
Lines changed: 56 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
79 | 124 | | |
80 | 125 | | |
81 | 126 | | |
| |||
151 | 196 | | |
152 | 197 | | |
153 | 198 | | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
| 199 | + | |
160 | 200 | | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
165 | 205 | | |
166 | 206 | | |
167 | 207 | | |
| |||
230 | 270 | | |
231 | 271 | | |
232 | 272 | | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
| 273 | + | |
239 | 274 | | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
244 | 279 | | |
245 | 280 | | |
246 | 281 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
543 | 543 | | |
544 | 544 | | |
545 | 545 | | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
546 | 549 | | |
547 | 550 | | |
548 | 551 | | |
549 | 552 | | |
550 | 553 | | |
551 | 554 | | |
552 | 555 | | |
| 556 | + | |
553 | 557 | | |
554 | 558 | | |
555 | 559 | | |
| |||
566 | 570 | | |
567 | 571 | | |
568 | 572 | | |
569 | | - | |
| 573 | + | |
570 | 574 | | |
571 | 575 | | |
572 | 576 | | |
| |||
0 commit comments