Commit 8c608ff
committed
fix(folders): address round-2 review feedback on locking + reorder
- File-folder locked was never persisted: toFileFolder() hardcoded
locked: false, and updateWorkspaceFileFolder() didn't accept/forward the
field at all. Threaded locked through WorkspaceFileFolderRecord,
updateWorkspaceFileFolder(), and the orchestration call site (Cursor)
- Generic knowledge_base/table folder update branch silently dropped
locked (only wrote name/parentId/sortOrder) -- a route could report
success while the lock never took effect (Greptile P1)
- Folder reorder now fails the WHOLE batch on any invalid parentId instead
of silently skipping just that entry and reporting a partial success --
restores this endpoint's pre-generalization all-or-nothing guarantee,
which an earlier round-1 fix regressed (Cursor)1 parent d8c2558 commit 8c608ff
4 files changed
Lines changed: 38 additions & 36 deletions
File tree
- apps/sim
- app/api/folders/reorder
- lib
- folders
- uploads/contexts/workspace
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
86 | 89 | | |
87 | 90 | | |
88 | 91 | | |
| |||
103 | 106 | | |
104 | 107 | | |
105 | 108 | | |
106 | | - | |
| 109 | + | |
107 | 110 | | |
108 | 111 | | |
109 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
132 | 135 | | |
133 | 136 | | |
134 | 137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| 207 | + | |
207 | 208 | | |
208 | 209 | | |
209 | 210 | | |
| |||
684 | 685 | | |
685 | 686 | | |
686 | 687 | | |
| 688 | + | |
687 | 689 | | |
688 | 690 | | |
689 | 691 | | |
| |||
739 | 741 | | |
740 | 742 | | |
741 | 743 | | |
742 | | - | |
| 744 | + | |
743 | 745 | | |
744 | 746 | | |
745 | 747 | | |
| |||
751 | 753 | | |
752 | 754 | | |
753 | 755 | | |
754 | | - | |
| 756 | + | |
| 757 | + | |
755 | 758 | | |
756 | 759 | | |
757 | | - | |
758 | | - | |
759 | | - | |
760 | | - | |
761 | | - | |
762 | | - | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
763 | 767 | | |
764 | 768 | | |
765 | 769 | | |
766 | 770 | | |
767 | 771 | | |
768 | | - | |
| 772 | + | |
769 | 773 | | |
770 | | - | |
771 | | - | |
772 | | - | |
773 | | - | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
774 | 777 | | |
775 | 778 | | |
776 | | - | |
777 | | - | |
778 | | - | |
779 | | - | |
780 | | - | |
781 | | - | |
782 | | - | |
783 | | - | |
784 | | - | |
785 | | - | |
786 | | - | |
787 | | - | |
788 | | - | |
789 | | - | |
790 | | - | |
791 | | - | |
792 | | - | |
793 | | - | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
794 | 782 | | |
795 | | - | |
796 | 783 | | |
797 | 784 | | |
798 | 785 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| 71 | + | |
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
| |||
165 | 167 | | |
166 | 168 | | |
167 | 169 | | |
| 170 | + | |
168 | 171 | | |
169 | 172 | | |
170 | 173 | | |
| |||
517 | 520 | | |
518 | 521 | | |
519 | 522 | | |
| 523 | + | |
520 | 524 | | |
521 | 525 | | |
522 | 526 | | |
| |||
556 | 560 | | |
557 | 561 | | |
558 | 562 | | |
| 563 | + | |
559 | 564 | | |
560 | 565 | | |
561 | 566 | | |
| |||
654 | 659 | | |
655 | 660 | | |
656 | 661 | | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
657 | 666 | | |
658 | 667 | | |
659 | 668 | | |
| |||
0 commit comments