Coding 2024-04-22

Tags:
By Max Woerner Chase

The backend prototype is about done, and thinking about it, I am fairly confident that the design is not sound. If I'm reading the Automerge documentation correctly, "removing an value from an object" and "putting that value in another object" would be considered as distinct actions for the purpose of reconciling divergent edit histories.

So, if I'm understanding this right, then the way I implemented the prototype allows for a situation where "a card is moved from position A to position B" and "a card is moved from position A to position C", merges as "the card is simultaneously present at position B and position C".

I should actually test this, but I'm not sure how the current implementation could do what I want. I'm trying to figure out what "what I want" would look like. Somehow representing a rotation of a sub-list as an atomic operation... I'll let that idea percolate, but unless I come up with something, it's probably not worth building this on top of Automerge.

...

Having done some research, another option is that I could simply wait, since the problem I hit is not something super-novel or surprising, and Automerge's maintainers are already working on a solution.

Once that's in place, there are a few other things I'm still not sure how best to handle, but they seem like smaller problems, and if I'm wrong, people are probably working on them.

Let's see about putting this down for now, and picking up something else. I've actually been working on something else for the past week, but it's been even more of a pain. More on that later.

Good night.