gristlabs_grist-core/app/client
Alex Hall 0c80547e0d (core) Change UndoStack._linkMap to store an array of action groups for each linkId
Summary:
While working on type conversion, I ran into a bug when multiple action groups belonging to a bundle are quickly sent. `DocData._sendActionsImpl` can set the same `linkId: this._lastActionNum` on multiple action groups before `_lastActionNum` is updated with a result from the server. Only one of these groups gets saved in `UndoStack._linkMap` so undoing a bundle misses out on some action groups.

This diff associates each `linkId` key with an array of action groups instead of just one, then combines them all together when undoing.

Test Plan: I've confirmed that this fixes my problem within my type conversion diff, but I haven't found a way to reproduce the general problem in master. I think the existing tests are probably fine since undo is tested extensively everywhere, but I'd also like to see if there are existing bugs which this fixes.

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3223
2022-01-20 19:00:01 +02:00
..
aclui (core) Duplicate page should copy filters. 2022-01-04 14:49:33 +01:00
components (core) Change UndoStack._linkMap to store an array of action groups for each linkId 2022-01-20 19:00:01 +02:00
lib (core) Enable MFA configuration (and add SMS) 2022-01-19 13:55:54 -08:00
models (core) Replace questionnaire for new users with a popup asking for just their primary use-case. 2022-01-14 10:16:11 -05:00
ui (core) Clarify phone message only supports U.S. numbers 2022-01-20 08:27:58 -08:00
ui2018 (core) Enable MFA configuration (and add SMS) 2022-01-19 13:55:54 -08:00
widgets (core) Improving experience when editing group-by column. 2022-01-18 14:31:31 +01:00
accountMain.ts (core) Enable MFA configuration (and add SMS) 2022-01-19 13:55:54 -08:00
app.css (core) Make mobile the default mode. 2021-02-25 11:31:43 -05:00
app.js (core) Disable bfcache for all browsers 2021-11-24 09:47:00 -08:00
browserCheck.ts (core) fix browser check and favicon in grist-core 2022-01-05 18:15:05 -05:00
declarations.d.ts (core) Widget options api 2022-01-13 11:10:17 +01:00
errorMain.ts (core) Enable MFA configuration (and add SMS) 2022-01-19 13:55:54 -08:00
exposeModulesForTests.js (core) Some cleanup: remove old unused modules. 2020-11-20 11:23:20 -05:00
logo.css (core) Cleanup removing some old unused files, fixing logo.css, and removing #grist-app. 2020-10-09 17:04:09 -04:00
tsconfig.json freshen app/client/ui2018/cssVars.ts 2020-06-23 16:16:38 -04:00