# Keep image order when undoing an image removal · dara/icarus

[View on GitCafe](https://git.cafe/dara/icarus/commit/d95afd94dcd4a0f10e048cdb9c6dbb98a19c3d30)

Repository: [dara/icarus](https://git.cafe/dara/icarus)

Visibility: public

Requested revision: d95afd94dcd4a0f10e048cdb9c6dbb98a19c3d30

Requested commit: d95afd94dcd4a0f10e048cdb9c6dbb98a19c3d30

Commit: d95afd94dcd4a0f10e048cdb9c6dbb98a19c3d30

Tree: 7fda42065a4c77efc2a66af5a28c1117630ef34e

Author: Dara Adedeji

Committer: Dara Adedeji

## Message

```
Keep image order when undoing an image removal

LineUpLinkChange recorded removed images without their places and put
them back after the survivors, so [A, B, C], remove A, undo gave
[B, C, A]; order drives the lineup carousel and the panel thumbnail.

Each image a change adds (either direction) now carries the ids of the
images that followed it and are not being added themselves. Writing the
change inserts it before the first of those still present, appending only
when none are, so runs of removed images come back in order and an image
a teammate added in between stays where they put it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

```

## Parents

- [c1db6b75f2d510910d90254f2f305c7c79e02731](https://git.cafe/dara/icarus/commit/c1db6b75f2d510910d90254f2f305c7c79e02731?format=markdown)

[Source at this commit](https://git.cafe/dara/icarus/tree/d95afd94dcd4a0f10e048cdb9c6dbb98a19c3d30?format=markdown)
