Commit fed33ce
committed
feat(folders): generalize folders and add pinning across workflows, files, knowledge bases, and tables
- Replace workflowFolder/workspaceFileFolder with one generic `folder` table
(resourceType discriminator) and a new polymorphic `pinnedItem` table
- Migration backfills existing folders, repoints FKs, adds folderId to
knowledge_base/user_table_definitions; DB trigger + app-level validation
enforce same-workspace/same-resourceType parenting
- Generic /api/folders and new /api/pinned-items routes, contracts, and
React Query hooks shared by all four resource types
- Real folder tree + breadcrumb navigation and pin buttons wired into
Knowledge Bases and Tables pages (previously flat lists), consolidating
duplicated create/delete/restore cascade and breadcrumb logic into
shared helpers used by files/knowledge/tables/workflow sidebar1 parent cc7a6a8 commit fed33ce
107 files changed
Lines changed: 21441 additions & 1444 deletions
File tree
- apps/sim
- app
- api
- folders
- [id]
- duplicate
- restore
- reorder
- knowledge
- [id]
- pinned-items
- [resourceType]/[resourceId]
- table
- [tableId]
- v1/admin
- folders/[id]/export
- workspaces/[id]
- export
- folders
- import
- workspaces/[id]/files
- download
- folders
- [folderId]
- restore
- landing-preview/readme-tour-capture/[workspaceId]
- workspace/[workspaceId]
- components/resource
- files
- components/file-viewer/rich-markdown-editor/mention
- home
- components
- mothership-view/components
- add-resource-dropdown
- resource-registry
- user-input/components/prompt-editor
- knowledge
- components
- create-base-modal
- delete-knowledge-base-modal
- lib
- settings/components/recently-deleted
- tables
- w/components/sidebar/components
- file-list
- workflow-list
- components
- folder-item
- workflow-item
- background
- components/folders
- ee/workspace-forking/lib
- copy
- mapping
- hooks
- queries
- kb
- utils
- lib
- api/contracts
- knowledge
- cleanup
- copilot
- chat
- tools/handlers
- vfs
- folders
- knowledge
- logs
- resources/orchestration
- table
- uploads/contexts/workspace
- workflows
- orchestration
- persistence
- workspace-files/orchestration
- workspaces
- stores/folders
- packages
- db
- migrations
- meta
- platform-authz/src
- testing/src/mocks
- scripts
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
44 | 50 | | |
45 | 51 | | |
46 | 52 | | |
| |||
69 | 75 | | |
70 | 76 | | |
71 | 77 | | |
72 | | - | |
73 | | - | |
| 78 | + | |
| 79 | + | |
74 | 80 | | |
75 | 81 | | |
76 | 82 | | |
77 | 83 | | |
78 | 84 | | |
79 | 85 | | |
80 | | - | |
81 | | - | |
82 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
83 | 95 | | |
84 | 96 | | |
85 | 97 | | |
| |||
101 | 113 | | |
102 | 114 | | |
103 | 115 | | |
104 | | - | |
| 116 | + | |
105 | 117 | | |
| 118 | + | |
106 | 119 | | |
107 | 120 | | |
108 | 121 | | |
| |||
168 | 181 | | |
169 | 182 | | |
170 | 183 | | |
171 | | - | |
172 | | - | |
| 184 | + | |
| 185 | + | |
173 | 186 | | |
174 | 187 | | |
175 | 188 | | |
| |||
216 | 229 | | |
217 | 230 | | |
218 | 231 | | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
219 | 246 | | |
220 | 247 | | |
221 | 248 | | |
222 | 249 | | |
223 | 250 | | |
224 | 251 | | |
225 | | - | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
226 | 255 | | |
| 256 | + | |
227 | 257 | | |
228 | 258 | | |
229 | 259 | | |
230 | 260 | | |
231 | 261 | | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
237 | 268 | | |
238 | | - | |
239 | | - | |
| 269 | + | |
| 270 | + | |
240 | 271 | | |
241 | 272 | | |
242 | | - | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
243 | 280 | | |
244 | 281 | | |
245 | 282 | | |
| |||
250 | 287 | | |
251 | 288 | | |
252 | 289 | | |
| 290 | + | |
253 | 291 | | |
254 | 292 | | |
255 | 293 | | |
| |||
260 | 298 | | |
261 | 299 | | |
262 | 300 | | |
263 | | - | |
264 | | - | |
| 301 | + | |
| 302 | + | |
265 | 303 | | |
266 | | - | |
267 | | - | |
| 304 | + | |
| 305 | + | |
268 | 306 | | |
269 | 307 | | |
270 | | - | |
| 308 | + | |
| 309 | + | |
271 | 310 | | |
272 | | - | |
| 311 | + | |
273 | 312 | | |
274 | 313 | | |
275 | 314 | | |
| |||
296 | 335 | | |
297 | 336 | | |
298 | 337 | | |
299 | | - | |
| 338 | + | |
300 | 339 | | |
301 | 340 | | |
302 | | - | |
303 | | - | |
304 | | - | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
305 | 345 | | |
306 | 346 | | |
307 | 347 | | |
308 | 348 | | |
309 | 349 | | |
310 | 350 | | |
311 | 351 | | |
312 | | - | |
| 352 | + | |
313 | 353 | | |
| 354 | + | |
314 | 355 | | |
315 | 356 | | |
316 | 357 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
| 5 | + | |
3 | 6 | | |
4 | 7 | | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
| 11 | + | |
8 | 12 | | |
9 | | - | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
| |||
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
33 | 46 | | |
| 47 | + | |
34 | 48 | | |
35 | 49 | | |
36 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| |||
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
53 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
| |||
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
| 75 | + | |
73 | 76 | | |
74 | 77 | | |
75 | 78 | | |
| |||
386 | 389 | | |
387 | 390 | | |
388 | 391 | | |
| 392 | + | |
389 | 393 | | |
390 | 394 | | |
391 | 395 | | |
| |||
432 | 436 | | |
433 | 437 | | |
434 | 438 | | |
| 439 | + | |
435 | 440 | | |
436 | 441 | | |
437 | 442 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | | - | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | | - | |
47 | | - | |
| 47 | + | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
68 | 77 | | |
69 | 78 | | |
70 | 79 | | |
| |||
74 | 83 | | |
75 | 84 | | |
76 | 85 | | |
77 | | - | |
| 86 | + | |
78 | 87 | | |
79 | 88 | | |
80 | | - | |
| 89 | + | |
81 | 90 | | |
82 | 91 | | |
83 | 92 | | |
| 93 | + | |
84 | 94 | | |
85 | 95 | | |
86 | 96 | | |
| |||
126 | 136 | | |
127 | 137 | | |
128 | 138 | | |
129 | | - | |
130 | | - | |
| 139 | + | |
| 140 | + | |
131 | 141 | | |
132 | 142 | | |
133 | 143 | | |
| |||
147 | 157 | | |
148 | 158 | | |
149 | 159 | | |
150 | | - | |
| 160 | + | |
151 | 161 | | |
152 | 162 | | |
| 163 | + | |
153 | 164 | | |
154 | 165 | | |
155 | 166 | | |
| |||
0 commit comments