agnai icon indicating copy to clipboard operation
agnai copied to clipboard

UX: Confusing DOM rerender orders when sending a message or regenerating

Open malfoyslastname opened this issue 2 years ago • 0 comments

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.

malfoyslastname avatar Apr 23 '23 12:04 malfoyslastname