Commit 036db43
committed
fix(table): waiting state, optimistic UX, schema-mutation polling, exec cleanup
A bundle of small UX + correctness fixes around workflow-cell run state.
cell-render.tsx
- In-flight (queued/running/pending) now wins over the existing value, so
re-runs surface immediately instead of looking like nothing happened until
the worker writes the new value.
- "Waiting on X" wins over a stale `cancelled` / `error` exec when deps are
unmet — clearing a dep now reads as actionable instead of stuck.
useRunColumn (hooks/queries/tables.ts)
- onSettled now cancels in-flight polls before invalidating. Stops a poll
that landed mid-mutation from clobbering the optimistic state with stale
data, which produced the queued → cancelled → queued flicker.
addWorkflowGroup / updateWorkflowGroup (autoRun toggle on)
- Awaits scheduleRunsForTable instead of fire-and-forget. The route returned
before the queued exec stamps committed, so the post-mutation refetch saw
no in-flight cells and polling never started — cells looked stuck even
though the server eventually stamped them.
deleteColumn / deleteColumns
- Strip orphaned executions[gid] keys when deleting a column orphans its
parent group. Without this, stale running/queued exec records lingered on
every row forever and inflated the page-header "N running" counter even
on tables with no actually-running cells.
UI
- Action-bar leading label: "Selected N workflow cell(s)".
- Context menu: Run / Refresh items mirror the action bar's Play / Refresh
split, gated on the same selection-status flags so both surfaces show the
actions that match the current state.1 parent 6533967 commit 036db43
6 files changed
Lines changed: 109 additions & 17 deletions
File tree
- apps/sim
- app/workspace/[workspaceId]/tables/[tableId]/components
- table-action-bar
- table-grid
- cells
- hooks/queries
- lib/table
Lines changed: 18 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | | - | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
34 | 39 | | |
35 | 40 | | |
36 | 41 | | |
| |||
55 | 60 | | |
56 | 61 | | |
57 | 62 | | |
| 63 | + | |
58 | 64 | | |
59 | 65 | | |
60 | 66 | | |
| |||
64 | 70 | | |
65 | 71 | | |
66 | 72 | | |
67 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
68 | 78 | | |
69 | 79 | | |
70 | 80 | | |
| |||
114 | 124 | | |
115 | 125 | | |
116 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
117 | 133 | | |
118 | 134 | | |
119 | 135 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
94 | 96 | | |
95 | 97 | | |
96 | 98 | | |
| |||
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
80 | 84 | | |
81 | 85 | | |
82 | 86 | | |
| |||
87 | 91 | | |
88 | 92 | | |
89 | 93 | | |
90 | | - | |
91 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
92 | 100 | | |
93 | 101 | | |
94 | 102 | | |
| 103 | + | |
| 104 | + | |
95 | 105 | | |
96 | 106 | | |
97 | 107 | | |
| |||
Lines changed: 39 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2581 | 2581 | | |
2582 | 2582 | | |
2583 | 2583 | | |
2584 | | - | |
2585 | | - | |
2586 | | - | |
| 2584 | + | |
| 2585 | + | |
2587 | 2586 | | |
2588 | 2587 | | |
2589 | 2588 | | |
2590 | 2589 | | |
| 2590 | + | |
| 2591 | + | |
| 2592 | + | |
| 2593 | + | |
2591 | 2594 | | |
2592 | 2595 | | |
2593 | 2596 | | |
| |||
2668 | 2671 | | |
2669 | 2672 | | |
2670 | 2673 | | |
| 2674 | + | |
| 2675 | + | |
| 2676 | + | |
| 2677 | + | |
| 2678 | + | |
| 2679 | + | |
| 2680 | + | |
| 2681 | + | |
| 2682 | + | |
| 2683 | + | |
| 2684 | + | |
| 2685 | + | |
| 2686 | + | |
| 2687 | + | |
| 2688 | + | |
| 2689 | + | |
| 2690 | + | |
| 2691 | + | |
| 2692 | + | |
| 2693 | + | |
| 2694 | + | |
| 2695 | + | |
| 2696 | + | |
| 2697 | + | |
| 2698 | + | |
2671 | 2699 | | |
2672 | 2700 | | |
2673 | 2701 | | |
| |||
3099 | 3127 | | |
3100 | 3128 | | |
3101 | 3129 | | |
3102 | | - | |
| 3130 | + | |
| 3131 | + | |
| 3132 | + | |
| 3133 | + | |
| 3134 | + | |
| 3135 | + | |
| 3136 | + | |
| 3137 | + | |
3103 | 3138 | | |
3104 | 3139 | | |
3105 | 3140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1186 | 1186 | | |
1187 | 1187 | | |
1188 | 1188 | | |
1189 | | - | |
1190 | | - | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
1191 | 1196 | | |
1192 | 1197 | | |
1193 | 1198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2425 | 2425 | | |
2426 | 2426 | | |
2427 | 2427 | | |
| 2428 | + | |
| 2429 | + | |
| 2430 | + | |
| 2431 | + | |
| 2432 | + | |
| 2433 | + | |
| 2434 | + | |
| 2435 | + | |
| 2436 | + | |
2428 | 2437 | | |
2429 | 2438 | | |
2430 | 2439 | | |
| |||
2527 | 2536 | | |
2528 | 2537 | | |
2529 | 2538 | | |
| 2539 | + | |
| 2540 | + | |
| 2541 | + | |
| 2542 | + | |
| 2543 | + | |
| 2544 | + | |
| 2545 | + | |
2530 | 2546 | | |
2531 | 2547 | | |
2532 | 2548 | | |
| |||
2781 | 2797 | | |
2782 | 2798 | | |
2783 | 2799 | | |
| 2800 | + | |
| 2801 | + | |
| 2802 | + | |
2784 | 2803 | | |
2785 | | - | |
| 2804 | + | |
| 2805 | + | |
| 2806 | + | |
2786 | 2807 | | |
2787 | | - | |
| 2808 | + | |
2788 | 2809 | | |
2789 | 2810 | | |
2790 | 2811 | | |
| |||
3068 | 3089 | | |
3069 | 3090 | | |
3070 | 3091 | | |
3071 | | - | |
| 3092 | + | |
| 3093 | + | |
3072 | 3094 | | |
3073 | | - | |
| 3095 | + | |
| 3096 | + | |
| 3097 | + | |
3074 | 3098 | | |
3075 | | - | |
| 3099 | + | |
3076 | 3100 | | |
3077 | 3101 | | |
3078 | 3102 | | |
| |||
0 commit comments