- Ya
- 24 Agosti 2026, 22:09 UTC
- Mwandishi
- kamo
- Ahadi ya
- 40f8db1
The message list keyed each row on the message id, and a sent message's id changes exactly once — the optimistic row is appended under a local id, and the STOMP echo (or the send response) re-keys it to the server's. React reads that as one row leaving and a different row arriving, so it tore the element down and mounted a new one, and the new one ran the mount-time entrance spring again. The member watched their own message pop in twice. Rows now key on `localId ?? id`: @kamo/chat-core 0.1.7 carries the id a row was created under for the life of the row, so a message sent from this window keeps one element from optimistic to confirmed, and a message that arrived still keys on its server id. The test asserts element identity rather than the animation — if the DOM node survives the id change, nothing remounted and nothing can replay.