gristlabs_grist-core/app/client/components
Alex Hall 9b36fb4dab (core) Fix error in sandbox when removing multiple summary source columns
Summary:
Fixes a very specific bug reported here: https://grist.slack.com/archives/C069RUP71/p1694630242765769

The error occurred when:

1. Removing multiple columns simultaneously
2. Those columns were sources of groupby columns for a summary table (so removing them meant recreating the summary table and thus deleting its columns)
3. There was a display column for one of the columns that got deleted (either directly or indirectly) which was set to be automatically removed since it was no longer needed, but this failed because the column was already deleted as part of earlier table removal.

I fixed this by making `apply_auto_removes` remove table records last, so removing the display column wouldn't be a problem.

That fixed the original error, but then I noticed that trying to undo the removal could lead to another error (under even more specific circumstances). It's hard to see exactly why, but I can see that just 3 `RemoveColumn` user actions generated over 100 doc actions and corresponding undo actions, hence the difficulty in narrowing the problem down. This is partly because removing a single column would recreate a summary table, only for that table to be immediately replaced again when another column was removed. Making the frontend send a single `[BulkRemoveRecord, _grist_Tables_column, ...] ` leads to a more efficient and sensible process with about half as many doc actions and no undo error. I think this alone would also solve the original error, but the data engine change seems more generally helpful and worth keeping.

Test Plan: Added a Python test and an nbrowser test

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D4052
2023-09-27 16:23:49 +02:00
..
AceEditor.css (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
AceEditor.js
AceEditorCompletions.ts
ActionLog.css (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
ActionLog.ts (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
Banner.ts (core) Add AI assistant usage banners 2023-08-30 16:00:04 -04:00
Base.js
BaseView2.ts
BaseView.js Bidirectional Linking (#622) 2023-09-25 18:48:18 -04:00
BehavioralPromptsManager.ts (core) Fix calendar and card tip bug on mobile 2023-09-26 21:05:30 -04:00
buildViewSectionDom.ts (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
CellPosition.ts (core) Cursor in custom widgets 2023-08-29 09:19:52 +02:00
CellSelector.ts
ChartView.css
ChartView.ts
ClientScope.ts
Clipboard.css
Clipboard.js
CodeEditorPanel.css
CodeEditorPanel.ts Remove prefix from translations keys 2023-01-03 16:01:45 +01:00
ColumnFilters.css
ColumnTransform.ts (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
Comm.ts (core) Fix issue with 'UNEXPECTED ORDER OF CALLBACKS' in Client.ts. 2022-06-16 23:51:14 -04:00
commandList.ts
commands.css
commands.ts
CopySelection.ts (core) Cursor in custom widgets 2023-08-29 09:19:52 +02:00
Cursor.ts Bidirectional Linking (#622) 2023-09-25 18:48:18 -04:00
CursorMonitor.ts
CustomCalendarView.ts (core) custom widget appear as build-in widget 2023-08-30 09:44:25 +02:00
CustomView.css
CustomView.ts (core) Support dark mode in custom widgets 2023-09-19 16:08:21 -04:00
DataTables.ts
DetailView.css (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
DetailView.js (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
DocComm.ts
DocConfigTab.js (core) move client code to core 2020-10-02 13:24:21 -04:00
DocumentUsage.ts (core) Add AI assistant usage banners 2023-08-30 16:00:04 -04:00
Drafts.ts
duplicatePage.ts
EditorMonitor.ts
EmbedForm.css
FieldConfigTab.css
FormulaTransform.ts
GridView.css (core) Allow scrolling the grid horizontally while column-shadow is under the cursor 2023-09-26 20:42:10 -04:00
GridView.js (core) Fix error in sandbox when removing multiple summary source columns 2023-09-27 16:23:49 +02:00
GristDoc.css
GristDoc.ts (core) updates from grist-core 2023-09-27 09:18:41 -04:00
GristWSConnection.ts
Importer.ts
Layout.css
Layout.ts
LayoutEditor.css
LayoutEditor.ts
LayoutTray.ts
LinkingState.ts Bidirectional Linking (#622) 2023-09-25 18:48:18 -04:00
Login.css
modals.ts (core) Fix blurry tooltips 2023-09-22 03:51:58 -04:00
ParseOptions.ts
PluginScreen.ts (core) Import redesign 2023-08-04 14:59:55 +02:00
Printing.css
Printing.ts (core) Improve dark mode 2023-04-12 01:58:48 -04:00
RawDataPage.ts (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
RecordLayout.css
RecordLayout.js (core) Add cut, copy, and paste to context menu 2023-05-10 00:48:15 -04:00
RecordLayoutEditor.js
RefSelect.ts (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
SearchBar.css
SelectionSummary.ts (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
TypeConversion.ts (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
TypeTransform.ts (core) TypeTransform race condition fix 2023-08-02 17:11:34 +02:00
UndoStack.ts
UnsavedChanges.ts
ValidationPanel.css
ValidationPanel.js Remove prefix from translations keys 2023-01-03 16:01:45 +01:00
ViewAsBanner.ts (core) Adds dots menu to access rules page item 2023-01-12 09:40:45 +01:00
viewCommon.css (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
viewCommon.js
ViewConfigTab.css
ViewConfigTab.js (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
ViewLayout.css (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
ViewLayout.ts (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
ViewLinker.css
ViewPane.ts
WidgetFrame.ts