Files
gristlabs_grist-core/app/client/components
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
..
2020-10-02 13:24:21 -04:00
2020-10-02 13:24:21 -04:00
2020-10-02 13:24:21 -04:00
2021-05-25 21:14:49 +02:00
2020-10-02 13:24:21 -04:00
2020-10-02 13:24:21 -04:00
2020-10-02 13:24:21 -04:00
2021-07-01 18:38:21 +02:00
2022-01-13 11:10:17 +01:00
2020-10-02 13:24:21 -04:00
2022-01-13 11:10:17 +01:00
2021-06-29 15:29:56 +02:00
2021-10-08 14:15:07 -07:00
2020-10-02 13:24:21 -04:00
2020-10-02 13:24:21 -04:00
2020-10-02 13:24:21 -04:00
2020-10-02 13:24:21 -04:00
2020-10-02 13:24:21 -04:00
2022-01-13 11:10:17 +01:00