gristlabs_grist-core/app
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
..
client (core) Change UndoStack._linkMap to store an array of action groups for each linkId 2022-01-20 19:00:01 +02:00
common (core) Enable MFA configuration (and add SMS) 2022-01-19 13:55:54 -08:00
gen-server (core) move more tests to grist-core 2021-12-10 18:33:07 -05:00
plugin (core) Widget options api 2022-01-13 11:10:17 +01:00
server (core) Replace questionnaire for new users with a popup asking for just their primary use-case. 2022-01-14 10:16:11 -05:00
tsconfig.json (core) move home server into core 2020-07-21 20:39:10 -04:00