UX: Confusing DOM rerender orders when sending a message or regenerating
https://user-images.githubusercontent.com/128472336/233838395-e66d1f4f-9ffa-4d63-9f2d-012d0347757d.mp4
When sending a new message, the "loading" message appears, then a little later, your own message appears. They should appear at the same time. I'm not sure what the cause of this delay is, but if the user's own message needs to do a roundtrip to the backend before being displayed, I would suggest displaying it optimistically right away at the same time as the loading dots and then updating it with whatever result the backend returns later on.
When clicking on regenerate, the following happens, the loading dots appear, and a little later, the original message disappears. This should occur at the same time.