Commit 605f4e8
committed
improvement(editor): fix React effect/state anti-patterns across the /w surface
Removes derived-state-in-effect, prop-sync effects, and event-logic-in-effect
across the workflow editor in favor of render-phase adjustment, derived render
values, and event-handler side effects. Stabilizes unstable references
(memoization, module-scope hoists, state->ref for non-rendered values), fixes
several stale-closure dependency bugs, and adds accessibility labels/roles.
No behavior changes; typecheck and lint clean.1 parent b8e88b1 commit 605f4e8
92 files changed
Lines changed: 2232 additions & 1840 deletions
File tree
- apps/sim/app/workspace/[workspaceId]/w
- [workflowId]
- components
- chat
- components/output-select
- cursors
- diff-controls
- note-block
- panel
- components
- copilot/components/user-input
- hooks
- deploy/components/deploy-modal
- components
- chat
- hooks
- general
- mcp
- editor
- components
- connection-blocks
- sub-block
- components
- condition-input
- document-tag-entry
- dropdown
- env-var-dropdown
- eval-input
- file-upload
- filter-builder
- grouped-checkbox-list
- input-mapping
- knowledge-tag-filters
- long-input
- mcp-dynamic-args
- mcp-server-modal
- messages-input
- selector-combobox
- skill-input
- slack-setup-wizard
- sort-builder
- components
- starter
- table
- tag-dropdown
- components
- tool-input
- components
- code-editor
- custom-tool-modal
- variables-input
- hooks
- subflow-editor
- providers
- toolbar
- hooks
- subflows
- terminal
- components/output-panel
- components
- variables
- wand-prompt-bar
- workflow-block
- hooks
- hooks
- float
- utils
- components
- preview
- components
- preview-editor
- preview-workflow
- components/block
- sidebar
- components
- help-modal
- search-modal
- settings-sidebar
- workflow-list
- components
- delete-modal
- folder-item
- workflow-item
- workspace-header
- components
- create-workspace-modal
- fork-activity-panel
- fork-workspace-modal
- promote-workspace-modal
- hooks
- hooks
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 55 additions & 44 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
272 | | - | |
273 | | - | |
274 | 272 | | |
275 | 273 | | |
| 274 | + | |
| 275 | + | |
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
295 | | - | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
296 | 299 | | |
297 | 300 | | |
298 | 301 | | |
299 | 302 | | |
300 | | - | |
| 303 | + | |
| 304 | + | |
301 | 305 | | |
302 | 306 | | |
303 | 307 | | |
304 | | - | |
| 308 | + | |
305 | 309 | | |
306 | 310 | | |
307 | 311 | | |
308 | 312 | | |
309 | 313 | | |
310 | | - | |
| 314 | + | |
311 | 315 | | |
312 | 316 | | |
313 | 317 | | |
| |||
454 | 458 | | |
455 | 459 | | |
456 | 460 | | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
461 | 468 | | |
462 | 469 | | |
463 | 470 | | |
464 | 471 | | |
465 | | - | |
466 | | - | |
| 472 | + | |
| 473 | + | |
467 | 474 | | |
468 | 475 | | |
469 | 476 | | |
470 | | - | |
471 | | - | |
| 477 | + | |
| 478 | + | |
472 | 479 | | |
473 | 480 | | |
474 | 481 | | |
| |||
607 | 614 | | |
608 | 615 | | |
609 | 616 | | |
610 | | - | |
| 617 | + | |
611 | 618 | | |
612 | 619 | | |
613 | 620 | | |
| |||
633 | 640 | | |
634 | 641 | | |
635 | 642 | | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | | - | |
648 | | - | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
649 | 655 | | |
650 | 656 | | |
651 | 657 | | |
| |||
674 | 680 | | |
675 | 681 | | |
676 | 682 | | |
677 | | - | |
678 | | - | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
679 | 688 | | |
680 | | - | |
| 689 | + | |
681 | 690 | | |
682 | 691 | | |
683 | 692 | | |
| |||
732 | 741 | | |
733 | 742 | | |
734 | 743 | | |
735 | | - | |
736 | 744 | | |
737 | 745 | | |
738 | 746 | | |
| |||
756 | 764 | | |
757 | 765 | | |
758 | 766 | | |
759 | | - | |
| 767 | + | |
760 | 768 | | |
761 | | - | |
762 | | - | |
763 | | - | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
764 | 774 | | |
765 | 775 | | |
766 | 776 | | |
767 | | - | |
768 | | - | |
769 | | - | |
770 | | - | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
771 | 781 | | |
772 | 782 | | |
773 | | - | |
774 | | - | |
| 783 | + | |
| 784 | + | |
775 | 785 | | |
776 | 786 | | |
777 | 787 | | |
778 | 788 | | |
779 | | - | |
| 789 | + | |
780 | 790 | | |
781 | 791 | | |
782 | 792 | | |
| |||
1085 | 1095 | | |
1086 | 1096 | | |
1087 | 1097 | | |
1088 | | - | |
| 1098 | + | |
1089 | 1099 | | |
1090 | 1100 | | |
1091 | 1101 | | |
| |||
1122 | 1132 | | |
1123 | 1133 | | |
1124 | 1134 | | |
| 1135 | + | |
1125 | 1136 | | |
1126 | 1137 | | |
1127 | 1138 | | |
| |||
Lines changed: 11 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
47 | 57 | | |
48 | 58 | | |
49 | 59 | | |
| |||
159 | 169 | | |
160 | 170 | | |
161 | 171 | | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
| 172 | + | |
172 | 173 | | |
173 | 174 | | |
174 | 175 | | |
| |||
193 | 194 | | |
194 | 195 | | |
195 | 196 | | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | 197 | | |
207 | 198 | | |
208 | 199 | | |
| |||
Lines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| 90 | + | |
89 | 91 | | |
90 | 92 | | |
91 | 93 | | |
| |||
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
67 | 72 | | |
68 | 73 | | |
69 | 74 | | |
| |||
90 | 95 | | |
91 | 96 | | |
92 | 97 | | |
93 | | - | |
| 98 | + | |
94 | 99 | | |
95 | 100 | | |
96 | 101 | | |
Lines changed: 33 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
59 | 63 | | |
60 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
61 | 67 | | |
62 | 68 | | |
63 | 69 | | |
64 | 70 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
70 | 74 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
89 | 95 | | |
90 | | - | |
91 | | - | |
92 | | - | |
| 96 | + | |
| 97 | + | |
93 | 98 | | |
94 | 99 | | |
95 | 100 | | |
| |||
0 commit comments